diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-12-30 14:32:05 +0900 |
---|---|---|
committer | usa <usa@garbagecollect.jp> | 2023-03-30 19:48:27 +0900 |
commit | e3f18f7d2e034f20053d7bf2fc7a50f8b7e1a27a (patch) | |
tree | 4bb54841e927ac78d8b93661aab7df5a6bd218f9 /lib | |
parent | be9026a7b4d2c3a6bd7f109334149f4da08cf43f (diff) |
Make RFC2822 regexp linear
https://hackerone.com/reports/1485501
Diffstat (limited to 'lib')
-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 236bfe1aa2..245e1a2320 100644 --- a/lib/time.rb +++ b/lib/time.rb @@ -502,7 +502,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. |