Non existent user subpages should return 404
authorMarius Hoch <hoo@online.de>
Sun, 19 May 2013 17:27:53 +0000 (19:27 +0200)
committerMarius Hoch <hoo@online.de>
Sun, 19 May 2013 17:46:02 +0000 (19:46 +0200)
Bug: 46491
Change-Id: I900f1542b077b569ed64306ecf9f965ddabe59f8

includes/Article.php

index d23bebf..a0d4438 100644 (file)
@@ -1092,6 +1092,7 @@ class Article implements Page {
        public function showMissingArticle() {
                global $wgSend404Code;
                $outputPage = $this->getContext()->getOutput();
+               // Whether the page is a root user page of an existing user (but not a subpage)
                $validUserPage = false;
 
                # Show info in user (talk) namespace. Does the user exist? Is he blocked?
@@ -1119,9 +1120,9 @@ class Article implements Page {
                                                )
                                        )
                                );
-                               $validUserPage = true;
+                               $validUserPage = !$this->getTitle()->isSubpage();
                        } else {
-                               $validUserPage = true;
+                               $validUserPage = !$this->getTitle()->isSubpage();
                        }
                }