diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-10 18:30:02 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-10 18:31:07 +0200 |
commit | 0ece6bd82839d0c9e3e27b65a6a201771f09190e (patch) | |
tree | 40c877c8377f2bcad111de9e3bdf0daabdb0c3a3 /app/models/project_services/irker_service.rb | |
parent | 6cf7dd625a7db143c146de1b146cba7dbcbc2576 (diff) | |
download | gitlab-ce-0ece6bd82839d0c9e3e27b65a6a201771f09190e.tar.gz |
Use `\A` and `\z` in regexes instead of `^` and `$`.
Diffstat (limited to 'app/models/project_services/irker_service.rb')
-rw-r--r-- | app/models/project_services/irker_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project_services/irker_service.rb b/app/models/project_services/irker_service.rb index 2bddb7b881c..e9e1e276e7d 100644 --- a/app/models/project_services/irker_service.rb +++ b/app/models/project_services/irker_service.rb @@ -148,7 +148,7 @@ class IrkerService < Service def consider_uri(uri) # Authorize both irc://domain.com/#chan and irc://domain.com/chan - if uri.is_a?(URI) && uri.scheme[/^ircs?$/] && !uri.path.nil? + if uri.is_a?(URI) && uri.scheme[/^ircs?\z/] && !uri.path.nil? # Do not authorize irc://domain.com/ if uri.fragment.nil? && uri.path.length > 1 uri.to_s |