Explorar o código

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 %!s(int64=3) %!d(string=hai) anos
pai
achega
c8f1ebfe08
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);