[Portland-bugs] [Bug 104849] New: Unquoted directory in desktop_file_to_binary of xdg-mime creates errors when filename contains forbidden characters

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jan 30 07:42:15 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=104849

            Bug ID: 104849
           Summary: Unquoted directory in desktop_file_to_binary of
                    xdg-mime creates errors when filename contains
                    forbidden characters
           Product: Portland
           Version: unspecified
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: minor
          Priority: medium
         Component: xdg-utils
          Assignee: portland-bugs at lists.freedesktop.org
          Reporter: info at dmeijboom.nl

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
```

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/portland-bugs/attachments/20180130/f8e2e124/attachment.html>


More information about the Portland-bugs mailing list