From 6c352cf5ae8e07565f0ec7fc8cce954632847e4a Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Tue, 19 Mar 2024 02:03:55 +0100 Subject: [PATCH] Chomp Base64 emails. --- src/requests/password.cr | 2 +- src/service.cr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/requests/password.cr b/src/requests/password.cr index eb4d22e..ddc1da7 100644 --- a/src/requests/password.cr +++ b/src/requests/password.cr @@ -14,7 +14,7 @@ class AuthD::Request user = if l = @login authd.user? l elsif mail = @email - authd.users_per_email.get? Base64.encode(mail) + authd.users_per_email.get? Base64.encode(mail).chomp else nil end diff --git a/src/service.cr b/src/service.cr index c56e375..22daccf 100644 --- a/src/service.cr +++ b/src/service.cr @@ -40,7 +40,7 @@ class AuthD::Service < IPC @users_per_login = @users.new_index "login", &.login @users_per_email = @users.new_index "email" do |user| if mail = user.contact.email - Base64.encode mail + Base64.encode(mail).chomp else "" end