-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
play plugin: $playlist marker for precise control where the playlist … #4728
base: master
Are you sure you want to change the base?
Conversation
…file is placed in the command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall! But it would be nice to use proper debug logging so the messages are suppressed by default. Also, could you please add a quick changelog entry?
Cool; thanks for moving this along! It looks like there are a couple of suggestions from the style checker tool. Also, it occurs to me after thinking about the code for a moment that there could be problems with shell escaping. Do you think it would make sense to pass each of the |
hmm, from skipping over I see With Then in IF that is so, I see no security problem as these strings never get handed to a shell. It can cause 'file not found' issues when playing ... For that extra robustness I would change Is that what you are after? ... i guess this would create the same problems it the user handles quoting himself in the config. Would be a don't-ever-think-about-quoting config then. |
thinking some more I'll probably have to unquote again right before So quoting may really only be able to improve the splitting in case (tell me if I get this totally wrong - I dont do much with python, really) |
I think the main thing is that, when we eventually called |
…file is placed in the command
…file is placed in the command
…eature/PLS_MARKER
hello, sorry for the long delay, i was otherwise busy this branch / PR is now rebased upon the current master and should just merge I did more digging in how and where to make use of If To my understanding there is no chance of unintentionally running into a escaping problem. |
Consider the case where the config is: play:
command: mpv $playlist So the os.execlp(['mpv', 'mpv', '/foo/bar']) However, if the playlist path is os.execlp(['mpv', 'mpv', '/foo/bar', 'baz/qux']) …and the command will see the wrong number of arguments. Does this make sense? |
…mmand_str can not break it appart
…eature/PLS_MARKER
yes, that could happen if a space or something happens to be in that tmp dir path -> I added a I don't see how to properly quote the regarding the failed tests: think that wasn't me, some package server was unreachable |
Thanks! Since it seems like somewhere where things could easily go wrong, maybe it would be instructive to have a few tests to show that this is working correctly in any configuration setup we can think of? |
how to implement these, in general? i think the main imponderables are to test As for the library: I dont know. Does some sort of mock-library exist in the tests already? Something with weird characters that are known to cause trouble? |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I will bring it up to master over the next days. Regarding the security: i still have no idea how to effectively improve it and dont see a problem either. It works flawless for me since published. |
…file is placed in the command
Description
see included doc; placing the playlist filename at the end of command just isn't working for all players
I have this in use with
mpv
To Do
docs/changelog.rst
near the top of the document.)