Commit 3ea724d3 authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

ftp: fix credentials regression

Normal user credentials could not be found since the "anonymous" never matched
in keystore.

This is a partial revert of 93664659
Since we now log anonymous per default. A proper fix need a vlc_credential
change that we won't do now.

(cherry picked from commit 8360f356)
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 21ee49f9
......@@ -456,19 +456,15 @@ static int Login( vlc_object_t *p_access, access_sys_t *p_sys, const char *path
NULL, NULL );
do
{
if( credential.psz_username != NULL )
{
if( LoginUserPwd( p_access, p_sys, credential.psz_username,
credential.psz_password, &b_logged ) != 0
|| b_logged )
break;
}
else
{
/* No crendential specified: show the dialog with a "anonymous"
* user pre-filled */
credential.psz_username = "anonymous";
}
const char *psz_username = credential.psz_username;
if( psz_username == NULL ) /* use anonymous by default */
psz_username = "anonymous";
if( LoginUserPwd( p_access, p_sys, psz_username,
credential.psz_password, &b_logged ) != 0
|| b_logged )
break;
}
while( vlc_credential_get( &credential, p_access, "ftp-user", "ftp-pwd",
LOGIN_DIALOG_TITLE, LOGIN_DIALOG_TEXT,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment