Skip to content

Commit

Permalink
Bump to v2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
samiahmedsiddiqui committed Aug 19, 2022
1 parent fd31c0a commit d6a13dd
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 27 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 3 additions & 4 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ function selfXssMessage() {
'color:red;font-size:50px;font-weight:bold;text-shadow: 1px 1px 0px black, 1px -1px 0px black, -1px 1px 0px black, -1px -1px 0px black;'
)
);
if ( selfXss && selfXss.message !== '' ) {
if (selfXss && selfXss.message !== '') {
/* eslint-disable no-console */
setTimeout( console.log.bind( console, '\n', selfXss.message ) );
setTimeout(console.log.bind(console, '\n', selfXss.message));
} else {
setTimeout(
/* eslint-disable no-console */
Expand All @@ -27,5 +27,4 @@ function selfXssMessage() {
);
}
}
/* eslint-disable @wordpress/no-global-event-listener */
document.addEventListener( 'DOMContentLoaded', selfXssMessage );
document.addEventListener('DOMContentLoaded', selfXssMessage);
7 changes: 7 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

This file contains only old changelog. See readme.txt for newer versions.

= 1.0.0 - Aug 24, 20 =

* Enhancements
* Escape array values
* Set headers to prevent caching before redirect
* Applied PHP Standard and removed couple of discouraged methods

= 0.3.5 - May 14, 19 =

* Fixing issue with `update_option`
Expand Down
24 changes: 12 additions & 12 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
const { src, dest, parallel } = require('gulp');
const cleanCSS = require('gulp-clean-css');
const del = require('del');
const package = require("./package.json");
// const { deleteAsync } = require('del');
const package = require('./package.json');
const uglify = require('gulp-uglify');
const rename = require('gulp-rename');

// Get Plugin Version from `package.json`
const pluginVersion = package.preventXssVulnerability.pluginVersion;

async function deleteMinFiles() {
await del(['assets/**/*.min.*']);
await deleteAsync(['assets/js/script.min.js']);
}

function minifyCss() {
return src(['assets/**/*.css', '!assets/**/*/*.min.css'])
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(rename(function(path) {
path.extname = "-" + pluginVersion + ".min" + path.extname;
}))
.pipe(cleanCSS({ compatibility: 'ie8' }))
.pipe(rename(function (path) {
path.extname = '-' + pluginVersion + '.min' + path.extname;
}))
.pipe(dest('assets/'));
}

function minifyJs() {
return src(['assets/**/*.js', '!assets/**/*/*.min.js'])
.pipe(uglify())
.pipe(rename(function(path) {
path.extname = "-" + pluginVersion + ".min" + path.extname;
}))
.pipe(uglify())
.pipe(rename(function (path) {
path.extname = '-' + pluginVersion + '.min' + path.extname;
}))
.pipe(dest('assets/'));
}

exports.build = parallel(deleteMinFiles,minifyCss, minifyJs);
exports.build = parallel(minifyCss, minifyJs);
2 changes: 1 addition & 1 deletion includes/class-prevent-xss-vulnerability.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class Prevent_XSS_Vulnerability {
*
* @var string
*/
public $version = '2.0.0';
public $version = '2.0.1';

/**
* Class constructor.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"gulp-uglify": "3.0.2"
},
"preventXssVulnerability": {
"pluginVersion": "2.0.0"
"pluginVersion": "2.0.1"
}
}
2 changes: 1 addition & 1 deletion prevent-xss-vulnerability.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Prevent XSS Vulnerability
* Plugin URI: https://www.yasglobal.com/web-design-development/wordpress/prevent-xss-vulnerability/
* Description: Secure your site from the XSS Attack.
* Version: 2.0.0
* Version: 2.0.1
* Author: Sami Ahmed Siddiqui
* Author URI: https://www.linkedin.com/in/sami-ahmed-siddiqui/
* License: GPLv3
Expand Down
14 changes: 6 additions & 8 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: sasiddiqui
Tags: attack, cross-site scripting, security, vulnerability, xss, self-xss
Requires at least: 3.5
Tested up to: 6.0
Stable tag: 2.0.0
Stable tag: 2.0.1
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -113,6 +113,11 @@ A. No, this plugin doesn't have any conflict with any plugin.

== Changelog ==

= 2.0.1 - Aug 19, 22 =

* Bug
* [Please fix Notices for use in WP_DEBUG mode](https://wordpress.org/support/topic/please-fix-notices-for-use-in-wp_debug-mode/)

= 2.0.0 - Jul 14, 21 =

* Bug
Expand All @@ -124,13 +129,6 @@ A. No, this plugin doesn't have any conflict with any plugin.
* [Include other/extra parameters](https://github.com/samiahmedsiddiqui/prevent-xss-vulnerability/issues/3)
* Fixed WPCS issues

= 1.0.0 - Aug 24, 20 =

* Enhancements
* Escape array values
* Set headers to prevent caching before redirect
* Applied PHP Standard and removed couple of discouraged methods

= Earlier versions =

* For the changelog of earlier versions, please refer to the separate changelog.txt file.

0 comments on commit d6a13dd

Please sign in to comment.