handle file:// includes
Now that we can include urls, we shoudl handle `file://`.
Esse commit está contido em:
@@ -492,6 +492,11 @@ static bool findFileWrapper(CStrRef file, void* ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
// handle file://
|
||||
if (file.substr(0, 7) == "file://") {
|
||||
return findFileWrapper(file.substr(7), ctx);
|
||||
}
|
||||
|
||||
// TranslatePath() will canonicalize the path and also check
|
||||
// whether the file is in an allowed directory.
|
||||
String translatedPath = File::TranslatePathKeepRelative(file);
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
include 'file://'.__DIR__.'/hello.inc';
|
||||
@@ -0,0 +1 @@
|
||||
Hello World
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
print "Hello World";
|
||||
Referência em uma Nova Issue
Bloquear um usuário