summaryrefslogtreecommitdiff
path: root/app/models/gpg_key.rb
diff options
context:
space:
mode:
authorTim Bishop <tim@bishnet.net>2017-09-19 18:57:01 +0100
committerTim Bishop <tim@bishnet.net>2017-09-29 20:30:58 +0100
commita212391f0fc5e2d021ade4c0219c079e0832e18e (patch)
treea13897d47bd69cb0e157c063d59d2c21d52e3399 /app/models/gpg_key.rb
parent171714c9231deb95136088ba1c0621379467de39 (diff)
downloadgitlab-ce-a212391f0fc5e2d021ade4c0219c079e0832e18e.tar.gz
Make GPG validation case insensitive.
In line with other changes in GitLab, make email address validation properly case insensitive. The email address in the commit may be in any case, so it needs downcasing to match the address stored in GitLab for the user. Without this change the comparison fails and commits are not marked as verified. See #37009.
Diffstat (limited to 'app/models/gpg_key.rb')
-rw-r--r--app/models/gpg_key.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/gpg_key.rb b/app/models/gpg_key.rb
index 44deae4234b..54bd5b68777 100644
--- a/app/models/gpg_key.rb
+++ b/app/models/gpg_key.rb
@@ -73,7 +73,7 @@ class GpgKey < ActiveRecord::Base
end
def verified_and_belongs_to_email?(email)
- emails_with_verified_status.fetch(email, false)
+ emails_with_verified_status.fetch(email.downcase, false)
end
def update_invalid_gpg_signatures