Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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 with 6 additions and 2 deletions.
  1. +4 −0 e107-importer.php
  2. +2 −2 readme.txt
4 e107-importer.php
View
@@ -395,6 +395,10 @@ function defsettrue($str,$default='') {
// Set global SITEURL as it's used by replaceConstants() method
$site_url = $this->e107_pref['siteurl'];
+ // If the e107 site URL is not set to something we expect, raise an error
+ // Check that URL starts with "http[s]://"
+ if (!preg_match('/^https?:\/\//i', $site_url))
+ wp_die("e107's site URL must be set properly (= must start with 'http://' or 'https://').");
// Normalize URL: it must end with a single slash
define("SITEURL", rtrim($site_url, '/').'/');
4 readme.txt
View
@@ -148,8 +148,8 @@ This plugin contain original code from the e107 project, licensed under the GPL.
== Changelog ==
-= 1.5 =
-No changes yet.
+= 1.5.dev =
+* Check that the site URL we get from e107 preferences is set properly.
= 1.4 =
* Declare this plugin as unmaintained.
Please sign in to comment.
Something went wrong with that request. Please try again.