Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2018-12-05 23:14:09 +0300
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2018-12-06 18:18:18 +0300
commit72c00594070dfd1a778c2e03ff400b478e6c3774 (patch)
treed8fd26536ef6c5e4a2e3ef02ea7785537d34d93b /app/validators
parent8cd5004b350ef342f66956c11272dad1328f6526 (diff)
Allow URLs to be validated as ascii_only
Restricts unicode characters and IDNA deviations which could be used in a phishing attack
Diffstat (limited to 'app/validators')
-rw-r--r--app/validators/url_validator.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/validators/url_validator.rb b/app/validators/url_validator.rb
index 216acf79cbd..5feb0b0f05b 100644
--- a/app/validators/url_validator.rb
+++ b/app/validators/url_validator.rb
@@ -69,6 +69,7 @@ class UrlValidator < ActiveModel::EachValidator
ports: [],
allow_localhost: true,
allow_local_network: true,
+ ascii_only: false,
enforce_user: false
}
end