PasswordTooLong

master
Philippe PITTOLI 2024-05-01 00:30:49 +02:00
parent c2f5c5e98c
commit d0a058e0fb
2 changed files with 7 additions and 0 deletions

View File

@ -36,6 +36,7 @@ class AuthD::Request
# In this case we should not accept its registration.
return Response::ErrorPasswordTooShort.new if @password.size < 20
return Response::ErrorPasswordTooLong.new if @password.size > 100
uid = authd.new_uid
password = authd.hash_password @password

View File

@ -96,4 +96,10 @@ class AuthD::Response
end
end
AuthD.responses << ErrorInvalidRenewKey
IPC::JSON.message ErrorPasswordTooLong, 35 do
def initialize()
end
end
AuthD.responses << ErrorPasswordTooLong
end