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 }}
Repository navigation
Regression: ATS 9.0.x rejects URI's with two leading /'s #7246
Albeit not technically allowed by the RFCs (as far as I can tell), this is likely a common case where clients can intentionally or accidentally send two leading /'s. All versions of ATS prior to 9.0.x handles this fine, but 9.0.x does not (since we hardened the scheme parsing algorithm).
I did a change for url parsing to address empty paths. I tried to be careful to only fix things for empty paths without breaking something else, but maybe this got through. In any case, I'd say that's also a candidate for a change that broke this:
This is indeed caused by my #7119 PR. I actually explicitly added a check for this exact case and made it fail, adding a comment in the code quoting the RFC that says this should fail:
if (url->m_ptr_host == nullptr && ((end - cur) >= 2) && '/' == *cur && '/' == *(cur + 1)) {
// RFC 3986 section-3.3:
// If a URI does not contain an authority component, then the path cannot
// begin with two slash characters ("//").
return PARSE_RESULT_ERROR;
}
Fixing this issue is simply a matter of removing that condition. I'll get a PR up shortly.
Activity
bneradt commentedon Oct 7, 2020
I did a change for url parsing to address empty paths. I tried to be careful to only fix things for empty paths without breaking something else, but maybe this got through. In any case, I'd say that's also a candidate for a change that broke this:
#7119
bneradt commentedon Oct 10, 2020
This is indeed caused by my #7119 PR. I actually explicitly added a check for this exact case and made it fail, adding a comment in the code quoting the RFC that says this should fail:
https://github.com/apache/trafficserver/blob/master/proxy/hdrs/URL.cc#L1389
Fixing this issue is simply a matter of removing that condition. I'll get a PR up shortly.