##// END OF EJS Templates
push: add tests for unsafe ssh url (SEC)
Sean Farley -
r33711:08cfc4ba stable
parent child Browse files
Show More
@@ -297,3 +297,21 b' Test push hook locking'
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
301
302 $ hg -R test-revflag push 'ssh://-oProxyCommand=touch${IFS}owned/path'
303 pushing to ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path
304 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path'
305 [255]
306 $ hg -R test-revflag push 'ssh://%2DoProxyCommand=touch${IFS}owned/path'
307 pushing to ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path
308 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path'
309 [255]
310 $ hg -R test-revflag push 'ssh://fakehost|shellcommand/path'
311 pushing to ssh://fakehost%7Cshellcommand/path
312 abort: potentially unsafe url: 'ssh://fakehost|shellcommand/path'
313 [255]
314 $ hg -R test-revflag push 'ssh://fakehost%7Cshellcommand/path'
315 pushing to ssh://fakehost%7Cshellcommand/path
316 abort: potentially unsafe url: 'ssh://fakehost|shellcommand/path'
317 [255]
General Comments 0
You need to be logged in to leave comments. Login now