[FFmpeg-devel] [PATCH] Don't include user/pass in the RTSP request URLs
Martin Storsjö
martin
Tue Mar 23 09:05:04 CET 2010
On Mon, 22 Mar 2010, Ronald S. Bultje wrote:
> On Mon, Mar 22, 2010 at 3:02 PM, Martin Storsj? <martin at martin.st> wrote:
> > When using username/password in RTSP, the username and passwords are part
> > of the URL set to s->filename. Each RTSP request includes the whole URL,
> > but the username/password doesn't need to be included in plaintext there
> > (especially if using digest auth...).
> >
> > Additionally, the current code for stripping out the RTSP specific options
> > (?tcp/udp etc) modifies the user-set s->filename field, which iirc is a
> > no-no. This patch makes it update the local copy in the path buffer, used
> > for reconstructing rt->control_uri.
>
> Thanks for looking at this.
>
> I'm going to be honest that the current code looks iffy at best and
> might be / is probably wrong. Could you, when convenient, test that:
> - If the URI contains ? by itself, and we add ?tcp, it works (might
> require changing strchr to strrchr)
As far as I know, that isn't allowed, but I changed it to use strrchr
anyway, in a separate commit.
> - that things like ?tcp&udp&multicast are parsed correctly (and have
> the intended effect)
Actually, the code just set the mask to the wanted value, not ORing it in.
Fixed this, as a separate commit.
> If that works, feel free to commit, because this patch clearly does
> better than the current code.
Committed.
// Martin
More information about the ffmpeg-devel
mailing list