Skip to content

Commit 42d828d

Browse files
authored
Merge pull request #6 from udx/develop-alexey
Require user to be logged in while dismissing Admin Panel notices.
2 parents d25e82e + 2b2605f commit 42d828d

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

changes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 1.2.4
2+
3+
* Require user to be logged in while dismissing Admin Panel notices.
4+
15
### 1.2.3
26

37
* Improve security while processing AJAX requests in Admin Panel.

gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Build Plugin.
33
*
44
* @author potanin@UD
5-
* @version 1.2.3
5+
* @version 1.2.4
66
* @param grunt
77
*/
88
module.exports = function( grunt ) {

lib/classes/class-bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Bootstrap extends Scaffold {
1818
/**
1919
*
2020
*/
21-
public static $version = '1.2.3';
21+
public static $version = '1.2.4';
2222

2323
/**
2424
*

lib/classes/class-update-checker.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,10 @@ public function check_dismiss_time( $time = '' ) {
545545
public function dismiss_notices(){
546546
check_ajax_referer('ud_api_dismiss');
547547

548+
if ( !is_user_logged_in() ) {
549+
wp_send_json_error( array( 'error' => __( 'You are not allowed to do this action.', $this->text_domain ) ) );
550+
}
551+
548552
$response = array(
549553
'success' => '0',
550554
'error' => __( 'There was an error in request.', $this->text_domain ),

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lib-ud-api-client",
3-
"version": "1.2.3",
3+
"version": "1.2.4",
44
"description": "UD Client for WooCommerce API Manager",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)