Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Check that the site URL we get from e107 preferences is set properly.…

… Close ticket #6.
  • Loading branch information...
commit e5dce02367f2feb18e0fc1dae7307e45a94a61d1 1 parent 8c08ef1
Kevin Deldycke authored

Showing 2 changed files with 6 additions and 2 deletions. Show diff stats Hide diff stats

  1. +4 0 e107-importer.php
  2. +2 2 readme.txt
4 e107-importer.php
@@ -395,6 +395,10 @@ function defsettrue($str,$default='') {
395 395
396 396 // Set global SITEURL as it's used by replaceConstants() method
397 397 $site_url = $this->e107_pref['siteurl'];
  398 + // If the e107 site URL is not set to something we expect, raise an error
  399 + // Check that URL starts with "http[s]://"
  400 + if (!preg_match('/^https?:\/\//i', $site_url))
  401 + wp_die("e107's site URL must be set properly (= must start with 'http://' or 'https://').");
398 402 // Normalize URL: it must end with a single slash
399 403 define("SITEURL", rtrim($site_url, '/').'/');
400 404
4 readme.txt
@@ -148,8 +148,8 @@ This plugin contain original code from the e107 project, licensed under the GPL.
148 148
149 149 == Changelog ==
150 150
151   -= 1.5 =
152   -No changes yet.
  151 += 1.5.dev =
  152 +* Check that the site URL we get from e107 preferences is set properly.
153 153
154 154 = 1.4 =
155 155 * Declare this plugin as unmaintained.

0 comments on commit e5dce02

Please sign in to comment.
Something went wrong with that request. Please try again.