Skip to content

Commit

Permalink
Remove characters 'period' and 'at sign' from login regex.
Browse files Browse the repository at this point in the history
When using the login field as the identifier in your routes,
and the login contains a period, the substring after the period is
considered as the requested file format.
  • Loading branch information
aizatto committed Feb 27, 2009
1 parent 2ae4c22 commit 03f8009
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/authentication.rb
Expand Up @@ -3,11 +3,11 @@ module Authentication
:name_regex, :bad_name_message,
:email_name_regex, :domain_head_regex, :domain_tld_regex, :email_regex, :bad_email_message

self.login_regex = /\A\w[\w\.\-_@]+\z/ # ASCII, strict
self.login_regex = /\A\w[\w\-_]+\z/ # ASCII, strict
# self.login_regex = /\A[[:alnum:]][[:alnum:]\.\-_@]+\z/ # Unicode, strict
# self.login_regex = /\A[^[:cntrl:]\\<>\/&]*\z/ # Unicode, permissive

self.bad_login_message = "use only letters, numbers, and .-_@ please.".freeze
self.bad_login_message = "use only letters, numbers, and -_ please.".freeze

self.name_regex = /\A[^[:cntrl:]\\<>\/&]*\z/ # Unicode, permissive
self.bad_name_message = "avoid non-printing characters and \\&gt;&lt;&amp;/ please.".freeze
Expand Down

0 comments on commit 03f8009

Please sign in to comment.