From 71cfb73ffbb07b667d605a52b61a160e55981580 Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Thu, 24 Jun 2004 21:33:43 +0000 Subject: [PATCH] Fixed problem of User DaB. not being able to log in. --- includes/Skin.php | 2 +- includes/Title.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/includes/Skin.php b/includes/Skin.php index 3d9f13874f..37d6d479e4 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1774,7 +1774,7 @@ class Skin { if(!is_object($title)) { $title = Title::newFromText( $name ); if(!is_object($title)) { - $title = Title::newFromText( '' ); + $title = Title::newFromText( '--error: link target missing--' ); } } } diff --git a/includes/Title.php b/includes/Title.php index bdb837001e..35ae3e8391 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -726,7 +726,12 @@ class Title { } # "." and ".." conflict with the directories of those namesa - if ( $r === "." || $r === ".." || strpos( $r, "./" ) !== false ) { + if ( strpos( $r, "." ) !== false && + ( $r === "." || $r === ".." || + strpos( $r, "./" ) === 0 || + strpos( $r, "/./" !== false ) || + strpos( $r, "/../" !== false ) ) ) + { return false; } -- 2.20.1