diff --git a/hphp/runtime/base/file_repository.cpp b/hphp/runtime/base/file_repository.cpp index 7ef62d42f..adb60cd20 100644 --- a/hphp/runtime/base/file_repository.cpp +++ b/hphp/runtime/base/file_repository.cpp @@ -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); diff --git a/hphp/test/slow/include/file_include.php b/hphp/test/slow/include/file_include.php new file mode 100644 index 000000000..faef56f5f --- /dev/null +++ b/hphp/test/slow/include/file_include.php @@ -0,0 +1,3 @@ +