-
Notifications
You must be signed in to change notification settings - Fork 1.8k
webui: url decode POST values; fix seeking #38
Conversation
@Underground78: can you review this tonight? |
@XhmikosR Oh yeah, I'm actually matching against the string literal |
Allright, so just update the patch when you can and force push. |
I will have a better look tonight but I think that it might be better to actually URL decode the param and keep the separator "free". |
@Underground78 I agree. I'll look around to see if we have an existing function for that. |
I added url decoding of parameter values in I used This is my first time using ATL/MFC so let me know if you think there's a better way. |
Hmm I need to double check if we aren't doing UrlDecode twice in some places with that commit. Also I think the %c should stay as it was. |
Yeah, I found this just now. It seems like only the In the meantime I'll change my commit to use the existing function though ( |
Oh, and do you want me to revert to the I don't know to be honest, I'll defer to your experience. If you want me to revert to |
Yeah I prefer if we keep the %c since it's less restrictive and we don't really care about what the separator is. |
Ah I understand. I'll revert that hunk. |
Merged (243e149), thanks for your contribution. |
Sure, glad I could help. |
In the webui, I noticed the seeking wasn't working correctly, it would always seek to 3 minutes and some seconds, regardless of the video.
I took a look at
CWebClientSocket::OnCommand
inWebClientSocket.cpp
which handles the seeking and I noticed it was parsing theposition
parameter as if it were already url decoded, but in fact it wasn't.I changed the parsing to take into account the url encoded colons (
%3A
), it still supports the optional milliseconds parameter. I also did away with theTCHAR c
variable which was used as a placeholder to parse the colons.This is my first contribution, so let me know if there's something I should do differently.