Bug 104849 - Unquoted directory in desktop_file_to_binary of xdg-mime creates errors when filename contains forbidden characters
Summary: Unquoted directory in desktop_file_to_binary of xdg-mime creates errors when ...
Status: RESOLVED MOVED
Alias: None
Product: xdgmime
Classification: Unclassified
Component: xdgmime (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Jonathan Blandford
QA Contact:
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-01-30 07:42 UTC by Dillen Meijboom
Modified: 2018-10-13 10:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Dillen Meijboom 2018-01-30 07:42:15 UTC
In the `desktop_file_to_binary` function of xdg-mime (version 1.1.2) line 323/325 there is an if statement in bash which checks if a directory exists (at least I think so). It uses an unquoted path which in my case contains forbidden characters in bash. Quoting this path fixes the issue.

Original source (line 323):
```
if [ -r $dir/applications/$vendor/$app ]; then
```

Fixed source (line 323):
```
if [ -r "$dir/applications/$vendor/$app" ]; then
```
Comment 1 GitLab Migration User 2018-10-13 10:33:58 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdgmime/issues/13.


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.