diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-12-30 14:32:05 +0900 |
---|---|---|
committer | git <[email protected]> | 2023-03-30 10:44:39 +0000 |
commit | cbfd02998597f652940def034e490c2428baef09 (patch) | |
tree | e40e0a23061cc0c320e663565454daf35942af14 /lib/time.rb | |
parent | aa3885501f89e4927a72ccc1f90ff9cbc4140e17 (diff) |
[ruby/time] Make RFC2822 regexp linear
https://hackerone.com/reports/1485501
https://github.com/ruby/time/commit/51034bda4c
Diffstat (limited to 'lib/time.rb')
-rw-r--r-- | lib/time.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/time.rb b/lib/time.rb index 2c85f94cb2..6a13212a49 100644 --- a/lib/time.rb +++ b/lib/time.rb @@ -510,7 +510,7 @@ class Time (\d{2,})\s+ (\d{2})\s* :\s*(\d{2}) - (?:\s*:\s*(\d{2}))?\s+ + (?:\s*:\s*(\d\d))?\s+ ([+-]\d{4}| UT|GMT|EST|EDT|CST|CDT|MST|MDT|PST|PDT|[A-IK-Z])/ix =~ date # Since RFC 2822 permit comments, the regexp has no right anchor. |