Register: fix login regex.
parent
8bcae74efc
commit
719e47a28d
|
@ -17,7 +17,7 @@ class AuthD::Request
|
||||||
return Response::ErrorAlreadyUsedLogin.new
|
return Response::ErrorAlreadyUsedLogin.new
|
||||||
end
|
end
|
||||||
|
|
||||||
acceptable_login_regex = "[a-zA-Z][a-zA-Z0-9 _-']+"
|
acceptable_login_regex = "[a-zA-Z][-_ a-zA-Z0-9']+"
|
||||||
pattern = Regex.new acceptable_login_regex, Regex::Options::IGNORE_CASE
|
pattern = Regex.new acceptable_login_regex, Regex::Options::IGNORE_CASE
|
||||||
return Response::ErrorInvalidLoginFormat.new unless pattern =~ @login
|
return Response::ErrorInvalidLoginFormat.new unless pattern =~ @login
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue