From 6987efd04bf8b0bb7e2ff4c9147cc8be3a3a9de2 Mon Sep 17 00:00:00 2001 From: Matthias Klumpp Date: Wed, 28 Sep 2022 01:27:07 +0200 Subject: [PATCH] validator: Fix timestamp validation --- src/as-validator.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/as-validator.c b/src/as-validator.c index 557f2ce5f..5b7809ad8 100644 --- a/src/as-validator.c +++ b/src/as-validator.c @@ -1750,10 +1750,9 @@ as_validator_check_release (AsValidator *validator, xmlNode *node, AsFormatStyle /* Neither timestamp, nor date property exists */ as_validator_add_issue (validator, node, "release-time-missing", "date"); } else { - if (as_str_verify_integer (timestamp, 3000, G_MAXINT64)) { - /* check if the timestamp is both a number and higher than 3000. The 3000 is used to check that it is not a year */ + /* check if the timestamp is both a number and higher than 3000. The 3000 is used to check that it is not a year */ + if (!as_str_verify_integer (timestamp, 3000, G_MAXINT64)) as_validator_add_issue (validator, node, "release-timestamp-invalid", timestamp); - } } }