Skip to content

mac/input: pass file paths to load commands as arguments - #18906

Merged
Akemi merged 2 commits into
mpv-player:masterfrom
Akemi:mac_input
Nov 28, 2026
Merged

Akemi merged 2 commits into
mpv-player:masterfrom
Akemi:mac_input

Conversation

@Akemi

@Akemi Akemi commented Nov 25, 2026

Copy link
Copy Markdown
Member

a big oversight on my part.

the function is not interacting with by any objective-c runtime features
and is not necessary.
Comment thread osdep/mac/input_helper.swift Resolved
Comment thread osdep/mac/input_helper.swift Resolved
the Open File, Open URL and Open Playlist menu actions built a command
string by pasting the path between double quotes. paths containing '"'
or ';' could break the parsing of such strings. this could also lead to
possible unwanted command injections, since those string come from
active dynamic user inputs.

add a command(args:) function that builds the command from an argument
list and use it for actions with user input. no string parsing is
involved, so no quoting or escaping is needed.
@Akemi
Akemi merged commit 33b4c05 into mpv-player:master Nov 28, 2026
34 checks passed
@Akemi
Akemi deleted the mac_input branch November 28, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants