mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
- Only request "none" cipher after auth has succeeded
--HG-- branch : insecure-nocrypto
This commit is contained in:
12
cli-auth.c
12
cli-auth.c
@@ -257,13 +257,9 @@ void cli_auth_try() {
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_CLI_INTERACT_AUTH
|
||||
#if defined(DROPBEAR_NONE_CIPHER) && !defined(ALLOW_NONE_PASSWORD_AUTH)
|
||||
if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
|
||||
fprintf(stderr, "Sorry, I won't let you use interactive auth unencrypted.\n");
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (!finished && ses.authstate.authtypes & AUTH_TYPE_INTERACT) {
|
||||
} else if (!finished && ses.authstate.authtypes & AUTH_TYPE_INTERACT) {
|
||||
if (cli_ses.auth_interact_failed) {
|
||||
finished = 0;
|
||||
} else {
|
||||
@@ -275,13 +271,9 @@ void cli_auth_try() {
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_CLI_PASSWORD_AUTH
|
||||
#if defined(DROPBEAR_NONE_CIPHER) && !defined(ALLOW_NONE_PASSWORD_AUTH)
|
||||
if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
|
||||
fprintf(stderr, "Sorry, I won't let you use password auth unencrypted.\n");
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (!finished && ses.authstate.authtypes & AUTH_TYPE_PASSWORD) {
|
||||
} else if (!finished && ses.authstate.authtypes & AUTH_TYPE_PASSWORD) {
|
||||
cli_auth_password();
|
||||
finished = 1;
|
||||
cli_ses.lastauthtype = AUTH_TYPE_PASSWORD;
|
||||
|
||||
Reference in New Issue
Block a user