Version Description
- FIX: Sanitise all $GET and all $POST
- FIX: Add nonce to ajax calls
Download this release
Release Info
Developer | cloughit |
Plugin | Async JavaScript |
Version | 2.17.09.30 |
Comparing to | |
See all releases |
Code changes from version 2.17.09.29 to 2.17.09.30
- async-javascript.php +5 -5
- readme.txt +7 -2
async-javascript.php
CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
4 |
Plugin Name: Async JavaScript
|
5 |
Plugin URI: https://cloughit.com.au/product/async-javascript/
|
6 |
Description: Async JavaScript adds a 'async' or 'defer' attribute to scripts loaded via wp_enqueue_script
|
7 |
-
Version: 2.17.09.
|
8 |
Author: Clough I.T. Solutions
|
9 |
Author URI: http://www.cloughit.com.au/
|
10 |
Text Domain: async-javascript
|
@@ -26,7 +26,7 @@ function aj_admin_init() {
|
|
26 |
define( 'AJ_ADMIN_URL', trailingslashit( admin_url() ) );
|
27 |
define( 'AJ_PLUGIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
|
28 |
define( 'AJ_PLUGIN_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
|
29 |
-
define( 'AJ_VERSION', '2.17.09.
|
30 |
require_once( AJ_PLUGIN_DIR . 'lib/gtmetrix/class.Services_WTF_Test.php' );
|
31 |
}
|
32 |
/**
|
@@ -244,7 +244,7 @@ function async_javascript_menu() {
|
|
244 |
function async_javascript_admin() {
|
245 |
// load settings from database
|
246 |
$tabs = array( 'wizard', 'status', 'settings', 'help' );
|
247 |
-
$active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'wizard';
|
248 |
?>
|
249 |
<div class="wrap aj">
|
250 |
<input type="hidden" id="aj_nonce" value="<?php echo wp_create_nonce( "aj_nonce" ); ?>" />
|
@@ -937,9 +937,9 @@ add_filter( 'script_loader_tag', 'async_js', 10, 3 );
|
|
937 |
function async_js( $tag, $handle, $src ) {
|
938 |
if ( isset( $_GET['aj_simulate'] ) ) {
|
939 |
$aj_enabled = true;
|
940 |
-
$aj_method = $_GET['aj_simulate'];
|
941 |
if ( isset( $_GET['aj_simulate_jquery'] ) ) {
|
942 |
-
$aj_jquery = $_GET['aj_simulate_jquery'];
|
943 |
} else {
|
944 |
$aj_jquery = $aj_method;
|
945 |
}
|
4 |
Plugin Name: Async JavaScript
|
5 |
Plugin URI: https://cloughit.com.au/product/async-javascript/
|
6 |
Description: Async JavaScript adds a 'async' or 'defer' attribute to scripts loaded via wp_enqueue_script
|
7 |
+
Version: 2.17.09.30
|
8 |
Author: Clough I.T. Solutions
|
9 |
Author URI: http://www.cloughit.com.au/
|
10 |
Text Domain: async-javascript
|
26 |
define( 'AJ_ADMIN_URL', trailingslashit( admin_url() ) );
|
27 |
define( 'AJ_PLUGIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
|
28 |
define( 'AJ_PLUGIN_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
|
29 |
+
define( 'AJ_VERSION', '2.17.09.30' );
|
30 |
require_once( AJ_PLUGIN_DIR . 'lib/gtmetrix/class.Services_WTF_Test.php' );
|
31 |
}
|
32 |
/**
|
244 |
function async_javascript_admin() {
|
245 |
// load settings from database
|
246 |
$tabs = array( 'wizard', 'status', 'settings', 'help' );
|
247 |
+
$active_tab = isset( $_GET[ 'tab' ] ) ? sanitize_text_field( $_GET[ 'tab' ] ) : 'wizard';
|
248 |
?>
|
249 |
<div class="wrap aj">
|
250 |
<input type="hidden" id="aj_nonce" value="<?php echo wp_create_nonce( "aj_nonce" ); ?>" />
|
937 |
function async_js( $tag, $handle, $src ) {
|
938 |
if ( isset( $_GET['aj_simulate'] ) ) {
|
939 |
$aj_enabled = true;
|
940 |
+
$aj_method = sanitize_text_field( $_GET['aj_simulate'] );
|
941 |
if ( isset( $_GET['aj_simulate_jquery'] ) ) {
|
942 |
+
$aj_jquery = sanitize_text_field( $_GET['aj_simulate_jquery'] );
|
943 |
} else {
|
944 |
$aj_jquery = $aj_method;
|
945 |
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: (cloughit)
|
|
3 |
Donate link: http://www.cloughit.com.au/donate/ (coming soon)
|
4 |
Tags: async,javascript,google,pagespeed,js,speed,performance,boost,render,blocking,above-the-fold
|
5 |
Requires at least: 2.8
|
6 |
-
Tested up to: 4.8
|
7 |
-
Stable tag: 2.17.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -101,6 +101,11 @@ Coming soon!
|
|
101 |
|
102 |
== Changelog ==
|
103 |
|
|
|
|
|
|
|
|
|
|
|
104 |
= 2017.06.13 =
|
105 |
|
106 |
* MOD: Dashboard Widget and Notices only available to Administrators
|
3 |
Donate link: http://www.cloughit.com.au/donate/ (coming soon)
|
4 |
Tags: async,javascript,google,pagespeed,js,speed,performance,boost,render,blocking,above-the-fold
|
5 |
Requires at least: 2.8
|
6 |
+
Tested up to: 4.8.2
|
7 |
+
Stable tag: 2.17.09.30
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
101 |
|
102 |
== Changelog ==
|
103 |
|
104 |
+
= 2.17.09.30 =
|
105 |
+
|
106 |
+
* FIX: Sanitise all $_GET and all $_POST
|
107 |
+
* FIX: Add nonce to ajax calls
|
108 |
+
|
109 |
= 2017.06.13 =
|
110 |
|
111 |
* MOD: Dashboard Widget and Notices only available to Administrators
|