mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.
http://mixxx.org
Other
4.26k stars 1.24k forks source link

Dragging file from library into another application passes escaped URL if file path has brackets in it #13090

Open jkeen opened 2 months ago

jkeen commented 2 months ago

Bug Description

If I drag a file from Mixxx into another application (in this case, a browser), the URL is escaped if the file path contains a [ or a ]. This causes problems in receiving applications, as the file path will not resolve correctly.

Behavior of dragging and dropping a file from Mixxx into a web page's drop zone:

With brackets in the path

File location on disk: /Users/jeff/Music/Library/Music/Time Life - Classic Country [Disc 1]/01 On The Road Again.mp3

name property of File object in js as received in the event 01%20On%20The%20Road%20Again.mp3

Full path in js
/Users/jeff/Music/Library/Music/Time%20Life%20-%20Classic%20Country/Road%20Songs%20[Disc%201]/01%20On%20The%20Road%20Again.mp3

Without brackets in the path (expected behavior)

File location on disk: /Users/jeff/Music/Library/Music/Time Life - Classic Country/01 On The Road Again.mp3

name property of File object in js as received in the event 01 On The Road Again.mp3

Full path in js
/Users/jeff/Music/Library/Music/Time Life - Classic Country/01 On The Road Again.mp3

The escaped file path causes problems in all receiving apps, and causes the receiving app issues when trying to find the file, causing mysterious errors without a clear reason for its a occurrence. Handling it on the receiving end is not possible in the case of a browser event, as the File object within a drop event has an immutable name property for security purposes.

Version

2.4.0

OS

macOS Sonoma 14.4

jkeen commented 2 months ago

This is somewhat related to the following issues and PRs: