nicktarallo opened a new pull request, #773:
URL: https://github.com/apache/commons-vfs/pull/773

   In VFS 2.10, content inside brackets in the file URL is not decoded. This is 
because it is detected to be part of an IPv6 host, although this may not be 
desired behavior in all circumstances (local file paths that happen to have 
content in brackets are also affected, despite being unrelated to IPv6).
   
   The fix here is to ensure that we only detect a host inside of the authority 
as defined by RFC 3986. We do this by detecting the authority as the content 
between the first instance of `"//"` and the next `"/"`, since the URL takes 
the format `scheme://<authority>/<path>`. Brackets `outside` of the authority 
hold no special meaning, so content inside of these brackets will now be 
decoded.
   
   Bug was most likely introduced by: 
https://github.com/apache/commons-vfs/pull/438/changes#diff-731c9fd149c7d934456163a6eb8c1afebc6be0669986e8ccf5092f164ea0cd30R166
   
   There appears to be another old, stale PR out for the same issue, but I 
could not find an associated ticket: 
https://github.com/apache/commons-vfs/pull/562
   
   AI (Claude Code) was used to write most of the code (I reviewed all output). 
The fix approach and the design of the test cases were provided by me to the 
tool.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to