]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
Don't start session if we already have one. Actually, do we need this at all?
authorBram Matthys <redacted>
Thu, 13 Apr 2023 15:54:34 +0000 (17:54 +0200)
committerBram Matthys <redacted>
Thu, 13 Apr 2023 15:54:34 +0000 (17:54 +0200)
Ok maybe for non-auth but that one bails out immediately as well :D

api/common_api.php

index e28bccbdf25cdc10059435ef26d133da51edb01a..3681d0a65ae121247600327b44b432149fc9cd6d 100644 (file)
@@ -1,7 +1,8 @@
 <?php
 include "../common.php";
 
-session_start();
+if(session_status() !== PHP_SESSION_ACTIVE) session_start();
+
 if (!isset($_SESSION['id']))
        die("Access denied");