Make RFC2822 regexp linear

https://hackerone.com/reports/1485501
This commit is contained in:
Nobuyoshi Nakada 2022-12-30 14:32:05 +09:00 committed by usa
parent be9026a7b4
commit e3f18f7d2e

View File

@ -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.