Bug 260677

Summary: Dolphin obeys unicode RLO / RTL override char in filenames
Product: [Applications] dolphin Reporter: Felix <info>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: glogow, justin.zobel, mail, nate
Priority: NOR Keywords: rtl
Version: 20.08.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=437361
Latest Commit: Version Fixed In:

Description Felix 2010-12-19 04:14:34 UTC
Version:           4.5.4 (using KDE 4.5.4) 
OS:                Linux

Suppose you have the following filename:

<U+202E>txt.windows_virus.exe

(<U+202E> is the unicode character that overrides text direction to be right-to-left.) Konqueror will display this filename as:

exe.suriv_swodniw.txt

If the desktop environment and/or WINE and/or the distribution's package manager automatically creates a MIME entry for windows executables (most do), double-clicking this file (which appears to have a .txt extension) will run it in WINE.

Note that WINE will run files even if they do not have execute permission set, so a file could be downloaded and opened by a user expecting a .txt file.

Mitigated somewhat by the fact that a .exe file has a different icon from a .txt file.

Proposed resolution:
A file manager should ignore text direction override characters in filenames.

Reproducible: Always

Steps to Reproduce:
Create a filename with a RTL override character in it (called RLO or <U+202E>).

Actual Results:  
Konqueror displays the filename with its text reversed. It appears to have the reversed text as its name (and its initial characters as its extension), and there is no indication that it contains a text direction override character.

Expected Results:  
Konqueror should either make it clear to the user that the text of this filename is actually reversed, or it should ignore the override character (perhaps displaying it as a box).

The original report comes from the AVG antivirus blog about a similar problem in Windows:

http://viruslab.blog.avg.com/2010/12/directly-executable-txt-yes.html
Comment 1 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:19:55 UTC
Resetting assignee to default as per bug #305719
Comment 2 Julian Steinmann 2018-02-13 21:32:15 UTC
If I create a file called "<U+202E>txt.windows_virus.exe" in Dolphin 17.12.2, the file name is not reversed because the RLO / RTL override char's don't work in Dolphin. Thanks to this fact, the user can clearly tell the correct ending of the file -> bug can be closed :)
Comment 3 Julian Steinmann 2018-02-14 16:21:29 UTC
Closing unless somebody can provide a valid example.
Comment 4 Jan-Marek Glogowski 2018-02-15 10:01:35 UTC
$ touch $'Hello_\u202egnp.js'
$ ls -l Hello_gnp.js
$ dolphin .

=> Hello_sj.png
Comment 5 Julian Steinmann 2018-02-15 10:37:20 UTC
Okay, apparently this bug persists if the file is added via bash instead of Dolphin. Thanks for the example @Jan-Marek
Comment 6 Justin Zobel 2020-11-13 06:58:29 UTC
Still an issue as of 21.03.70.