allow /dev/urandom to be used in open_basedir path, as some applications may require that (*cough* owncloud), thx to J-BBB

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2015-11-20 14:20:15 +01:00
parent 77dcc37b33
commit accfd6fa14

View File

@@ -44,9 +44,9 @@ function appendOpenBasedirPath($path = '', $first = false) {
if($path != ''
&& $path != '/'
&& !preg_match("#^/dev#i", $path)
&& !preg_match("#^/proc#i", $path)
&& !preg_match("#^/etc#i", $path)
&& (!preg_match("#^/dev#i", $path) || preg_match("#^/dev/urandom#i", $path))
&& !preg_match("#^/proc#i", $path)
&& !preg_match("#^/etc#i", $path)
&& !preg_match("#^/sys#i", $path)
&& !preg_match("#:#", $path)
) {