Trumbowyg: Image upload : sanitize filename ?

Created on 13 Apr 2017  ·  3Comments  ·  Source: Alex-D/Trumbowyg

Informations

Browser + version: Chrome & Safari, latest version
OS: MacOS Sierra
Resolution: Retina screen (13")

When you upload a file with some special characters, the picture doesn't not show up in Safari, but it works in Chrome.

Is there a way to sanitize filename before sending file to the server ?

How to reproduce the bug?

Upload a picture named "Capture d’écran 2017-04-10 à 15.42.37.png", and it will work on Chrome, but not on Safari.

question

Most helpful comment

You should make a proxy. Never trust client.

All 3 comments

You should do that server side.

Hm, but what if I'm directly uploading to S3 or another object storage service ? I don't have access to the server side part, and can't implement a sanitize script.

Can't we setup a hook or something in the plugin to rename the file ?

You should make a proxy. Never trust client.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dohomi picture dohomi  ·  5Comments

DirkOlten picture DirkOlten  ·  3Comments

mur-wtag picture mur-wtag  ·  3Comments

KiarashS picture KiarashS  ·  3Comments

HyperBlade picture HyperBlade  ·  6Comments