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
{{ message }}
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
However the delims variable incorrectly includes single-quote which is allowed:
delims = ['<', '>', '"', '\'', '`', /\s/],
The delims variable is used here:
// chop off any delim chars.
if (!unsafeProtocol[lowerProto]) {
var chop = rest.length;
for (var i = 0, l = delims.length; i < l; i++) {
var c = rest.indexOf(delims[i]);
if (c !== -1) {
chop = Math.min(c, chop);
}
}
rest = rest.substr(0, chop);
out.href += rest;
}
Which is messing with the path, query, and fragment, even though that code was added to make the host parsing safe per issue 711.
I'm not sure what this code is actually for, but it is chopping off valid URI components if they include a legal single-quote.
The text was updated successfully, but these errors were encountered:
The change for #954 introduced a regression that would cause
the url parser to fail on special chars found in the auth
segment. Fix that, and also don't create invalid urls when
format() is called on an object containing an auth member
containing '@' characters or delimiters.
isaacs
added a commit
to isaacs/node-v0.x-archive
that referenced
this issue
May 27, 2011
The change for nodejs#954 introduced a regression that would cause
the url parser to fail on special chars found in the auth
segment. Fix that, and also don't create invalid urls when
format() is called on an object containing an auth member
containing '@' characters or delimiters.
Parsing of URIs with valid single-quote character in path or query fails. For example:
http://x/path?message=that's&x=4#frag
RFC 3986 allows the following characters:
However the delims variable incorrectly includes single-quote which is allowed:
The delims variable is used here:
Which is messing with the path, query, and fragment, even though that code was added to make the host parsing safe per issue 711.
I'm not sure what this code is actually for, but it is chopping off valid URI components if they include a legal single-quote.
The text was updated successfully, but these errors were encountered: