Commit bc0652e4a087521aa1d169bfc3fb7f08707b1d2c
1 parent
b4d1d771
Exists in
master
avoid null pointer exception
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
lib/omniauth/strategies/env.rb
| @@ -18,9 +18,9 @@ module OmniAuth | @@ -18,9 +18,9 @@ module OmniAuth | ||
| 18 | 18 | ||
| 19 | def request_phase | 19 | def request_phase |
| 20 | @user_data = {} | 20 | @user_data = {} |
| 21 | - @uid = env_user.gsub(/@.*/, '') | 21 | + return fail!(:no_user) unless env_user |
| 22 | 22 | ||
| 23 | - return fail!(:no_user) unless @uid | 23 | + @uid = env_user.gsub(/@.*/, '') |
| 24 | 24 | ||
| 25 | fill_ldap_info unless @options.empty? | 25 | fill_ldap_info unless @options.empty? |
| 26 | 26 |