mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-03-25 08:55:53 +00:00
Fix time value validation.
This commit is contained in:
parent
1a05bb4dd0
commit
39861d2dbb
1 changed files with 2 additions and 1 deletions
|
|
@ -143,7 +143,8 @@ class HTTP::Cookie::Scanner < StringScanner
|
|||
year += 2000
|
||||
end
|
||||
|
||||
if (time <=> [23,59,59]) > 0
|
||||
hh, mm, ss = time
|
||||
if hh > 23 || mm > 59 || ss > 59
|
||||
return nil
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue