Summary: | File pickers and Dolphin show icon based on file extension, not contents or MIME type | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Jeffrey <eljefedelito> |
Component: | general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | frank78ac |
Priority: | NOR | ||
Version First Reported In: | 16.12.2 | ||
Target Milestone: | --- | ||
Platform: | Debian unstable | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Jeffrey
2015-08-06 13:44:47 UTC
First of all, thanks for the bug report. (In reply to Jeffrey G Thomas from comment #0) > Linux, we're told, doesn't rely on file extensions and that those are only a part > of the name. Could you please provide a link to the source of this misinformation? If you want to know how mime types of files are to be determined on systems that respect the "shared mime info" specification, please read http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-0.18.html You will see that applications which respect the specification MUST use the extension to determine the mime type, and only read the file contents if the extension is not sufficient to determine the mime type unambiguously. > Example of this common understanding, > > The operating system seems to know what files are without relying on the > > file extension — it does this using MIME types. > http://www.howtogeek.com/192628/mime-types-explained-why-linux-and-mac-os-x- > dont-need-file-extensions/ A quote from this article: "When you open a file on Linux or Mac OS X, the operating system doesn’t just rely on the file extension." Please note the word "just"! > KDE has this same unfortunate behavior as MSWindows; changing a file's > written extension changes both the displayed icon and changes the default > application that opens a file. As I said, this is the behavior that is mandated by the shared mime info specification. This is nothing that KDE can change on its own. > The MIME type is not used and this puts > users at risk for opening files within the wrong application, possibly > opening buffer overruns or other attack vectors. Sorry, but if there is a buffer overrun or a similar security vulnerability in an application that is used to open a file, then this is a bug in that application that should be reported accordingly. And if there are such security vulnerabilities in an application, then using files with extensions that simulate incorrect mime types is not needed to exploit the vulnerability. Therefore, what you suggest does not provide any additional security from my point of view. > This is a security risk, an inaccurate behavior of the software that can do > better, and an inconvenience that users must have the files named correctly. If you really feel strongly about this issue, then please discuss this with the shared-mime-info maintainers: http://freedesktop.org/wiki/Software/shared-mime-info/ |