From 15b92166343f10f2312224fe0ec7e8e322c0438a Mon Sep 17 00:00:00 2001 From: emc3 Date: Tue, 11 Nov 2003 20:57:43 +0000 Subject: [PATCH] Never understimate the ingenuity of fools. git-svn-id: http://svn.automattic.com/wordpress/trunk@542 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-settings.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wp-settings.php b/wp-settings.php index a0143cba7a..f2192d4b07 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -6,7 +6,14 @@ // accessing a single global $all_settings var if (!$_wp_installing) { $siteurl = get_settings('siteurl'); - if ('/' == substr($siteurl, -1)) $siteurl = substr($siteurl, 0, -1); + // "When trying to design a foolproof system, + // never underestimate the ingenuity of the fools :)" + // + // Strip trailing slashes from $siteurl. But don't do + // anything that could cause an infinite loop. + while (('/' == substr($siteurl, -1)) && (10 > $i++)) { + $siteurl = substr($siteurl, 0, -1); + } $blogfilename = get_settings('blogfilename'); $blogname = get_settings('blogname'); $blogdescription = get_settings('blogdescription');