From 31f1b78212fbaa7933a126311aa15484cf654590 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 8 Mar 2007 22:14:53 +0000 Subject: [PATCH] * (bug 9223) Disallow magic tilde sequences in page titles and usernames --- RELEASE-NOTES | 2 ++ includes/Title.php | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 095a89ad03..ffb721c867 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -254,6 +254,8 @@ lighter making things easier to read. * (bug 9217) Balance wfProfile calls in Skin::outputPage * (bug 9222) PostgreSQL updater should not be version-specific * (bug 1723) Article size in history +* (bug 9223) Disallow magic tilde sequences in page titles and usernames + == Languages updated == diff --git a/includes/Title.php b/includes/Title.php index c40b6e6d48..15b5fb57cb 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1824,6 +1824,13 @@ class Title { { return false; } + + /** + * Magic tilde sequences? Nu-uh! + */ + if( strpos( $dbkey, '~~~' ) !== false ) { + return false; + } /** * Limit the size of titles to 255 bytes. -- 2.20.1