Skip to content

Commit

Permalink
Merge pull request #2394 from Codeinwp/vulnerability-237
Browse files Browse the repository at this point in the history
Fixed vulnerability issue with author role
  • Loading branch information
vytisbulkevicius authored Oct 7, 2024
2 parents e6e9843 + e630d36 commit 9d5a78a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions inc/css/class-css-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ public function register_routes() {
},
),
),
'permission_callback' => function () {
return current_user_can( 'publish_posts' );
'permission_callback' => function ( $request ) {
return current_user_can( 'edit_post', $request->get_param( 'id' ) );
},
),
)
Expand All @@ -166,8 +166,8 @@ public function register_routes() {
},
),
),
'permission_callback' => function () {
return current_user_can( 'publish_posts' );
'permission_callback' => function ( $request ) {
return current_user_can( 'edit_post', $request->get_param( 'id' ) );
},
),
)
Expand Down

0 comments on commit 9d5a78a

Please sign in to comment.