Skip to content

Commit

Permalink
Merge pull request #36 from nurul-umbhiya/patch-3
Browse files Browse the repository at this point in the history
fix: Broken Access Control Vulnerability Issue
  • Loading branch information
anisAronno authored Jan 16, 2024
2 parents c5fd458 + 5fc8f51 commit e447234
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Insights.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,10 @@ public function handle_optin_optout()
return;
}

if (!current_user_can('manage_options')) {
return;
}

if (isset($_GET[$this->client->slug . '_tracker_optin']) && $_GET[$this->client->slug . '_tracker_optin'] === 'true') {
$this->optin();

Expand Down

0 comments on commit e447234

Please sign in to comment.