function __construct($str=null, $lowercase=true, $forceTagsClosed=true, $target_charset=DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT)
{
if ($str)
{
if (preg_match("/^http:\/\//i",$str) || is_file($str)) //there should be at least some flag to prevent read as a file
I have the same problem:
change line 131 in HtmlDocument.php to:
if (preg_match('/^http:\/\//i', $str) || (strlen($str)<4096 && is_file($str))) {
check string length before doing is_file(). had same problem on ubuntu.
I completely misunderstood the original report and finally figured it out. Thanks for all your feedback!
This issue is resolved via
[d6dcf50d6b03eb1d0c575abb7011abb658fefcf1][4ad20901f0e63356cb3eb15a1cf4d9bf3a9837cc] by comparing the string length with PHP_MAXPATHLEN before callingis_file().Edit: Had to fix the fix because the original fix was broken :)
Related
Commit: [4ad209]
Commit: [d6dcf5]
Last edit: LogMANOriginal 2022-04-09