]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Try to fix passwords case in the controller
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 31 May 2022 16:39:44 +0000 (17:39 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 31 May 2022 16:46:49 +0000 (17:46 +0100)
Issue: #4186

src/controller.c

index 43378ec3085bcd53ff13ae3a8693f29ab84b90a3..b72858f0f02386f75d375cc98a2f1c0dd4637e69 100644 (file)
@@ -653,7 +653,7 @@ rspamd_controller_check_password (struct rspamd_http_connection_entry *entry,
                                check_normal = FALSE;
                        }
 
-                       if (ctx->enable_password != NULL) {
+                       if (!check_normal && ctx->enable_password != NULL) {
                                check = ctx->enable_password;
 
                                if (!rspamd_is_encrypted_password (check, &pbkdf)) {
@@ -670,21 +670,9 @@ rspamd_controller_check_password (struct rspamd_http_connection_entry *entry,
                                                        password,
                                                        check, pbkdf, TRUE);
                                }
-
-                               if (check_enable) {
-                                       session->is_enable = TRUE;
-                               }
                        }
                        else {
                                check_enable = FALSE;
-
-                               if (check_normal) {
-                                       /*
-                                        * If no enable password is specified use normal password as
-                                        * enable password
-                                        */
-                                       session->is_enable = TRUE;
-                               }
                        }
                }
        }