diff --git a/peach-lib/src/password_utils.rs b/peach-lib/src/password_utils.rs index 28e5e18..047d3be 100644 --- a/peach-lib/src/password_utils.rs +++ b/peach-lib/src/password_utils.rs @@ -34,7 +34,7 @@ pub fn validate_new_passwords(new_password1: &str, new_password2: &str) -> Resul } } -/// Uses htpasswd to set a new password for the admin user +/// Sets a new password for the admin user pub fn set_new_password(new_password: &str) -> Result<(), PeachError> { let new_password_hash = hash_password(&new_password.to_string()); let result = set_admin_password_hash(&new_password_hash); @@ -55,7 +55,7 @@ pub fn hash_password(password: &str) -> String { hasher.result_str() } -/// Uses htpasswd to set a new temporary password for the admin user +/// Sets a new temporary password for the admin user /// which can be used to reset the permanent password pub fn set_new_temporary_password(new_password: &str) -> Result<(), PeachError> { let new_password_hash = hash_password(&new_password.to_string()); @@ -82,7 +82,7 @@ pub fn verify_temporary_password(password: &str) -> Result<(), PeachError> { } } -/// generates a temporary password and sends it via ssb dm +/// Generates a temporary password and sends it via ssb dm /// to the ssb id configured to be the admin of the peachcloud device pub fn send_password_reset() -> Result<(), PeachError> { // first generate a new random password of ascii characters @@ -119,7 +119,6 @@ using this link: http://peach.local/reset_password", msg += &remote_link; // finally send the message to the admins let peach_config = load_peach_config()?; - info!("sending password reset: {}", msg); for ssb_admin_id in peach_config.ssb_admin_ids { sbot_client::private_message(&msg, &ssb_admin_id)?; } diff --git a/peach-web/src/routes/authentication.rs b/peach-web/src/routes/authentication.rs index 18639d9..a55a0c0 100644 --- a/peach-web/src/routes/authentication.rs +++ b/peach-web/src/routes/authentication.rs @@ -35,8 +35,8 @@ pub enum LoginError { UserNotLoggedIn } -/// Request guard which returns an Authenticated struct with is_authenticated=true -/// iff the user has a cookie which proves they are authenticated with peach-web. +/// Request guard which returns an empty Authenticated struct from the request +/// if and only if the user has a cookie which proves they are authenticated with peach-web. /// /// Note that cookies.get_private uses encryption, which means that this private cookie /// cannot be inspected, tampered with, or manufactured by clients. @@ -114,7 +114,6 @@ pub fn verify_login_form(login_form: LoginForm) -> Result<(), PeachError> { #[post("/login", data="")] pub fn login_post(login_form: Form, cookies: &CookieJar<'_>) -> TemplateOrRedirect { - info!("call to login post"); let result = verify_login_form(login_form.into_inner()); match result { Ok(_) => {