Skip to content

Conversation

@girishpanchal30
Copy link
Contributor

Summary

Generate the nonce based on the feed URL for the /wp-json/feedzy/v1/lazy endpoint.

Check before Pull Request is ready:

Closes https://github.com/Codeinwp/feedzy-rss-feeds-pro/issues/939#issuecomment-3552901449

@girishpanchal30 girishpanchal30 added the pr-checklist-skip Allow this Pull Request to skip checklist. label Nov 20, 2025
@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Nov 20, 2025
@pirate-bot
Copy link
Contributor

pirate-bot commented Nov 20, 2025

Plugin build for 9eb7053 is ready 🛎️!

Note

You can preview the changes in the Playground

$feed_url = $this->normalize_urls( $sc['feeds'] );
$nonce = isset( $atts['nonce'] ) ? $atts['nonce'] : '';

if ( ! wp_verify_nonce( $nonce, $feed_url ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if it is the case, but one small concern is the fragility of the verification based on the normalized URL. If it happens to be an issue, I think we can switch to make the nonce to be based only on the domain of the URL.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we generate the nonce based solely on the domain of the URL, an authenticated user could potentially access internal resources by supplying a valid internal resource URL along with the nonce.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think is fine how it is right now since we normalize the url on nonce generation and on nonce verification so the result should be consistent.

@vytisbulkevicius vytisbulkevicius merged commit 55a5663 into development Nov 20, 2025
9 checks passed
@vytisbulkevicius vytisbulkevicius deleted the bugfix/pro/939 branch November 20, 2025 10:30
@pirate-bot
Copy link
Contributor

🎉 This PR is included in version 5.1.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist. released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants