Bug 104849

Summary: Unquoted directory in desktop_file_to_binary of xdg-mime creates errors when filename contains forbidden characters
Product: xdgmime Reporter: Dillen Meijboom <info>
Component: xdgmimeAssignee: Jonathan Blandford <jrb>
Status: RESOLVED MOVED QA Contact:
Severity: minor    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

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.