lagrange icon indicating copy to clipboard operation
lagrange copied to clipboard

Lagrange crashes/locks-up for binary files incorrectly sent as "text/gemini`

Open acidus99 opened this issue 2 years ago • 0 comments

There are files in Geminispace incorrectly served with a text/gemini MIME type that are really binaries. Lagrange crashes, locks up, or becomes very slow when loading these URLs, depending on the version/platform (I've seen all 3 happen).

Here is a 14 MB Linux ELF executable, sent with an incorrect text/gemini MIME type

gemini://mkl-wlod.srht.site/repo/tree/scripts/.local/bin/gmnigit

As a fix, as mention in #600 you could use the MIME sniffing standards "mislabeled binary resource" rules to detect when text/gemini (and really any text/* MIME type) isn't really text, and not attempt to render it.

acidus99 avatar Jun 14 '23 18:06 acidus99