[vlc-devel] [PATCH] keystore: accept empty username
Thomas Guillem
thomas at gllm.fr
Wed Sep 2 11:17:11 CEST 2020
On Tue, Sep 1, 2020, at 16:40, Alexandre Janniaux wrote:
> Hi,
>
> LGTM for the fix.
>
> Maybe is_credential_valid can be implemented with a new
> capability `keystore validation` which could be implemented
> for each protocol scheme?
I think each module could handle that themselves.
>
> Regards,
> --
> Alexandre Janniaux
> Videolabs
>
> On Tue, Sep 01, 2020 at 11:01:15AM +0200, Thomas Guillem wrote:
> > The http protocol accepts empty username. Other protocols may not accept it.
> > This will result on a fail of the login function, leaving the possibility to
> > try a new login.
> >
> > Fixes #25074
> > ---
> > src/misc/keystore.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/src/misc/keystore.c b/src/misc/keystore.c
> > index b5b4cc7e50e..d58e8dea982 100644
> > --- a/src/misc/keystore.c
> > +++ b/src/misc/keystore.c
> > @@ -196,8 +196,7 @@ find_closest_path(vlc_keystore_entry *p_entries, unsigned i_count,
> > static bool
> > is_credential_valid(vlc_credential *p_credential)
> > {
> > - if (p_credential->psz_username && *p_credential->psz_username != '\0'
> > - && p_credential->psz_password)
> > + if (p_credential->psz_username && p_credential->psz_password)
> > return true;
> > p_credential->psz_password = NULL;
> > return false;
> > --
> > 2.28.0
> >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list