PasswordTooLong
parent
c2f5c5e98c
commit
d0a058e0fb
|
@ -36,6 +36,7 @@ class AuthD::Request
|
||||||
|
|
||||||
# In this case we should not accept its registration.
|
# In this case we should not accept its registration.
|
||||||
return Response::ErrorPasswordTooShort.new if @password.size < 20
|
return Response::ErrorPasswordTooShort.new if @password.size < 20
|
||||||
|
return Response::ErrorPasswordTooLong.new if @password.size > 100
|
||||||
|
|
||||||
uid = authd.new_uid
|
uid = authd.new_uid
|
||||||
password = authd.hash_password @password
|
password = authd.hash_password @password
|
||||||
|
|
|
@ -96,4 +96,10 @@ class AuthD::Response
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
AuthD.responses << ErrorInvalidRenewKey
|
AuthD.responses << ErrorInvalidRenewKey
|
||||||
|
|
||||||
|
IPC::JSON.message ErrorPasswordTooLong, 35 do
|
||||||
|
def initialize()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
AuthD.responses << ErrorPasswordTooLong
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue