diff options
author | Alex Legler <a3li@gentoo.org> | 2009-03-15 22:31:08 +0100 |
---|---|---|
committer | Alex Legler <a3li@gentoo.org> | 2009-03-15 22:31:08 +0100 |
commit | 1da6d44c9ad445497ef43fae8955fa0b129bb2f3 (patch) | |
tree | 3dc654fb3d61be48c6d1b2e43be78fa510f11eed /lib/authentication.rb | |
parent | Adding skeleton database.yml for mysql (diff) | |
download | glsamaker-1da6d44c9ad445497ef43fae8955fa0b129bb2f3.tar.gz glsamaker-1da6d44c9ad445497ef43fae8955fa0b129bb2f3.tar.bz2 glsamaker-1da6d44c9ad445497ef43fae8955fa0b129bb2f3.zip |
Fix nil error when auth failed
Diffstat (limited to 'lib/authentication.rb')
-rw-r--r-- | lib/authentication.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/authentication.rb b/lib/authentication.rb index a5054d7..ba515f8 100644 --- a/lib/authentication.rb +++ b/lib/authentication.rb @@ -63,7 +63,7 @@ module Authentication private # Tries to find out the user name used for HTTP auth from two sources def user_name - request.env['REMOTE_USER'] || http_authorization_data[0] + request.env['REMOTE_USER'] || (auth = http_authorization_data) == nil ? nil : auth[0] end def http_authorization_data |