lib517: verify time stamps without leading zeroes plus some more

This commit is contained in:
Daniel Stenberg 2023-02-17 10:39:36 +01:00
parent 5cc09a8479
commit f074602072
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -34,6 +34,10 @@ static const struct dcheck dates[] = {
{"Sun, 06 Nov 1994 08:49:37 GMT", 784111777 },
{"Sunday, 06-Nov-94 08:49:37 GMT", 784111777 },
{"Sun Nov 6 08:49:37 1994", 784111777 },
{"Sun Nov 6 8:49:37 1994", 784111777 },
{"Sun Nov 6 8:9:37 1994", 784109377 },
{"Sun Nov 6 008:09:37 1994", -1 },
{"Nov Sun 6 8:9:7 1994", 784109347 },
{"06 Nov 1994 08:49:37 GMT", 784111777 },
{"06-Nov-94 08:49:37 GMT", 784111777 },
{"Nov 6 08:49:37 1994", 784111777 },
@ -116,6 +120,9 @@ static const struct dcheck dates[] = {
{"20111323 12:34:56", -1 },
{"20110623 12:34:79", -1 },
{"Wed, 31 Dec 2008 23:59:60 GMT", 1230768000 },
{"Wed, 31 Dec 2008 23:59:61 GMT", -1 },
{"Wed, 31 Dec 2008 24:00:00 GMT", -1 },
{"Wed, 31 Dec 2008 23:60:59 GMT", -1 },
{"20110623 12:3", 1308830580 },
{"20110623 1:3", 1308790980 },
{"20110623 1:30", 1308792600 },