Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Deal with an empty auth_hash (#19391)

Oliver Günther1d8d8ae052b9
diff --git a/app/contracts/authentication/omniauth_auth_hash_contract.rb b/app/contracts/authentication/omniauth_auth_hash_contract.rb
index 120c78c8fb1..d6691caf5da 100644
--- a/app/contracts/authentication/omniauth_auth_hash_contract.rb
+++ b/app/contracts/authentication/omniauth_auth_hash_contract.rb
@@ -49,7 +49,7 @@ module Authentication
end
def validate_auth_hash_not_expired
- return unless auth_hash["timestamp"]
+ return unless auth_hash&.dig("timestamp")
if auth_hash["timestamp"] < Time.now - 30.minutes
errors.add(:base, I18n.t(:error_omniauth_registration_timed_out))