-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fixed validation of subscriber_parameters with string_ids true in vid… #2297
Conversation
Thanks for your contribution, @ZeXtrasJay! Please make sure you sign our CLA, as it's a required step before we can merge this. |
Mh I don't think that's the way to go. We already have definitions of feed as integer or string:
For all requests that involve a |
@lminiero I've updated the PR, but i'm not 100% sure it's what you meant |
Actually I think the only thing you need to do in this patch is removing |
@lminiero |
plugins/janus_videoroom.c
Outdated
@@ -1670,7 +1670,7 @@ static struct janus_json_parameter subscriber_parameters[] = { | |||
{"temporal_layer", JSON_INTEGER, JANUS_JSON_PARAM_POSITIVE}, | |||
}; | |||
static struct janus_json_parameter subscriber_stream_parameters[] = { | |||
{"feed", JANUS_JSON_INTEGER, JANUS_JSON_PARAM_REQUIRED | JANUS_JSON_PARAM_POSITIVE}, | |||
//~ {"feed", JANUS_JSON_INTEGER, JANUS_JSON_PARAM_REQUIRED | JANUS_JSON_PARAM_POSITIVE}, |
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.
Please remove the line entirely, rather than just commenting it out.
Good catch, it was in the previous error management code but not here, thanks 👍 |
…s in janus_vdeoroom.c since it's already validated independently
Removed the line 👍 |
Thanks, merging then! ✌️ |
#2297) * Removed validation of "feed" parameter of subscriber_stream_parameters in janus_vdeoroom.c since it's already validated independently * Fixed memory leak in janus_videoroom.c in case "feed_id" parameter is invalid Co-authored-by: Davide Baldo <[email protected]>
#2297) * Removed validation of "feed" parameter of subscriber_stream_parameters in janus_vdeoroom.c since it's already validated independently * Fixed memory leak in janus_videoroom.c in case "feed_id" parameter is invalid Co-authored-by: Davide Baldo <[email protected]>
#2297) * Removed validation of "feed" parameter of subscriber_stream_parameters in janus_vdeoroom.c since it's already validated independently * Fixed memory leak in janus_videoroom.c in case "feed_id" parameter is invalid Co-authored-by: Davide Baldo <[email protected]>
It seems the field "feed" inside stream is always validated as a integer, while it could also be a string.