Commit b8a24c4a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

FTP cleartext authentication from Petr Vacek.

parent c9c85bef
...@@ -110,6 +110,7 @@ Ondrej Kuda aka Albert <kuda at natur dot cuni dot cz> - HTTP interface tips and ...@@ -110,6 +110,7 @@ Ondrej Kuda aka Albert <kuda at natur dot cuni dot cz> - HTTP interface tips and
Patrick Horn <patrickd0thorn at mindspring d0t com> - DirectShow patch Patrick Horn <patrickd0thorn at mindspring d0t com> - DirectShow patch
Paul Mackerras <paulus at linuxcare.com.au> - AltiVec IDCT and motion Paul Mackerras <paulus at linuxcare.com.au> - AltiVec IDCT and motion
Pavlov Konstantin “thresh” - several Linux build system fixes Pavlov Konstantin “thresh” - several Linux build system fixes
Petr Vacek - FTP cleartext authentication
Philippe Van Hecke <philippe at belnet dot be> - SAP header hash patch Philippe Van Hecke <philippe at belnet dot be> - SAP header hash patch
Pierre Marc Dumuid <pierre.dumuid at adelaide dot edu dot au> - Playlist patches Pierre Marc Dumuid <pierre.dumuid at adelaide dot edu dot au> - Playlist patches
Régis Duchesne <regis at via.ecp.fr> - original VLC code Régis Duchesne <regis at via.ecp.fr> - original VLC code
......
...@@ -123,7 +123,11 @@ static int Connect( access_t *p_access, access_sys_t *p_sys ) ...@@ -123,7 +123,11 @@ static int Connect( access_t *p_access, access_sys_t *p_sys )
msg_Dbg( p_access, "connection accepted (%d)", i_answer ); msg_Dbg( p_access, "connection accepted (%d)", i_answer );
if( p_sys->url.psz_username && *p_sys->url.psz_username )
psz = strdup( p_sys->url.psz_username );
else
psz = var_CreateGetString( p_access, "ftp-user" ); psz = var_CreateGetString( p_access, "ftp-user" );
if( ftp_SendCommand( p_access, "USER %s", psz ) < 0 || if( ftp_SendCommand( p_access, "USER %s", psz ) < 0 ||
ftp_ReadCommand( p_access, &i_answer, NULL ) < 0 ) ftp_ReadCommand( p_access, &i_answer, NULL ) < 0 )
{ {
...@@ -139,7 +143,11 @@ static int Connect( access_t *p_access, access_sys_t *p_sys ) ...@@ -139,7 +143,11 @@ static int Connect( access_t *p_access, access_sys_t *p_sys )
break; break;
case 3: case 3:
msg_Dbg( p_access, "password needed" ); msg_Dbg( p_access, "password needed" );
if( p_sys->url.psz_password && *p_sys->url.psz_password )
psz = strdup( p_sys->url.psz_password );
else
psz = var_CreateGetString( p_access, "ftp-pwd" ); psz = var_CreateGetString( p_access, "ftp-pwd" );
if( ftp_SendCommand( p_access, "PASS %s", psz ) < 0 || if( ftp_SendCommand( p_access, "PASS %s", psz ) < 0 ||
ftp_ReadCommand( p_access, &i_answer, NULL ) < 0 ) ftp_ReadCommand( p_access, &i_answer, NULL ) < 0 )
{ {
......
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