comparison tests/test-push.t @ 33653:48d520fdf880 stable

push: add tests for unsafe ssh url (SEC)
author Sean Farley <sean@farley.io>
date Mon, 31 Jul 2017 14:40:28 -0700
parents 78fc540c53e1
children 3fee7f7d2da0
comparison
equal deleted inserted replaced
33652:0ee42a0df5be 33653:48d520fdf880
314 searching for changes 314 searching for changes
315 adding changesets 315 adding changesets
316 adding manifests 316 adding manifests
317 adding file changes 317 adding file changes
318 added 1 changesets with 1 changes to 1 files 318 added 1 changesets with 1 changes to 1 files
319
320 SEC: check for unsafe ssh url
321
322 $ hg -R test-revflag push 'ssh://-oProxyCommand=touch${IFS}owned/path'
323 pushing to ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path
324 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path'
325 [255]
326 $ hg -R test-revflag push 'ssh://%2DoProxyCommand=touch${IFS}owned/path'
327 pushing to ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path
328 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path'
329 [255]
330 $ hg -R test-revflag push 'ssh://fakehost|shellcommand/path'
331 pushing to ssh://fakehost%7Cshellcommand/path
332 abort: potentially unsafe url: 'ssh://fakehost|shellcommand/path'
333 [255]
334 $ hg -R test-revflag push 'ssh://fakehost%7Cshellcommand/path'
335 pushing to ssh://fakehost%7Cshellcommand/path
336 abort: potentially unsafe url: 'ssh://fakehost|shellcommand/path'
337 [255]