This commit is contained in:
Mashy 2019-07-20 11:18:25 +10:00
parent 4db44e0b59
commit 938d53048e
2 changed files with 5 additions and 5 deletions

View File

@ -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);
}, },
}; };

View File

@ -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),