Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML entities in video filenames are decoded before sending request #2095

Open
iw0nderhow opened this issue Dec 6, 2023 · 2 comments
Open
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working

Comments

@iw0nderhow
Copy link

Describe the bug
I can't view any videos with filenames containing HTML entities, e.g. &.

To Reproduce
Steps to reproduce the behavior:

  1. Upload a video.
  2. Rename it to &.mp4.
  3. Open it
  4. Doesn't work

Expected behavior
The video opens.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Firefox 120, macOS 14. Nextcloud 27.1.4.

Browser log

[INFO] viewer: Opening viewer for file  
Object { app: "viewer", uid: "christopher", level: 0, path: "/Downloads/Archiv/&.mp4" }
ConsoleLogger.js:53:18
File info for /Downloads/Archiv/&.mp4 fetched 
Object { filename: "/Downloads/Archiv/&.mp4", basename: "&.mp4", lastmod: "Wed, 06 Dec 2023 19:30:44 GMT", size: 20766733, type: "file", etag: "20da2f45465bb77c597cfd0b65fd6533", mime: "video/mp4", getlastmodified: "Wed, 06 Dec 2023 19:30:44 GMT", getcontenttype: "video/mp4", resourcetype: "", … }
Viewer.vue:608
Error loading /Downloads/Archiv/&.mp4 
error { target: div.plyr.plyr--full-ui.plyr--video.plyr--html5.plyr--fullscreen-enabled.plyr--paused.plyr--stopped, isTrusted: false, detail: {…}, srcElement: div.plyr.plyr--full-ui.plyr--video.plyr--html5.plyr--fullscreen-enabled.plyr--paused.plyr--stopped, currentTarget: div.viewer__file.viewer__file--active, eventPhase: 3, bubbles: true, cancelable: false, returnValue: true, defaultPrevented: false, … }
Mime.js:140:11

Additional context
Add any other context about the problem here.

@iw0nderhow iw0nderhow added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Dec 6, 2023
@skjnldsv
Copy link
Member

skjnldsv commented Dec 7, 2023

I will need a screenshot of your network requests.
Before you do anything, still on the development tools, there is a tab called network. Click on it. Open the file and screenshot the network log like this (scroll at the bottom or make sure we can see the request to your media file):
capture d ecran_2018-09-27_21-49-46

@iw0nderhow
Copy link
Author

Hi! Sorry for the huge delay. This is still an issue in Nextcloud 28. Here's the screenshot:
grafik
The first request is me renaming the file to &.mp4, then I click to view the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants