File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,15 @@ function authenticate_user(){
4141 if (!empty ($ _SERVER ['HTTP_CF_CONNECTING_IP ' ])){
4242 $ v_ip = escapeshellarg ($ _SERVER ['HTTP_CF_CONNECTING_IP ' ]);
4343 }
44- }
44+ }
45+ if ($ _POST ['user ' ] == 'root ' ){
46+ unset($ _POST ['password ' ]);
47+ unset($ _POST ['user ' ]);
48+ $ error = "<a class= \"error \"> " .__ ('Login with <strong>root</strong> has been disabled ' )."</a> " ;
49+ return $ error ;
50+ }
51+
52+
4553 // Get user's salt
4654 $ output = '' ;
4755 exec (HESTIA_CMD ."v-get-user-salt " .$ v_user ." " .$ v_ip ." json " , $ output , $ return_var );
@@ -89,10 +97,6 @@ function authenticate_user(){
8997 $ error = "<a class= \"error \"> " .__ ('Invalid username or password ' )."</a> " ;
9098 return $ error ;
9199 } else {
92-
93- // Make root admin user
94- if ($ _POST ['user ' ] == 'root ' ) $ v_user = 'admin ' ;
95-
96100 // Get user speciefic parameters
97101 exec (HESTIA_CMD . "v-list-user " .$ v_user ." json " , $ output , $ return_var );
98102 $ data = json_decode (implode ('' , $ output ), true );
You can’t perform that action at this time.
0 commit comments