cloudflare / Cloudflare-WordPress

A Cloudflare plugin for WordPress
https://www.cloudflare.com/wordpress/
BSD 3-Clause "New" or "Revised" License
208 stars 84 forks source link

Forbidden Request to Cloudflare (new Token needed) #506

Closed marcwieland95 closed 9 months ago

marcwieland95 commented 1 year ago

Confirmation

WordPress version

6.1.1

Cloudflare-WordPress version

4.11.0

PHP version

8.1

Expected result

The plugin admin interface will load and the cache is cleared automatically when pages get updated or comments are added.

Actual result

Requests to Cloudflare can't be made because of a change in the token strategies. A new token needs to be generated and added. Since the admin isn't working it can't be replaced. Deactivating the plugin and activating it again will reset it and allow re-authentication.

There needs to be action taken by the admin. The plugin has to ask for a new token if it fails. Now the plugin basically stops working.

Steps to reproduce

  1. Go to the admin area of the Cloudflare plugin
  2. The spinner won't stop loading.

Additional factoids

The exception is below:

[Cloudflare] ERROR: [CLIENT API] Array
(
    [type] => request
    [path] => https://api.cloudflare.com/client/v4/zones?action=cloudflare_proxy
    [timeout] => 30
    [method] => GET
    [headers] => Array
        (
            [Content-Type] => application/json
            [User-Agent] => wordpress/6.1.1; cloudflare-wordpress-plugin/4.11.0
            [Authorization] => REDACTED
        )

)
 PHP message: [Cloudflare] ERROR: [CLIENT API] Array
(
    [type] => response
    [reason] => Forbidden
    [code] => 403
)

References

No response

github-actions[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.