wpexpertsio / password-protected

Password protect your WordPress site quickly and simply
https://wordpress.org/plugins/password-protected/
69 stars 63 forks source link

Breaks REST API for non logged-in users #113

Closed thykka closed 5 years ago

thykka commented 6 years ago

While Password Protected is activated, only logged-in users can send forms via CF7. This happens even if Password Protected status is not enabled in the plugin's options.

Attempting to submit a CF7 form results in a call to this endpoint

example.com/wp-json/contact-form-7/v1/contact-forms/form-id/feedback

results in a 401 error and the following payload:

{"code":"rest_cannot_access","message":"Only authenticated users can access the REST API.","data":{"status":401}}

Deactivating Password Protected allows the form to be submitted again.

benhuson commented 6 years ago

Thank you for the pull request. I will ensure this fix is in the next release.

benhuson commented 5 years ago

Hopefully fixed in version 2.2.3