Skip to content

Commit

Permalink
Merge pull request #123 from TycheSoftwares/v-1.9.4
Browse files Browse the repository at this point in the history
Updated version into 1.9.4 & Fixed security nonce.
  • Loading branch information
mokshasharmila13 committed Apr 3, 2024
2 parents 9479f61 + 342be20 commit 0013747
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
16 changes: 7 additions & 9 deletions includes/component/tracking-data/ts-tracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,16 +298,14 @@ public static function ts_admin_notices_scripts() {
* @since 6.8
* @access public
*/

public static function ts_admin_notices() {
public static function ts_admin_notices() {
$nonce = $_POST['tracking_notice'];//phpcs:ignore
if ( ! wp_verify_nonce( $nonce, 'tracking_notice' ) ) {
return;
if ( is_user_logged_in() && current_user_can( 'manage_options' ) && wp_verify_nonce( $nonce, 'tracking_notice' ) ) {
update_option( self::$plugin_prefix . '_allow_tracking', 'dismissed' );
FAQ_TS_Tracker::ts_send_tracking_data( false );
die();
}
update_option( self::$plugin_prefix . '_allow_tracking', 'dismissed' );
FAQ_TS_Tracker::ts_send_tracking_data( false );
die();
}
}

/**
* Send the data tracking data to the server.
Expand Down Expand Up @@ -351,4 +349,4 @@ public static function ts_track_usage_data() {
</div>
<?php endif;
}
}
}
4 changes: 2 additions & 2 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin URI: https://www.tychesoftwares.com/
* Description: Plugin to handle the display of FAQs
*
* Version: 1.9.3
* Version: 1.9.4
*
* Author: Tyche Softwares
* Author URI: https://www.tychesoftwares.com/
Expand Down Expand Up @@ -44,7 +44,7 @@ class Arconix_FAQ {
* @since 1.6.0
*/
public function __construct() {
$this->version = '1.9.3';
$this->version = '1.9.4';
$this->inc = trailingslashit( plugin_dir_path( __FILE__ ) . '/includes' );
$this->load_dependencies();
$this->load_admin();
Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: jgardner03, tychesoftwares, shasvat
Tags: arconix, faq, toggle, accordion, faq plugin, frequently asked questions
Requires at least: 3.8
Tested up to: 6.4.3
Tested up to: 6.5
Stable tag: trunk

Arconix FAQ provides an easy way to add FAQ items to your website.
Expand Down Expand Up @@ -101,6 +101,11 @@ That's fantastic! Feel free to open an issue or submit a pull request over at [G

== Changelog ==

= 1.9.4 =
* Tweak - Update compatibility with WordPress 6.5.
* Tweak - Update compatibility with WooCommerce 8.7.
* Fix - Cross Site Request Forgery (CSRF) vulnerability.

= 1.9.3 =
* Fix - Cross Site Request Forgery (CSRF) vulnerability.

Expand Down

0 comments on commit 0013747

Please sign in to comment.