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
which is invalid. According to section 5.2 of the ECMA standard the @ is a so called "separator character":
the Separator Characters :/@?=&# (colon ':', slash '/', at sign '@', question mark '?', equal sign '=', ampersand '&' and hash sign '#')
Section 5.3 then specifies:
'@' (at sign) is the separator between name and version
and it cannot appear anywhere else. This means that @ can never appear before the name part of a purl and reporting @busybox.org for the namespace is wrong.
and it cannot appear anywhere else. This means that @ can never appear before the name part of a purl and reporting @busybox.org for the namespace is wrong.
Unless I am reading the spec wrong, which is possible, because things are not always clearly worded.
After rereading section 5.4 of the specification I have the feeling that I am correct:
The following characters shall not be percent-encoded:
the Alphanumeric Characters
the Punctuation Characters
the Separator Characters when being used as PURL separators
the colon ':', whether used as a Separator Character or otherwise
the percent sign '%' when used to represent a percent-encoded character
meaning that the separator characters should be percent-encoded when used the way I use them in the examples. This is not validated correctly:
Of course, if section 5.4 should be read as "the Separator Characters when being used as PURL separators in the relevant components" (which it doesn't say, so this is ambigious).
Activity
armijnhemel commentedon Apr 29, 2026
Similar:
This should not happen.
armijnhemel commentedon Apr 29, 2026
Should not happen.
pombredanne commentedon Apr 29, 2026
The parsing in that library is flexible and recovering from many common small flaws.
You should use the validation methods instead
Note that the messages are not perfect and should be updated.
armijnhemel commentedon Apr 29, 2026
so
from_string()does not automatically validate? that feels like lost opportunity.Also
sidas the purl type is not the problem I am trying to address.armijnhemel commentedon Apr 29, 2026
Unless I am reading the spec wrong, which is possible, because things are not always clearly worded.
armijnhemel commentedon Apr 29, 2026
After rereading section 5.4 of the specification I have the feeling that I am correct:
meaning that the separator characters should be percent-encoded when used the way I use them in the examples. This is not validated correctly:
armijnhemel commentedon Apr 29, 2026
Of course, if section 5.4 should be read as "the Separator Characters when being used as PURL separators in the relevant components" (which it doesn't say, so this is ambigious).
Oh, that also doesn't work correctly:
because (section 5.3):
armijnhemel commentedon Apr 29, 2026
Section 5.3:
Invalid purl is accepted though:
pombredanne commentedon Apr 30, 2026
if this is not validated correctly, that's a bug in the validation.