diff options
author | Xenor Chang <[email protected]> | 2022-11-28 12:34:06 +0800 |
---|---|---|
committer | git <[email protected]> | 2022-11-28 04:34:11 +0000 |
commit | 745dcf5326ea2c8e2047a3bddeb0fbb7e7d07649 (patch) | |
tree | 560523bbf5a90e61d2669bc47303d74fc529681e /lib | |
parent | 1612d57691ca5e5a3493c9028195108d7677f794 (diff) |
[ruby/cgi] Loosen the domain regex to accept '.'
(https://github.com/ruby/cgi/pull/29)
* Loosen the domain regex to accept '.'
Co-authored-by: Nobuyoshi Nakada <[email protected]>
https://github.com/ruby/cgi/commit/5e09d632f3
Co-authored-by: Hiroshi SHIBATA <[email protected]>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cgi/cookie.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cgi/cookie.rb b/lib/cgi/cookie.rb index 1a9c1a82c1..9498e2f9fa 100644 --- a/lib/cgi/cookie.rb +++ b/lib/cgi/cookie.rb @@ -42,7 +42,7 @@ class CGI TOKEN_RE = %r"\A[[!-~]&&[^()<>@,;:\\\"/?=\[\]{}]]+\z" PATH_VALUE_RE = %r"\A[[ -~]&&[^;]]*\z" - DOMAIN_VALUE_RE = %r"\A(?<label>(?!-)[-A-Za-z0-9]+(?<!-))(?:\.\g<label>)*\z" + DOMAIN_VALUE_RE = %r"\A\.?(?<label>(?!-)[-A-Za-z0-9]+(?<!-))(?:\.\g<label>)*\z" # Create a new CGI::Cookie object. # |