Skip to content

Commit

Permalink
validator: Fix timestamp validation
Browse files Browse the repository at this point in the history
  • Loading branch information
ximion committed Sep 27, 2022
1 parent 850abfe commit 6987efd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/as-validator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit 6987efd

Please sign in to comment.