Can anyone help with this error I've been getting since upgrading mathstodon.xyz to 4.2?
In Firefox, I get an error "downloadable font: rejected by sanitizer" when downloading mathstodon.xyz/packs/media/fon.
The Network tab says only 948B were transferred; the file is 77KB on disk. Because it's a font, Firefox won't show me the received raw data in the Response tab.
When I redo the request as a curl command, I get the whole file. I didn't change the nginx config when upgrading, and other woff fonts have loaded.
I'm at a loss!

Follow

@christianp

This sounds like _when the thing is downloaded for use a font_ Firefox considers it invalid.

github.com/mozilla/gecko-dev/b is where the error is likely generated, and github.com/mozilla/gecko-dev/b is likely where it's caused.

That seems to refer to github.com/khaledhosny/ots, which seems to have a CLI tool to sanitize a font: github.com/khaledhosny/ots/blo

If I have time in the evening I might try building it and running it against the font you have to see what the problem is.

@robryk I built OTS, and ran `ots-sanitize cmunss-0745961ddcecad8aa4fd00b9e39cce11.woff`. It gave some "glyph bbox incorrect" warnings, but finished by saying it'd sanitized the file successfully. There's definitely something just in Firefox that's making it not download the file correctly when used as a font.
Time to stare very hard at my CORS settings

@christianp maybe try replacing the font with its sanitized version?

@robryk I think it'd be a massive coincidence that this stopped working when I updated the mastodon code but didn't change the font file

@christianp do you know that this problem wasn't happening earlier? Might it have been masked by something, which then changed with the mastodon update and stopped masking it? (For example, maybe there is a fallback to a CDN, which is now made infeasible by a change in cors.)

@christianp also, I strongly doubt it has anything to do with cors. Font sanitization is there to protect the computer from the websites.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.