DigitalTrustCenter / sectxt

security.txt parser and validator
European Union Public License 1.2
17 stars 6 forks source link

Incorrect line number 1 for no_contact and others. #60

Closed mxsasha closed 8 months ago

mxsasha commented 1 year ago

0.9.0 introduced an issue where errors that do not relate to a specific line, e.g. no_contact or no_expire, have their line set to 1, where this should be None

Suspected cause: initially set to 1 here, and this new code in d56b65a will use that original setting unless an explicit other line number is given, and a None value keeps the existing value.

In other error combinations, I think other incorrect line numbers can occur.

DigitalTrustCenter commented 1 year ago

Thank you for reporting this issue. The line number variable was overridden which caused these undesired results. This issue is fixed now.

mxsasha commented 8 months ago

This doesn't actually seem to be fixed? Still see the same issue for e.g. no_expire. I also don't see any code changes that I had expected would fix this.

bwbroersma commented 8 months ago

It was a human off by one error on our side, actually the error on our side was about the somewhat cryptic no_line_separators (should have been called no_newline_on_last_line ;) - but don't change it now), that actually pointing to the last line (and not None) is the correct behavior.