/home/techb158/ileadtechnology.com/vendor/mpdf/mpdf/src
NameSizeModeActions
Barcode/-0755rm
Color/-0755rm
Config/-0755rm
Container/-0755rm
Conversion/-0755rm
Css/-0755rm
Exception/-0755rm
File/-0755rm
Fonts/-0755rm
Gif/-0755rm
Http/-0755rm
Image/-0755rm
Language/-0755rm
Log/-0755rm
Output/-0755rm
Pdf/-0755rm
Shaper/-0755rm
Tag/-0755rm
Utils/-0755rm
Writer/-0755rm
AssetFetcher.php36060644editdlrm
Barcode.php60590644editdlrm
Cache.php23740644editdlrm
CssManager.php782470644editdlrm
DirectWrite.php149290644editdlrm
Form.php690100644editdlrm
FpdiTrait.php118730644editdlrm
functions-dev.php1650644editdlrm
functions.php5210644editdlrm
Gradient.php348750644editdlrm
HTMLParserMode.php7310644editdlrm
Hyphenator.php50870644editdlrm
Mpdf.php9609200644editdlrm
MpdfException.php730644editdlrm
MpdfImageException.php820644editdlrm
Otl.php2543480644editdlrm
OtlDump.php1670100644editdlrm
PageBox.php10490644editdlrm
PageFormat.php23910644editdlrm
ServiceFactory.php59290644editdlrm
SizeConverter.php33880644editdlrm
Strict.php15350644editdlrm
TableOfContents.php334510644editdlrm
Tag.php74020644editdlrm
TTFontFile.php1733780644editdlrm
TTFontFileAnalysis.php145610644editdlrm
Ucdn.php1319570644editdlrm
Watermark.php490644editdlrm
WatermarkImage.php11960644editdlrm
WatermarkText.php8870644editdlrm
Edit: /home/techb158/ileadtechnology.com/vendor/mpdf/mpdf/src/AssetFetcher.php (3606B)
mpdf = $mpdf; $this->contentLoader = $contentLoader; $this->http = $http; $this->logger = $logger; } public function fetchDataFromPath($path, $originalSrc = null) { /** * Prevents insecure PHP object injection through phar:// wrapper * @see https://github.com/mpdf/mpdf/issues/949 * @see https://github.com/mpdf/mpdf/issues/1381 */ $wrapperChecker = new StreamWrapperChecker($this->mpdf); if ($wrapperChecker->hasBlacklistedStreamWrapper($path)) { throw new \Mpdf\Exception\AssetFetchingException('File contains an invalid stream. Only ' . implode(', ', $wrapperChecker->getWhitelistedStreamWrappers()) . ' streams are allowed.'); } if ($originalSrc && $wrapperChecker->hasBlacklistedStreamWrapper($originalSrc)) { throw new \Mpdf\Exception\AssetFetchingException('File contains an invalid stream. Only ' . implode(', ', $wrapperChecker->getWhitelistedStreamWrappers()) . ' streams are allowed.'); } $this->mpdf->GetFullPath($path); return $this->isPathLocal($path) || ($originalSrc !== null && $this->isPathLocal($originalSrc)) ? $this->fetchLocalContent($path, $originalSrc) : $this->fetchRemoteContent($path); } public function fetchLocalContent($path, $originalSrc) { $data = ''; if ($originalSrc && $this->mpdf->basepathIsLocal && $check = @fopen($originalSrc, 'rb')) { fclose($check); $path = $originalSrc; $this->logger->debug(sprintf('Fetching content of file "%s" with local basepath', $path), ['context' => LogContext::REMOTE_CONTENT]); return $this->contentLoader->load($path); } if ($path && $check = @fopen($path, 'rb')) { fclose($check); $this->logger->debug(sprintf('Fetching content of file "%s" with non-local basepath', $path), ['context' => LogContext::REMOTE_CONTENT]); return $this->contentLoader->load($path); } return $data; } public function fetchRemoteContent($path) { $data = ''; try { $this->logger->debug(sprintf('Fetching remote content of file "%s"', $path), ['context' => LogContext::REMOTE_CONTENT]); /** @var \Mpdf\PsrHttpMessageShim\Response $response */ $response = $this->http->sendRequest(new Request('GET', $path)); if ($response->getStatusCode() !== 200) { $message = sprintf('Non-OK HTTP response "%s" on fetching remote content "%s" because of an error', $response->getStatusCode(), $path); if ($this->mpdf->debug) { throw new \Mpdf\MpdfException($message); } $this->logger->info($message); return $data; } $data = $response->getBody()->getContents(); } catch (\InvalidArgumentException $e) { $message = sprintf('Unable to fetch remote content "%s" because of an error "%s"', $path, $e->getMessage()); if ($this->mpdf->debug) { throw new \Mpdf\MpdfException($message, 0, E_ERROR, null, null, $e); } $this->logger->warning($message); } return $data; } public function isPathLocal($path) { return str_starts_with($path, 'file://') || strpos($path, '://') === false; // @todo More robust implementation } }