diff --git a/phpseclib/Crypt/Random.php b/phpseclib/Crypt/Random.php index 0416594f..b34b7980 100644 --- a/phpseclib/Crypt/Random.php +++ b/phpseclib/Crypt/Random.php @@ -277,16 +277,24 @@ if (!function_exists('phpseclib_is_includable')) { if (function_exists('stream_resolve_include_path')) { return stream_resolve_include_path($filename); } + + // handle non-relative paths + if (file_exists($filename)) { + return realpath($filename); + } + $paths = PATH_SEPARATOR == ':' ? preg_split('#(?