Compare commits
No commits in common. "4ecdc8968f25c70866ffa2668ffaaddbb30eb435" and "7f564100b1326998656d3b632de6aec3a91d314f" have entirely different histories.
4ecdc8968f
...
7f564100b1
@ -501,20 +501,7 @@ ORDER BY last_access DESC
|
|||||||
pub async fn login(db: &SqlitePool, name: &str, pw: &str) -> Result<Self, LoginError> {
|
pub async fn login(db: &SqlitePool, name: &str, pw: &str) -> Result<Self, LoginError> {
|
||||||
let name = name.trim(); // just to make sure...
|
let name = name.trim(); // just to make sure...
|
||||||
let Some(user) = User::find_by_name(db, name).await else {
|
let Some(user) = User::find_by_name(db, name).await else {
|
||||||
if ![
|
Log::create(db, format!("Username ({name}) not found (tried to login)")).await;
|
||||||
"n-sageder",
|
|
||||||
"p-hofer",
|
|
||||||
"m-birner",
|
|
||||||
"s-sollberger",
|
|
||||||
"d-kortschak",
|
|
||||||
"wwwadmin",
|
|
||||||
"wadminw",
|
|
||||||
"admin",
|
|
||||||
]
|
|
||||||
.contains(&name)
|
|
||||||
{
|
|
||||||
Log::create(db, format!("Username ({name}) not found (tried to login)")).await;
|
|
||||||
}
|
|
||||||
return Err(LoginError::InvalidAuthenticationCombo); // Username not found
|
return Err(LoginError::InvalidAuthenticationCombo); // Username not found
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user