pub enum SecurityError {
Show 24 variants
ValidationError(String),
RateLimitExceeded(String),
CryptoError(String),
PolicyViolation(String),
AuthenticationError(String),
AuthorizationError(String),
InvalidSession(String),
SuspiciousActivity(String),
ConfigError(String),
AuditError(String),
SqlInjectionAttempt,
XssAttempt,
PathTraversalAttempt,
CommandInjectionAttempt,
LdapInjectionAttempt,
RegexDosAttempt,
RequestTooLarge(usize),
InvalidContentType(String),
WeakPassword(String),
InvalidToken,
CsrfTokenMismatch,
InsecureProtocol(String),
CertificateError(String),
General(String),
}Expand description
Security errors
Variants§
ValidationError(String)
Input validation failed
RateLimitExceeded(String)
Rate limit exceeded
CryptoError(String)
Cryptographic operation failed
PolicyViolation(String)
Policy violation
AuthenticationError(String)
Authentication failed
AuthorizationError(String)
Authorization failed
InvalidSession(String)
Invalid session
SuspiciousActivity(String)
Suspicious activity detected
ConfigError(String)
Configuration error
AuditError(String)
Audit log validation failed
SqlInjectionAttempt
SQL injection attempt detected
XssAttempt
XSS attempt detected
PathTraversalAttempt
Path traversal attempt detected
CommandInjectionAttempt
Command injection attempt detected
LdapInjectionAttempt
LDAP injection attempt detected
RegexDosAttempt
Regular expression DoS attempt
RequestTooLarge(usize)
Request too large
InvalidContentType(String)
Invalid content type
WeakPassword(String)
Weak password
InvalidToken
Invalid token
CsrfTokenMismatch
CSRF token mismatch
InsecureProtocol(String)
Insecure protocol
CertificateError(String)
Certificate validation failed
General(String)
General error
Implementations§
Source§impl SecurityError
impl SecurityError
Sourcepub fn should_alert(&self) -> bool
pub fn should_alert(&self) -> bool
Check if the error should trigger an alert
Sourcepub fn public_message(&self) -> String
pub fn public_message(&self) -> String
Get a sanitized error message for external display
Trait Implementations§
Source§impl Debug for SecurityError
impl Debug for SecurityError
Source§impl Display for SecurityError
impl Display for SecurityError
Source§impl Error for SecurityError
impl Error for SecurityError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for SecurityError
impl RefUnwindSafe for SecurityError
impl Send for SecurityError
impl Sync for SecurityError
impl Unpin for SecurityError
impl UnwindSafe for SecurityError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more