File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 551551
552552 //** Customise the port ISPConfig runs on
553553 $ ispconfig_vhost_port = $ inst ->free_query ('ISPConfig Port ' , '8080 ' ,'ispconfig_port ' );
554- $ conf ['interface_password ' ] = $ inst ->free_query ('Admin password ' , 'admin ' ,'ispconfig_admin_password ' );
555- if ($ conf ['interface_password ' ] != 'admin ' ) {
554+ $ temp_admin_password = str_shuffle (bin2hex (openssl_random_pseudo_bytes (4 )));
555+ $ conf ['interface_password ' ] = $ inst ->free_query ('Admin password ' , $ temp_admin_password , 'ispconfig_admin_password ' );
556+ if ($ conf ['interface_password ' ] != $ temp_admin_password ) {
556557 $ check = false ;
557558 do {
558559 unset($ temp_password );
563564 }
564565 unset($ check );
565566 unset($ temp_password );
567+ unset($ temp_admin_password );
566568 if ($ conf ['apache ' ]['installed ' ] == true ) $ conf ['apache ' ]['vhost_port ' ] = $ ispconfig_vhost_port ;
567569 if ($ conf ['nginx ' ]['installed ' ] == true ) $ conf ['nginx ' ]['vhost_port ' ] = $ ispconfig_vhost_port ;
568570 unset($ ispconfig_vhost_port );
Original file line number Diff line number Diff line change 1-
Original file line number Diff line number Diff line change 44$ conf ['start_session ' ] = false ;
55require_once '../../lib/app.inc.php ' ;
66
7- $ app ->load ('json_handler ' );
7+ if ($ conf ['demo_mode ' ] == true ) $ app ->error ('This function is disabled in demo mode. ' );
8+
9+ $ app ->load ('json_handler,getconf ' );
10+
11+ $ security_config = $ app ->getconf ->get_security_config ('permissions ' );
12+ if ($ security_config ['remote_api_allowed ' ] != 'yes ' ) die ('Remote API is disabled in security settings. ' );
13+
814$ json_handler = new ISPConfigJSONHandler ();
915$ json_handler ->run ();
1016
You can’t perform that action at this time.
0 commit comments