summaryrefslogtreecommitdiff
path: root/app/models/concerns/token_authenticatable.rb
diff options
context:
space:
mode:
authorBrian Neel <brian@gitlab.com>2017-08-03 22:20:34 -0400
committerBrian Neel <brian@gitlab.com>2017-08-08 10:50:54 -0400
commit9770c57fab0315865a33c8b6df269eded0d57b5c (patch)
tree5a7c7a9fccbce5ef3ccf6b02b1297aace41101fd /app/models/concerns/token_authenticatable.rb
parentb612a47da0e0225332a59ab961206f84602ad629 (diff)
downloadgitlab-ce-9770c57fab0315865a33c8b6df269eded0d57b5c.tar.gz
Re-enable SqlInjection and CommandInjection
Diffstat (limited to 'app/models/concerns/token_authenticatable.rb')
-rw-r--r--app/models/concerns/token_authenticatable.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/concerns/token_authenticatable.rb b/app/models/concerns/token_authenticatable.rb
index 1ca7f91dc03..a7d5de48c66 100644
--- a/app/models/concerns/token_authenticatable.rb
+++ b/app/models/concerns/token_authenticatable.rb
@@ -44,7 +44,8 @@ module TokenAuthenticatable
end
define_method("ensure_#{token_field}!") do
- send("reset_#{token_field}!") if read_attribute(token_field).blank?
+ send("reset_#{token_field}!") if read_attribute(token_field).blank? # rubocop:disable GitlabSecurity/PublicSend
+
read_attribute(token_field)
end