Fix time value validation.

This commit is contained in:
Akinori MUSHA 2013-04-14 13:47:49 +09:00
parent 1a05bb4dd0
commit 39861d2dbb

View file

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