Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
`playlist index ?` returns any value sent to it, doesn't validate input #207
I just ran into a a case twice (although I don't know how to reliably reproduce), where issuing the CLI command
Now, the docs for this command say:
How am I supposed to interpret the value
There's an unlikely chance that this is an actual bug in the software, but my guess is that this is an undocumented feature and the bug only lies in the documentation.
Can you reproduce this easily? Because I can't.
If you look at that call, then really this is a very basic handler:
There's no additional "feature" which would add anything. And I certainly can't reproduce this.
What are you running your LMS on? How did you send that query?
Yes, actually I can! A good night's sleep always helps :)
The bug is actually something completely different. If you want me to open another issue or change the content of this one, let me know. Here we go:
I was in fact messing around with some shell scripts I use for basic player control (play/pause/perv/next) that use the HTTP based
Skipping tracks are done by calling
The plus sign (
Now, I did some additional testing, and it seems that anything is accepted as a position value. But if it's not an integer,
If I send a value of
It seems like some input validation would be useful. I haven't tested whether the same problem is there when changing the playlist position via the CLI, but I assume that it's easy for you to tell whether the checks can be implemented in a central place or also need to be done in the CLI.