Daemon: Added check for empty data
authorMichael <heluecht@pirati.ca>
Mon, 3 Feb 2020 00:13:09 +0000 (00:13 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 3 Feb 2020 00:13:09 +0000 (00:13 +0000)
src/Util/ExAuth.php

index 22ac020..e210208 100644 (file)
@@ -73,6 +73,11 @@ class ExAuth
                        }
 
                        $iHeader = fgets(STDIN, 3);
+                       if (empty($iHeader)) {
+                               $this->writeLog(LOG_ERR, 'empty stdin');
+                               return;
+                       }
+
                        $aLength = unpack('n', $iHeader);
                        $iLength = $aLength['1'];