diff --git a/Gemfile.lock b/Gemfile.lock index fa8b844..27fcd63 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,6 +29,7 @@ GEM racc prettier_print (1.2.1) racc (1.8.0) + rack (3.0.11) rainbow (3.1.1) regexp_parser (2.9.2) rexml (3.2.8) @@ -48,14 +49,20 @@ GEM parser (>= 3.3.1.0) rubocop-capybara (2.20.0) rubocop (~> 1.41) - rubocop-discourse (3.7.1) + rubocop-discourse (3.8.0) activesupport (>= 6.1) rubocop (>= 1.59.0) rubocop-capybara (>= 2.0.0) rubocop-factory_bot (>= 2.0.0) + rubocop-rails (>= 2.25.0) rubocop-rspec (>= 2.25.0) rubocop-factory_bot (2.25.1) rubocop (~> 1.41) + rubocop-rails (2.25.0) + activesupport (>= 4.2.0) + rack (>= 1.1) + rubocop (>= 1.33.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) rubocop-rspec (2.29.2) rubocop (~> 1.40) rubocop-capybara (~> 2.17) @@ -79,4 +86,4 @@ DEPENDENCIES syntax_tree BUNDLED WITH - 2.5.4 + 2.5.10 diff --git a/lib/omniauth_open_id_connect.rb b/lib/omniauth_open_id_connect.rb index 00556f3..22cdd10 100644 --- a/lib/omniauth_open_id_connect.rb +++ b/lib/omniauth_open_id_connect.rb @@ -88,7 +88,7 @@ def request_phase def authorize_params super.tap do |params| options[:passthrough_authorize_options].each do |k| - params[k] = request.params[k.to_s] unless [nil, ""].include?(request.params[k.to_s]) + params[k] = request.params[k.to_s] if [nil, ""].exclude?(request.params[k.to_s]) end params[:claims] = options[:claims] if options[:claims].present? @@ -97,7 +97,7 @@ def authorize_params session["omniauth.nonce"] = params[:nonce] = SecureRandom.hex(32) options[:passthrough_token_options].each do |k| - session["omniauth.param.#{k}"] = request.params[k.to_s] unless [nil, ""].include?( + session["omniauth.param.#{k}"] = request.params[k.to_s] if [nil, ""].exclude?( request.params[k.to_s], ) end @@ -108,7 +108,7 @@ def token_params params = {} options[:passthrough_token_options].each do |k| val = session.delete("omniauth.param.#{k}") - params[k] = val unless [nil, ""].include?(val) + params[k] = val if [nil, ""].exclude?(val) end super.merge(params) end diff --git a/package.json b/package.json index c7dbcf0..b032ece 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,9 @@ { - "name": "discourse-openid-connect", "private": true, "devDependencies": { - "@discourse/lint-configs": "^1.3.5", - "ember-template-lint": "^5.13.0", - "eslint": "^8.56.0", - "prettier": "^2.8.8" + "@discourse/lint-configs": "1.3.9", + "ember-template-lint": "6.0.0", + "eslint": "8.57.0", + "prettier": "2.8.8" } }