<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Argument injection in xdg-open open_envvar"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103807#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Argument injection in xdg-open open_envvar"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103807">bug 103807</a>
from <span class="vcard"><a class="email" href="mailto:gabriel.corona@enst-bretagne.fr" title="Gabriel Corona <gabriel.corona@enst-bretagne.fr>"> <span class="fn">Gabriel Corona</span></a>
</span></b>
<pre>Karol, this happens because of command expansion in your shell, before xdg-open
is even called:
false "<a href="https://google.com$(touch">https://google.com$(touch</a> /tmp/testfile)"
This command also creates a temporary file which demonstrates that this is not
a problem with xdg-open.
The correct way to try this is to use single quotes in order to prevent command
expansion in your shell:
BROWSER="firefox %s" xdg-open '<a href="https://google.com$(touch">https://google.com$(touch</a> /tmp/testfile)'
This command does not create a temporary file.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>