ソースを参照

Check for string position instead of string existence

otherwise /foo/bar would be detected as a subfolder of /bar

THX @icewind1991
tags/v5.0.0alpha1
Lukas Reschke 11年前
コミット
99adfbdb86
1個のファイルの変更1行の追加1行の削除
  1. 1
    1
      lib/helper.php

+ 1
- 1
lib/helper.php ファイルの表示

@@ -633,7 +633,7 @@ class OC_Helper {
* @return bool
*/
public static function issubdirectory($sub, $parent) {
if (strpos(realpath($sub), realpath($parent)) !== false) {
if (strpos(realpath($sub), realpath($parent)) === 0) {
return true;
}
return false;

読み込み中…
キャンセル
保存