diff options
author | Guilhem Moulin <guilhem.moulin@fripost.org> | 2013-01-29 02:37:58 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem.moulin@fripost.org> | 2013-01-29 02:37:58 +0100 |
commit | 7b81775603b8208c995cd1c4a15cd2a287009404 (patch) | |
tree | f8946c7eff5b1c8de2e3b6ee7944f8e5180891cc /lib/Fripost/Panel/Login.pm | |
parent | ae6b8a2905bfc7905030479e06f3490f2c901099 (diff) |
Bug fixes.
Diffstat (limited to 'lib/Fripost/Panel/Login.pm')
-rw-r--r-- | lib/Fripost/Panel/Login.pm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Fripost/Panel/Login.pm b/lib/Fripost/Panel/Login.pm index 1eabafb..22a870a 100644 --- a/lib/Fripost/Panel/Login.pm +++ b/lib/Fripost/Panel/Login.pm @@ -23,7 +23,7 @@ use Fripost::Schema::Util 'split_addr'; use HTML::Entities 'encode_entities'; use URI::Escape::XS 'decodeURIComponent'; -use Encode; +use Encode (); # This method is called right before the 'setup' method below. It # initializes the session and authentication configurations. @@ -56,9 +56,7 @@ sub cgiapp_init { $self->authen->config( DRIVER => [ 'Generic', sub { my ($u,$p) = @_; - my $d = (split_addr($u))[1]; - - unless (defined $d) { + unless ($u =~ /\@/) { $CFG{default_realm} // return 0; $u .= '@'.$CFG{default_realm}; } |