mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
avformat/libssh: check the user provided a password before trying to use it
Fixes ticket #6413 Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit 8ddb6820bd52df6ed616abc3d8be200b126aa8c1)
This commit is contained in:
parent
2bc6b9b2a9
commit
ef95789c8c
@ -103,7 +103,7 @@ static av_cold int libssh_authentication(LIBSSHContext *libssh, const char *user
|
||||
}
|
||||
}
|
||||
|
||||
if (!authorized && (auth_methods & SSH_AUTH_METHOD_PASSWORD)) {
|
||||
if (!authorized && password && (auth_methods & SSH_AUTH_METHOD_PASSWORD)) {
|
||||
if (ssh_userauth_password(libssh->session, NULL, password) == SSH_AUTH_SUCCESS) {
|
||||
av_log(libssh, AV_LOG_DEBUG, "Authentication successful with password.\n");
|
||||
authorized = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user