Skip to content
Snippets Groups Projects
Commit 48d520fdf880 authored by Sean Farley's avatar Sean Farley
Browse files

push: add tests for unsafe ssh url (SEC)

parent 0ee42a0df5be
No related branches found
No related tags found
Loading
......@@ -316,3 +316,22 @@
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
SEC: check for unsafe ssh url
$ hg -R test-revflag push 'ssh://-oProxyCommand=touch${IFS}owned/path'
pushing to ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path
abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path'
[255]
$ hg -R test-revflag push 'ssh://%2DoProxyCommand=touch${IFS}owned/path'
pushing to ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path
abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path'
[255]
$ hg -R test-revflag push 'ssh://fakehost|shellcommand/path'
pushing to ssh://fakehost%7Cshellcommand/path
abort: potentially unsafe url: 'ssh://fakehost|shellcommand/path'
[255]
$ hg -R test-revflag push 'ssh://fakehost%7Cshellcommand/path'
pushing to ssh://fakehost%7Cshellcommand/path
abort: potentially unsafe url: 'ssh://fakehost|shellcommand/path'
[255]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment