297 lock: user *, process * (*s) (glob) |
297 lock: user *, process * (*s) (glob) |
298 wlock: user *, process * (*s) (glob) |
298 wlock: user *, process * (*s) (glob) |
299 |
299 |
300 SEC: check for unsafe ssh url |
300 SEC: check for unsafe ssh url |
301 |
301 |
|
302 $ cat >> $HGRCPATH << EOF |
|
303 > [ui] |
|
304 > ssh = sh -c "read l; read l; read l" |
|
305 > EOF |
|
306 |
302 $ hg -R test-revflag push 'ssh://-oProxyCommand=touch${IFS}owned/path' |
307 $ hg -R test-revflag push 'ssh://-oProxyCommand=touch${IFS}owned/path' |
303 pushing to ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path |
308 pushing to ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path |
304 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' |
309 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' |
305 [255] |
310 [255] |
306 $ hg -R test-revflag push 'ssh://%2DoProxyCommand=touch${IFS}owned/path' |
311 $ hg -R test-revflag push 'ssh://%2DoProxyCommand=touch${IFS}owned/path' |
307 pushing to ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path |
312 pushing to ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path |
308 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' |
313 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' |
309 [255] |
314 [255] |
310 $ hg -R test-revflag push 'ssh://fakehost|shellcommand/path' |
315 $ hg -R test-revflag push 'ssh://fakehost|touch${IFS}owned/path' |
311 pushing to ssh://fakehost%7Cshellcommand/path |
316 pushing to ssh://fakehost%7Ctouch%24%7BIFS%7Downed/path |
312 abort: potentially unsafe url: 'ssh://fakehost|shellcommand/path' |
317 abort: no suitable response from remote hg! |
313 [255] |
318 [255] |
314 $ hg -R test-revflag push 'ssh://fakehost%7Cshellcommand/path' |
319 $ hg -R test-revflag push 'ssh://fakehost%7Ctouch%20owned/path' |
315 pushing to ssh://fakehost%7Cshellcommand/path |
320 pushing to ssh://fakehost%7Ctouch%20owned/path |
316 abort: potentially unsafe url: 'ssh://fakehost|shellcommand/path' |
321 abort: no suitable response from remote hg! |
317 [255] |
322 [255] |
|
323 |
|
324 $ [ ! -f owned ] || echo 'you got owned' |