diff options
author | Rémy Coutable <remy@rymai.me> | 2017-08-14 16:35:14 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-08-14 16:35:14 +0000 |
commit | be22bf5c7382b388a06cbde01438ba38582994f7 (patch) | |
tree | 4ff900733313d1bc636b08bc80f6a09924f28880 /app | |
parent | d1e1139e65f2400ebd2ba2386e236a0fff626517 (diff) | |
parent | 64073185adcb3eec40eda05e11f9bf47f646bf9d (diff) | |
download | gitlab-ce-be22bf5c7382b388a06cbde01438ba38582994f7.tar.gz |
Merge branch 'rs-remove-username-from-sanitize-attrs' into 'master'
Remove `username` from `User#sanitize_attrs` callback
See merge request !13511
Diffstat (limited to 'app')
-rw-r--r-- | app/models/user.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index a4615436245..2b25736bb26 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -726,9 +726,9 @@ class User < ActiveRecord::Base end def sanitize_attrs - %w[username skype linkedin twitter].each do |attr| - value = public_send(attr) # rubocop:disable GitlabSecurity/PublicSend - public_send("#{attr}=", Sanitize.clean(value)) if value.present? # rubocop:disable GitlabSecurity/PublicSend + %i[skype linkedin twitter].each do |attr| + value = self[attr] + self[attr] = Sanitize.clean(value) if value.present? end end |