]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #5363: Append trailing slash to site URL if missing
authorSteve Clay <steve@mrclay.org>
Tue, 16 Apr 2013 01:03:00 +0000 (21:03 -0400)
committerSteve Clay <steve@mrclay.org>
Tue, 16 Apr 2013 01:03:00 +0000 (21:03 -0400)
actions/admin/site/update_advanced.php

index 0fd8d1f35e4dd68524946252194351f0ef309067..4888b0a8d4fcd44fdecf3bfee4c46ab95678082e 100644 (file)
@@ -14,10 +14,10 @@ if ($site = elgg_get_site_entity()) {
                throw new InstallationException(elgg_echo('InvalidParameterException:NonElggSite'));
        }
 
-       $site->url = get_input('wwwroot');
+       $site->url = rtrim(get_input('wwwroot', '', false), '/') . '/';
 
-       datalist_set('path', sanitise_filepath(get_input('path')));
-       $dataroot = sanitise_filepath(get_input('dataroot'));
+       datalist_set('path', sanitise_filepath(get_input('path', '', false)));
+       $dataroot = sanitise_filepath(get_input('dataroot', '', false));
 
        // check for relative paths
        if (stripos(PHP_OS, 'win') === 0) {