Commit a0e23b5d authored by Thong Kuah's avatar Thong Kuah

Merge branch 'cherry-pick-4d66d317' into 'master'

Fix deprecation warning related to unicode_normalize [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!59867
parents fb7acc47 f08d553e
...@@ -267,7 +267,7 @@ gem 'kubeclient', '~> 4.9.1' ...@@ -267,7 +267,7 @@ gem 'kubeclient', '~> 4.9.1'
# Sanitize user input # Sanitize user input
gem 'sanitize', '~> 5.2.1' gem 'sanitize', '~> 5.2.1'
gem 'babosa', '~> 1.0.2' gem 'babosa', '~> 1.0.4'
# Sanitizes SVG input # Sanitizes SVG input
gem 'loofah', '~> 2.2' gem 'loofah', '~> 2.2'
......
...@@ -132,7 +132,7 @@ GEM ...@@ -132,7 +132,7 @@ GEM
faraday_middleware (~> 1.0.0.rc1) faraday_middleware (~> 1.0.0.rc1)
net-http-persistent (~> 4.0) net-http-persistent (~> 4.0)
nokogiri (~> 1.11.0.rc2) nokogiri (~> 1.11.0.rc2)
babosa (1.0.2) babosa (1.0.4)
backport (1.1.2) backport (1.1.2)
base32 (0.3.2) base32 (0.3.2)
batch-loader (2.0.1) batch-loader (2.0.1)
...@@ -1378,7 +1378,7 @@ DEPENDENCIES ...@@ -1378,7 +1378,7 @@ DEPENDENCIES
aws-sdk-cloudformation (~> 1) aws-sdk-cloudformation (~> 1)
aws-sdk-core (~> 3) aws-sdk-core (~> 3)
aws-sdk-s3 (~> 1) aws-sdk-s3 (~> 1)
babosa (~> 1.0.2) babosa (~> 1.0.4)
base32 (~> 0.3.0) base32 (~> 0.3.0)
batch-loader (~> 2.0.1) batch-loader (~> 2.0.1)
bcrypt (~> 3.1, >= 3.1.14) bcrypt (~> 3.1, >= 3.1.14)
......
...@@ -81,7 +81,7 @@ module Gitlab ...@@ -81,7 +81,7 @@ module Gitlab
# Get the first part of the email address (before @) # Get the first part of the email address (before @)
# In addition in removes illegal characters # In addition in removes illegal characters
def generate_username(email) def generate_username(email)
email.match(/^[^@]*/)[0].mb_chars.normalize(:kd).gsub(/[^\x00-\x7F]/, '').to_s email.match(/^[^@]*/)[0].mb_chars.unicode_normalize(:nfkd).gsub(/[^\x00-\x7F]/, '').to_s
end end
def generate_temporarily_email(username) def generate_temporarily_email(username)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment