Jelajahi Sumber

Update to fix error on hestiacp main (#3087)

* Update to fix error on hestiacp main

This error does not throw in Hestia direct access (8083) but it's in the logs, when cp template is applied, there's an error 500 because of this missing piece of code in main.

* Fix prettier output

Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
TLCD96 3 tahun lalu
induk
melakukan
c8f1ebfe08
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      web/inc/main.php

+ 1 - 1
web/inc/main.php

@@ -66,7 +66,7 @@ if (!isset($_SESSION["user_combined_ip"])) {
 }
 
 // Checking user to use session from the same IP he has been logged in
-if ($_SESSION["user_combined_ip"] != $user_combined_ip) {
+if ($_SESSION["user_combined_ip"] != $user_combined_ip && isset($_SESSION["user"])) {
 	$v_user = quoteshellarg($_SESSION["user"]);
 	$v_session_id = quoteshellarg($_SESSION["token"]);
 	exec(HESTIA_CMD . "v-log-user-logout " . $v_user . " " . $v_session_id, $output, $return_var);