소스 검색

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 년 전
부모
커밋
c8f1ebfe08
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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);