Commit 9eb3099e authored by Filip Roséen's avatar Filip Roséen Committed by Thomas Guillem

access/ftp: do not log sensitive information

PASS and ACCT are by their definition sensitive data, as such we
should not log their payload when such requests are sent.

These changes simply censors the payload, as well as the number of
bytes sent (so that the length of the payload is not leaked).

fixes #17440
Signed-off-by: Thomas Guillem's avatarThomas Guillem <>
parent e44cdded
......@@ -177,7 +177,11 @@ static int ftp_SendCommand( vlc_object_t *obj, access_sys_t *sys,
if( unlikely(val == -1) )
return -1;
msg_Dbg( obj, "sending request: \"%.*s\" (%d bytes)", val - 2, cmd, val );
if( strncmp( cmd, "PASS ", 5 ) && strncmp( cmd, "ACCT ", 5 ) )
msg_Dbg( obj, "sending request: \"%.*s\" (%d bytes)", val-2, cmd, val );
msg_Dbg( obj, "sending request: \"%.*s XXXX\" (XX bytes)", 4, cmd );
if( ((sys->cmd.p_tls != NULL)
? vlc_tls_Write( sys->cmd.p_tls, cmd, val )
: net_Write( obj, sys->cmd.fd, cmd, val )) != val )
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