Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There are two broad types of attack vectors, those that target a program, and those that target a person.

Most Unicode attack vectors seem to target people, they are ways to obscure from a person the true intention of what something is. As a developer it’s our job to try and mitigate this through how we display the data, warn about risks and block particular attacks. So it’s about working out how to prevent a user from making a mistake.

It seems to me in this case obviously Unicode became “a thing” after the development of a file extension. Clearly if it had been the other way around the file extension would have no meaning, maybe that’s what we need to move towards, store that metadata elsewhere on the file system.

Fundamentally Unicode from and “untrusted” origin shouldn’t be trusted in an executable context.



We don't need to store the metadata differently. The on-disk format is still unambiguous: the part after the last dot is the extension. It's only the graphical display that is ambiguous, because the last dot is not necessarily the rightmost dot. This is easily solved with a UI change, e.g. move the file extension from the "file name" column to a separately rendered "file extension" column.

One could even translate the file extension into something more user-friendly (e.g. .exe -> Application), making it a "file type" column. Which is of course what Windows Explorer has been doing for decades already. Of course, that results in everyone turning the classic file extension back on...


I think one of the troubles here is the difference between a GUI and a command line type app. Very true on a GUI you can hide the extension and display file type in a column, which is what Windows and MacOS both increasingly do. However on the command line its still fundamentally part of the filename, to fix that is a larger job and my suggestion is that it should not be part of he filename, but metadata on the file/filesystem.

The other problem with hiding the extension is that you then have "file name" collisions, two files will appear to have the same name but only differentiate by the "type". I think that's wrong.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: