Skip to content

Commit

Permalink
fix: Vuln in admin notices (#84)
Browse files Browse the repository at this point in the history
* Initial commit

* Updates
  • Loading branch information
kunalnagar authored Jul 21, 2024
1 parent 67299bc commit aac9bbe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions admin/AdminClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ public function custom_404_pro_notices() {
$html = '';
if ( current_user_can( 'administrator' ) ) {
if ( array_key_exists( 'c4pmessage', $_REQUEST ) ) {
$message = urldecode( sanitize_text_field( $_REQUEST['c4pmessage'] ) );
$message = esc_html( urldecode( sanitize_text_field( $_REQUEST['c4pmessage'] ) ) );
if ( array_key_exists( 'c4pmessageType', $_REQUEST ) ) {
$messageType = sanitize_text_field( $_REQUEST['c4pmessageType'] );
$messageType = esc_html( sanitize_text_field( $_REQUEST['c4pmessageType'] ) );
}
$html .= '<div class="notice notice-' . $messageType . ' is-dismissible">';
$html .= '<p>' . $message . '</p>';
Expand Down
2 changes: 1 addition & 1 deletion custom-404-pro.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin Name: Custom 404 Pro
Plugin URI: https://wordpress.org/plugins/custom-404-pro/
Description: Override the default 404 page with any page or a custom URL from the Admin Panel.
Version: 3.11.1
Version: 3.11.2
Author: Kunal Nagar
Author URI: https://www.kunalnagar.in
License: GPL-2.0+
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/kunalnagar88/10
Tags: wordpress, 404, 404 error page, 404 link, 404 page, broken link, custom 404, custom 404 error, custom 404 error page, custom 404 page, customize 404, customize 404 error page, customize 404 page, error, error page, missing, page, page not found, page not found error
Requires at least: 3.0.1
Tested up to: 6.5
Stable tag: 3.11.1
Stable tag: 3.11.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -55,6 +55,9 @@ Uninstall the plugin from the Plugins page (important!) and reinstall it. Never

== Changelog ==

= 3.11.2 =
* Fix vuln in admin notices

= 3.11.1 =
* Fix broken Delete logs link

Expand Down

0 comments on commit aac9bbe

Please sign in to comment.