Permalink
Browse files

MDL-26910 add HTTPD server name whitelisting

  • Loading branch information...
1 parent 6b14adf commit 4e3e8464b6d0ea530acb74052a225e6d9edbd08e @skodak skodak committed Apr 10, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/setuplib.php
View
4 lib/setuplib.php
@@ -772,6 +772,10 @@ function setup_get_remote_url() {
//LiteSpeed - not officially supported
$rurl['fullpath'] = $_SERVER['REQUEST_URI']; // TODO: verify this is always properly encoded
+ } else if ($_SERVER['SERVER_SOFTWARE'] === 'HTTPD') {
+ //obscure name found on some servers - this is definitely not supported
+ $rurl['fullpath'] = $_SERVER['REQUEST_URI']; // TODO: verify this is always properly encoded
+
} else {
throw new moodle_exception('unsupportedwebserver', 'error', '', $_SERVER['SERVER_SOFTWARE']);
}

0 comments on commit 4e3e846

Please sign in to comment.