Permalink
Browse files

Ensure that the wwwroot has been supplied with a http:// or https:// …

…prefix
  • Loading branch information...
1 parent d79dfb8 commit a29910300df06a8fd23b2a44bec258666659b007 donal committed Feb 13, 2008
Showing with 5 additions and 0 deletions.
  1. +5 −0 admin/mnet/peers.php
View
@@ -50,6 +50,11 @@
if (!empty($form->wwwroot)) {
// ensure we remove trailing slashes
$form->wwwroot = preg_replace(':/$:', '', $form->wwwroot);
+
+ // ensure the wwwroot starts with a http or https prefix
+ if (strtolower(substr($form->wwwroot, 0, 4)) != 'http') {
+ $form->wwwroot = 'http://'.$form->wwwroot;
+ }
}
if(!function_exists('xmlrpc_encode_request')) {

0 comments on commit a299103

Please sign in to comment.