Bug 86028 - xdg-open shell script contains bash code
Summary: xdg-open shell script contains bash code
Status: RESOLVED FIXED
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-08 09:45 UTC by Yuri
Modified: 2015-09-16 15:08 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
xdg-open-printf.diff (790 bytes, patch)
2015-09-13 07:59 UTC, Per Olofsson
Details | Splinter Review

Description Yuri 2014-11-08 09:45:40 UTC
xdg-open (interpreted by /bin/sh) contains this line:
file="$(printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')")"

This syntax is for bash, and not for the regular shell.
It fails on FreeBSD, where sh!=bash (unlike on linux)

This line should be fixed to work with the regular shell.

xdg-utils-1.0.2.20130919
Comment 1 Per Olofsson 2015-09-13 07:59:11 UTC
Created attachment 118232 [details] [review]
xdg-open-printf.diff

Here's a patch from Debian that fixes the bug.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.