You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
unsigned=*line [can-fieldeol]
*line (contact-fieldeol)
*line [lang-fieldeol] *line; the order of elements is not important
This last comment (after the ;) appears to indicate that the ABNF lines can be reordered, but the entities within the lines probably cannot.
NB: If I have misunderstood, and literally everything in the ABNF above can be reordered as much as you like (that is, the ABNF has different lines not for semantic reasons but just because it was too long to fit on one line etc.), then this doesn't apply. In this case, there may be ambiguity in terms of the order within the parentheses (e.g. is eol contact-field allowed? it shouldn't be because it can lead to files which should be invalid). I'm not sure.
Observe that the Preferred-Languages directive (lang-field) has a different ABNF to all of the others. This is so that you can have lines after all of these special fields have been dealt with. The problem is that the Preferred-Languages directive isn't special anymore because it might not appear at the end. If it appears at the start for example, then the security.txt file will become non-compliant if there are comments or other fields at the end of the file.
Preferred-Languages: ... # allows for `line`s after it
Contact: ...
Canonical: ... # this is not allowed because `contact-field` doesn't allow lines after it
To solve this, I would suggest creating some sort of intermediary non-terminal, and then having unsigned force *line to be after it:
unsigned-intermediate=*line [can-fieldeol]
*line (contact-fieldeol)
*line [lang-fieldeol] *line; the order of elements is not importantunsigned=unsigned-intermediate*line
I would also suggest placing parentheses around each line to make it clear that they should be treated as separate units when it comes to "the order of elements is not important"
The text was updated successfully, but these errors were encountered:
The current ABNF reads:
This last comment (after the
;
) appears to indicate that the ABNF lines can be reordered, but the entities within the lines probably cannot.NB: If I have misunderstood, and literally everything in the ABNF above can be reordered as much as you like (that is, the ABNF has different lines not for semantic reasons but just because it was too long to fit on one line etc.), then this doesn't apply. In this case, there may be ambiguity in terms of the order within the parentheses (e.g. is
eol contact-field
allowed? it shouldn't be because it can lead to files which should be invalid). I'm not sure.Observe that the Preferred-Languages directive (
lang-field
) has a different ABNF to all of the others. This is so that you can haveline
s after all of these special fields have been dealt with. The problem is that the Preferred-Languages directive isn't special anymore because it might not appear at the end. If it appears at the start for example, then thesecurity.txt
file will become non-compliant if there are comments or other fields at the end of the file.To solve this, I would suggest creating some sort of intermediary non-terminal, and then having
unsigned
force*line
to be after it:I would also suggest placing parentheses around each line to make it clear that they should be treated as separate units when it comes to "the order of elements is not important"
The text was updated successfully, but these errors were encountered: