The GitHub Actions job "CMake" on subversion.git/proxy-move-copy-fix has failed.
Run started by GitHub user asf-gitbox-commits (triggered by asf-gitbox-commits).

Head commit for run:
7d60cc64cc3d0730888089a36f6eb3cb0947dde9 / Jordan Peck <[email protected]>
Fix URI-encoded vs non-encoded comparison of stored root dir

dav_svn__get_root_dir() returns the <Location> path canonicalized and
URI-encoded (create_dir_config() runs it through
svn_urlpath__canonicalize(), which normalizes by decode-then-encode),
but mirror.c treated it as decoded throughout.  For any location path
containing a URI-escapable character this made the write-through proxy
silently non-functional:

  - request routing searched the decoded r->uri for the encoded root,
    never matching, so write requests were never proxied and failed on
    the read-only slave;

  - both body-rewrite filters URI-encoded the already-encoded root and
    master paths a second time before compiling the search pattern
    ('%' is itself escaped, so "/svn%20repo" became "/svn%2520repo"),
    a byte sequence that can never occur in real protocol bodies

  - the COPY/MOVE Destination rewrite double-encoded the root the same
    way, so the ancestor comparison against the (encoded, normalized)
    Destination path always failed.

All latent for plain-ASCII locations, where the extra encode is a
no-op. Regression coverage coming in a follow-up commit.

* subversion/mod_dav_svn/mirror.c
  (proxy_request_fixup_destination): Use the stored root dir directly
   and correct the comment that misdescribed it as decoded.
  (dav_svn__proxy_request_fixup): Decode the root once and match the
   decoded form against the decoded r->uri.
  (dav_svn__location_in_filter, dav_svn__location_body_filter): Drop
   the double-encode of the pattern and replacement strings; both are
   already in the wire domain.


git-svn-id: 
https://svn.apache.org/repos/asf/subversion/branches/proxy-move-copy-fix@1936011
 13f79535-47bb-0310-9956-ffa450edef68

Report URL: https://github.com/apache/subversion/actions/runs/28973170821

With regards,
GitHub Actions via GitBox

Reply via email to