owncloud / ocis

:atom_symbol: ownCloud Infinite Scale Stack
https://doc.owncloud.com/ocis/next/
Apache License 2.0
1.36k stars 179 forks source link

Special characters are not escaped on upload #9704

Open sladg opened 1 month ago

sladg commented 1 month ago

Describe the bug

When uploading, I'm allowed to upload with non UTF-8 characters. However, when I want to view / download it, I get error 500.

Steps to reproduce

  1. Use aws s3 sync s3://my-bucket ./folder which includes escaped names such as (5_Pavel+Kub%C3%AD%7Fek.pdf or X+19-20/6_Mark%C3%A9ta+Dosoudilov%C3%A1+-+jedin%7F+v%7Fjezd+2020+(k+%7Fervnu).pdf),
  2. Upload folder into OCIS via WebUI - Folder upload,
  3. Try to view the file.

Expected behaviour

Either disallow user to upload such file or sanitise names on upload.

Actual behaviour

File is uploaded keeping its name, however, cannot be viewed.

Additional context

File can be renamed and it starts working then. However, name editor is acting strange when rendering non-compliant characters.

ownCloud v10 has also trouble rendering such characters, however, it allows for displaying them without issue.

OCIS: image

ownCloud 10: image

sladg commented 1 month ago

Related to #8650