Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-1814

double URI escaping

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • all
    • 1.1-consider
    • libsvn_ra_neon
    • None

    Description

      $ REPO=http://localhost/repo
      $ svn mkdir -m r1 $REPO/foo%20bar
      $ svn mv -m r2 $REPO/foo%20bar $REPO/foo_bar
      $ svn ls -r1 $REPO
      foo bar/
      $ svn ls -r1 -R $REPO
      ../svn/subversion/libsvn_ra_dav/util.c:661: (apr_err=175007)
      svn: PROPFIND request failed on '/obj/repo/!svn/bc/1/foo%2520bar'
      ../svn/subversion/libsvn_ra_dav/util.c:633: (apr_err=175007)
      svn: '/obj/repo/!svn/bc/1/foo%2520bar' path not found
      
      
      Here's the problem
      
      Breakpoint 2, svn_path_uri_encode (path=0x80aae80 "foo%20bar", pool=0x8087450)
          at ../svn/subversion/libsvn_subr/path.c:852
      852       apr_size_t i, copied = 0;
      (gdb) bt
      #0  svn_path_uri_encode (path=0x80aae80 "foo%20bar", pool=0x8087450)
          at ../svn/subversion/libsvn_subr/path.c:852
      #1  0x400ed94d in svn_path_url_add_component (
          url=0x80a9258 "/obj/repo/!svn/bc/1", component=0x80aae80 "foo%20bar", 
          pool=0x8087450) at ../svn/subversion/libsvn_subr/path.c:953
      #2  0x400b44cc in svn_ra_dav__get_dir (session_baton=0x809cce0, 
          path=0x80a1150 "foo bar", revision=1, dirents=0xbffff750, fetched_rev=0x0, 
          props=0x0, pool=0x8087450) at ../svn/subversion/libsvn_ra_dav/fetch.c:873
      #3  0x4002add9 in get_dir_contents (dirents=0x80a5fd8, 
          dir=0x80a1150 "foo bar", rev=1, ra_lib=0x400c0720, session=0x809cce0, 
          recurse=1, pool=0x8087450) at ../svn/subversion/libsvn_client/ls.c:42
      #4  0x4002aeef in get_dir_contents (dirents=0x80a5fd8, dir=0x40035b86 "", 
          rev=1, ra_lib=0x400c0720, session=0x809cce0, recurse=1, pool=0x8087450)
          at ../svn/subversion/libsvn_client/ls.c:65
      #5  0x4002b18a in svn_client_ls (dirents=0xbffff850, 
          path_or_url=0x8089708 "http://localhost:8888/obj/repo", 
          revision=0xbffffa34, recurse=1, ctx=0x807be28, pool=0x8087450)
          at ../svn/subversion/libsvn_client/ls.c:116
      #6  0x0804ef22 in svn_cl__ls (os=0x805fd60, baton=0xbffff934, pool=0x805fab8)
          at ../svn/subversion/clients/cmdline/ls-cmd.c:144
      #7  0x080505c8 in main (argc=5, argv=0xbffffb74)
          at ../svn/subversion/clients/cmdline/main.c:1256
      
      I suspect that we should be calling svn_path_add_component rather than
      svn_path_url_add_component at fetch.c:873, but I don't know the ra_dav code well
      enough to determine if bc_relative.data is guaranteed to be URI escaped.
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            philipm Philip Martin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: