misc
This commit is contained in:
parent
4db44e0b59
commit
938d53048e
@ -97,7 +97,7 @@ pub fn login(tx: &mut Transaction, name: &String, password: &String) -> Result<A
|
|||||||
|
|
||||||
// verify garbage to prevent timing attacks
|
// verify garbage to prevent timing attacks
|
||||||
verify(garbage.clone(), &garbage).ok();
|
verify(garbage.clone(), &garbage).ok();
|
||||||
return Err(MnmlHttpError::AccountNameNotFound);
|
return Err(MnmlHttpError::AccountNotFound);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -34,10 +34,10 @@ pub enum MnmlHttpError {
|
|||||||
#[fail(display="account name taken or invalid")]
|
#[fail(display="account name taken or invalid")]
|
||||||
AccountNameNotProvided,
|
AccountNameNotProvided,
|
||||||
#[fail(display="account name not provided")]
|
#[fail(display="account name not provided")]
|
||||||
AccountNameNotFound,
|
AccountNotFound,
|
||||||
#[fail(display="account name not found")]
|
#[fail(display="account not found")]
|
||||||
AccountNameTaken,
|
AccountNameTaken,
|
||||||
#[fail(display="incorrect password")]
|
#[fail(display="password does not match")]
|
||||||
PasswordNotMatch,
|
PasswordNotMatch,
|
||||||
#[fail(display="password unacceptable. must be > 11 characters")]
|
#[fail(display="password unacceptable. must be > 11 characters")]
|
||||||
PasswordUnacceptable,
|
PasswordUnacceptable,
|
||||||
@ -100,7 +100,7 @@ impl From<MnmlHttpError> for IronError {
|
|||||||
|
|
||||||
MnmlHttpError::AccountNameNotProvided |
|
MnmlHttpError::AccountNameNotProvided |
|
||||||
MnmlHttpError::AccountNameTaken |
|
MnmlHttpError::AccountNameTaken |
|
||||||
MnmlHttpError::AccountNameNotFound |
|
MnmlHttpError::AccountNotFound |
|
||||||
MnmlHttpError::BadRequest |
|
MnmlHttpError::BadRequest |
|
||||||
MnmlHttpError::PasswordUnacceptable => (m_err.compat(), status::BadRequest),
|
MnmlHttpError::PasswordUnacceptable => (m_err.compat(), status::BadRequest),
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user