tests/test-subrepo-git.t
branchstable
changeset 33660 3fee7f7d2da0
parent 33658 db83a1df03fe
child 34146 9e4f82bc2b0b
equal deleted inserted replaced
33659:8cb9e921ef8c 33660:3fee7f7d2da0
  1211   $ rm -r malicious-proxycommand-clone
  1211   $ rm -r malicious-proxycommand-clone
  1212   $ hg clone malicious-proxycommand malicious-proxycommand-clone
  1212   $ hg clone malicious-proxycommand malicious-proxycommand-clone
  1213   updating to branch default
  1213   updating to branch default
  1214   abort: potentially unsafe url: 'ssh://-oProxyCommand=rm${IFS}non-existent/path' (in subrepository "s")
  1214   abort: potentially unsafe url: 'ssh://-oProxyCommand=rm${IFS}non-existent/path' (in subrepository "s")
  1215   [255]
  1215   [255]
  1216 
       
  1217 also check for a pipe
       
  1218 
       
  1219   $ cd malicious-proxycommand
       
  1220   $ echo 's = [git]ssh://fakehost|shell/path' > .hgsub
       
  1221   $ hg ci -m 'change url to pipe'
       
  1222   $ cd ..
       
  1223   $ rm -r malicious-proxycommand-clone
       
  1224   $ hg clone malicious-proxycommand malicious-proxycommand-clone
       
  1225   updating to branch default
       
  1226   abort: potentially unsafe url: 'ssh://fakehost|shell/path' (in subrepository "s")
       
  1227   [255]
       
  1228 
       
  1229 also check that a percent encoded '|' (%7C) doesn't work
       
  1230 
       
  1231   $ cd malicious-proxycommand
       
  1232   $ echo 's = [git]ssh://fakehost%7Cshell/path' > .hgsub
       
  1233   $ hg ci -m 'change url to percent encoded'
       
  1234   $ cd ..
       
  1235   $ rm -r malicious-proxycommand-clone
       
  1236   $ hg clone malicious-proxycommand malicious-proxycommand-clone
       
  1237   updating to branch default
       
  1238   abort: potentially unsafe url: 'ssh://fakehost|shell/path' (in subrepository "s")
       
  1239   [255]