Bug 14589

Summary: LXDE menu doesn't properly handle field codes from Exec key
Product: Mageia Reporter: Alex Loginov <loginov_alex>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: nicolas.salguero
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: LXDE CVE:
Status comment:
Attachments: Patches for libfm

Description Alex Loginov 2014-11-17 20:28:51 CET
Description of problem:
There is
Exec=ktuberling -caption %c %u
in ktuberling.desktop.
For Russian Name[ru]=ÐаÑÑоÑелÑнÑй паÑенÑ,
so it will be interpretate: run ktuberling with caption ÐаÑÑоÑелÑнÑй and open file with name паÑенÑ.
And I see error like "Cannot open file" and ÐаÑÑоÑелÑнÑй in the caption.

Fix:
Exec=ktuberling -caption "%c" %u

Version-Release number of selected component (if applicable): ktuberling-4.14.2-1.mga5


How reproducible: for languages, which have spaces in Name


Steps to Reproduce:
1. run ktuberling in LXDE from menu


Reproducible: 

Steps to Reproduce:
David Walser 2014-11-18 04:45:17 CET

Assignee: bugsquad => lmenut

Comment 1 Luc Menut 2014-11-19 00:44:05 CET
(In reply to Alex Loginov from comment #0)
> Description of problem:
> There is
> Exec=ktuberling -caption %c %u
> in ktuberling.desktop.
> For Russian Name[ru]=ÐаÑÑоÑелÑнÑй паÑенÑ,
> so it will be interpretate: run ktuberling with caption ÐаÑÑоÑелÑнÑй and
> open file with name паÑенÑ.
> And I see error like "Cannot open file" and ÐаÑÑоÑелÑнÑй in the caption.

This works fine in KDE.
This happens because LXDE menu doesn't properly handle field codes from .desktop Exec key.
LXDE should be fixed.

> 
> Fix:
> Exec=ktuberling -caption "%c" %u

nope, "%c" is against the freedesktop specification for desktop entry.
http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html
"Field codes must not be used inside a quoted argument, the result of field code expansion inside a quoted argument is undefined."

Quotes around %c were removed from KDE .desktop files because they were against the fdo spec.
https://bugs.kde.org/show_bug.cgi?id=318593 
http://lists.kde.org/?l=kde-core-devel&m=136671930217439&w=4

Summary: Wrong Exec= for ktuberling => LXDE menu doesn't properly handle field codes from Exec key
Source RPM: ktuberling => LXDE
Hardware: i586 => All
Assignee: lmenut => bugsquad

Alex Loginov 2014-11-19 08:16:24 CET

CC: (none) => nicolas.salguero

Comment 2 Alex Loginov 2014-12-18 17:29:14 CET
Nicolas, hello,
Will you write patch and/or report to upstream?
Comment 3 Nicolas Salguero 2014-12-19 11:27:05 CET
Hi,

For the moment, I have not been able to find where the launcher and its parser are in the code so I only have reported the bug upstream: https://sourceforge.net/p/lxde/bugs/719/.

Regards.

Nico.
Comment 4 Alex Loginov 2015-01-06 00:56:50 CET
This bug was fixed by upstream.

Nicolas, hello,
Will you create patch now?
Comment 5 Nicolas Salguero 2015-01-06 20:40:16 CET
Created attachment 5791 [details]
Patches for libfm

Hi,

The attached tarball containes the needed patches and the patch for the SPEC file.

I have tested and I have no more the problem with ktuberling, for example.

Best regards.

Nico.
Comment 6 Alex Loginov 2015-01-06 21:16:55 CET
Fixed in libfm-1.2.3-4.mga5.

Nicolas, thank you very much. Your mentor (akien) is waiting you :). We needs maintainer for LXDE.

Resolution: (none) => FIXED
Status: NEW => RESOLVED