Version Description
- strip scripts during template scan to prevent false positives
Download this release
Release Info
Developer | lilaeamedia |
Plugin | Child Theme Configurator |
Version | 2.3.0.4 |
Comparing to | |
See all releases |
Code changes from version 2.3.0.3 to 2.3.0.4
- child-theme-configurator.php +1 -1
- includes/classes/Admin.php +8 -3
- includes/classes/CSS.php +2 -2
- includes/classes/Core.php +1 -1
- includes/classes/UI.php +1 -1
- js/chldthmcfg.js +1 -1
- readme.txt +3 -1
child-theme-configurator.php
CHANGED
@@ -6,7 +6,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
6 |
Plugin Name: Child Theme Configurator
|
7 |
Plugin URI: http://www.childthemeconfigurator.com
|
8 |
Description: When using the Customizer is not enough - Create child themes and customize styles, templates, functions and more.
|
9 |
-
Version: 2.3.0.
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com
|
12 |
Text Domain: child-theme-configurator
|
6 |
Plugin Name: Child Theme Configurator
|
7 |
Plugin URI: http://www.childthemeconfigurator.com
|
8 |
Description: When using the Customizer is not enough - Create child themes and customize styles, templates, functions and more.
|
9 |
+
Version: 2.3.0.4
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com
|
12 |
Text Domain: child-theme-configurator
|
includes/classes/Admin.php
CHANGED
@@ -6,7 +6,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
6 |
Class: ChildThemeConfiguratorAdmin
|
7 |
Plugin URI: http://www.childthemeconfigurator.com/
|
8 |
Description: Main Controller Class
|
9 |
-
Version: 2.3.0.
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: child-theme-configurator
|
@@ -1239,13 +1239,18 @@ defined( 'CHLD_THM_CFG_IGNORE_PARENT' ) or define( 'CHLD_THM_CFG_IGNORE_PARENT',
|
|
1239 |
$size = 0;
|
1240 |
if ( $handle = fopen( $file_verified, "rb") ):
|
1241 |
while ( !feof( $handle ) ):
|
1242 |
-
$size
|
1243 |
-
if ( $size >
|
1244 |
break;
|
1245 |
$contents = fread($handle, 2048);
|
1246 |
if ( preg_match( "/\w+\s*\(/", $contents ) ):
|
1247 |
$template = TRUE;
|
|
|
|
|
|
|
|
|
1248 |
if ( preg_match( "/(function \w+?|require(_once)?)\s*\(/", $contents ) ):
|
|
|
1249 |
$template = FALSE;
|
1250 |
break;
|
1251 |
endif;
|
6 |
Class: ChildThemeConfiguratorAdmin
|
7 |
Plugin URI: http://www.childthemeconfigurator.com/
|
8 |
Description: Main Controller Class
|
9 |
+
Version: 2.3.0.4
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: child-theme-configurator
|
1239 |
$size = 0;
|
1240 |
if ( $handle = fopen( $file_verified, "rb") ):
|
1241 |
while ( !feof( $handle ) ):
|
1242 |
+
$size++;
|
1243 |
+
if ( $size > 10 ) // if larger than 20k this ain't a template
|
1244 |
break;
|
1245 |
$contents = fread($handle, 2048);
|
1246 |
if ( preg_match( "/\w+\s*\(/", $contents ) ):
|
1247 |
$template = TRUE;
|
1248 |
+
// remove scripts so they don't cause false positives - v.2.3.0.4
|
1249 |
+
$contents = preg_replace( "%<script>.+?</script>%s", '', $contents );
|
1250 |
+
$contents = preg_replace( "%(^.+?</script>|<script>.+$)%s", '', $contents );
|
1251 |
+
// if contents contain functions or requires this is not a template
|
1252 |
if ( preg_match( "/(function \w+?|require(_once)?)\s*\(/", $contents ) ):
|
1253 |
+
$this->debug( 'disqualifying code found in chunk ' . $size, __FUNCTION__, __CLASS__ );
|
1254 |
$template = FALSE;
|
1255 |
break;
|
1256 |
endif;
|
includes/classes/CSS.php
CHANGED
@@ -6,7 +6,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
6 |
Class: ChildThemeConfiguratorCSS
|
7 |
Plugin URI: http://www.childthemeconfigurator.com/
|
8 |
Description: Handles all CSS input, output, parsing, normalization and storage
|
9 |
-
Version: 2.3.0.
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
@@ -167,7 +167,7 @@ class ChildThemeConfiguratorCSS {
|
|
167 |
$this->parnt = '';
|
168 |
$this->ignoreparnt = 0;
|
169 |
$this->qpriority = 10;
|
170 |
-
$this->version = '2.3.0.
|
171 |
|
172 |
// do not set enqueue, not being set is used to flag old versions
|
173 |
|
6 |
Class: ChildThemeConfiguratorCSS
|
7 |
Plugin URI: http://www.childthemeconfigurator.com/
|
8 |
Description: Handles all CSS input, output, parsing, normalization and storage
|
9 |
+
Version: 2.3.0.4
|
10 |
Author: Lilaea Media
|
11 |
Author URI: http://www.lilaeamedia.com/
|
12 |
Text Domain: chld_thm_cfg
|
167 |
$this->parnt = '';
|
168 |
$this->ignoreparnt = 0;
|
169 |
$this->qpriority = 10;
|
170 |
+
$this->version = '2.3.0.4';
|
171 |
|
172 |
// do not set enqueue, not being set is used to flag old versions
|
173 |
|
includes/classes/Core.php
CHANGED
@@ -14,7 +14,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
14 |
define( 'LILAEAMEDIA_URL', "http://www.lilaeamedia.com" );
|
15 |
defined( 'CHLD_THM_CFG_DOCS_URL' ) or
|
16 |
define( 'CHLD_THM_CFG_DOCS_URL', "http://www.childthemeconfigurator.com" );
|
17 |
-
define( 'CHLD_THM_CFG_VERSION', '2.3.0.
|
18 |
define( 'CHLD_THM_CFG_PREV_VERSION', '1.7.9.1' );
|
19 |
define( 'CHLD_THM_CFG_MIN_WP_VERSION', '3.7' );
|
20 |
define( 'CHLD_THM_CFG_PRO_MIN_VERSION', '2.2.0' );
|
14 |
define( 'LILAEAMEDIA_URL', "http://www.lilaeamedia.com" );
|
15 |
defined( 'CHLD_THM_CFG_DOCS_URL' ) or
|
16 |
define( 'CHLD_THM_CFG_DOCS_URL', "http://www.childthemeconfigurator.com" );
|
17 |
+
define( 'CHLD_THM_CFG_VERSION', '2.3.0.4' );
|
18 |
define( 'CHLD_THM_CFG_PREV_VERSION', '1.7.9.1' );
|
19 |
define( 'CHLD_THM_CFG_MIN_WP_VERSION', '3.7' );
|
20 |
define( 'CHLD_THM_CFG_PRO_MIN_VERSION', '2.2.0' );
|
includes/classes/UI.php
CHANGED
@@ -5,7 +5,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
5 |
Class: ChildThemeConfiguratorUI
|
6 |
Plugin URI: http://www.childthemeconfigurator.com/
|
7 |
Description: Handles the plugin User Interface
|
8 |
-
Version: 2.3.0.
|
9 |
Author: Lilaea Media
|
10 |
Author URI: http://www.lilaeamedia.com/
|
11 |
Text Domain: chld_thm_cfg
|
5 |
Class: ChildThemeConfiguratorUI
|
6 |
Plugin URI: http://www.childthemeconfigurator.com/
|
7 |
Description: Handles the plugin User Interface
|
8 |
+
Version: 2.3.0.4
|
9 |
Author: Lilaea Media
|
10 |
Author URI: http://www.lilaeamedia.com/
|
11 |
Text Domain: chld_thm_cfg
|
js/chldthmcfg.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
* Script: chldthmcfg.js
|
3 |
* Plugin URI: http://www.childthemeconfigurator.com/
|
4 |
* Description: Handles jQuery, AJAX and other UI
|
5 |
-
* Version: 2.3.0.
|
6 |
* Author: Lilaea Media
|
7 |
* Author URI: http://www.lilaeamedia.com/
|
8 |
* License: GPLv2
|
2 |
* Script: chldthmcfg.js
|
3 |
* Plugin URI: http://www.childthemeconfigurator.com/
|
4 |
* Description: Handles jQuery, AJAX and other UI
|
5 |
+
* Version: 2.3.0.4
|
6 |
* Author: Lilaea Media
|
7 |
* Author URI: http://www.lilaeamedia.com/
|
8 |
* License: GPLv2
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: child, theme, child theme, child themes, custom styles, customize styles,
|
|
5 |
Requires at least: 4.0
|
6 |
Requires PHP: 5.6.36
|
7 |
Tested up to: 4.9
|
8 |
-
Stable tag: 2.3.0.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -288,6 +288,8 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
|
|
288 |
7. Files tab
|
289 |
|
290 |
== Changelog ==
|
|
|
|
|
291 |
= 2.3.0.3 =
|
292 |
* check file size during template scan to prevent timeout
|
293 |
* changed syntax of statement that was being flagged by WP Defender
|
5 |
Requires at least: 4.0
|
6 |
Requires PHP: 5.6.36
|
7 |
Tested up to: 4.9
|
8 |
+
Stable tag: 2.3.0.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
288 |
7. Files tab
|
289 |
|
290 |
== Changelog ==
|
291 |
+
= 2.3.0.4 =
|
292 |
+
* strip scripts during template scan to prevent false positives
|
293 |
= 2.3.0.3 =
|
294 |
* check file size during template scan to prevent timeout
|
295 |
* changed syntax of statement that was being flagged by WP Defender
|