Merged
Conversation
… and fix session cookie handling - Added changelog entry for version 1.2.2 with security improvements: - Hardened redirect handling to validate posted URLs and reject unsafe ones. - Fixed session cookie handling by omitting the expires option for correct browser behavior. - Ensured footer link customization key is consistent and backward compatible. - Added PHPUnit test to verify rejection of external redirect URLs. - Updated version in composer.json and package.json to 1.2.2. - Updated stable tag in readme.txt to 1.2.2. - Modified AdminSettings.php to ensure backward compatibility for footer link settings. - Enhanced CookieHandler.php to improve cookie options and handling. - Improved Protection.php to sanitize and validate redirect URLs. - Added tests in ProtectionTest.php to ensure external redirects are rejected. - Defined minimal wp_validate_redirect function in bootstrap.php for testing purposes.
… CookieHandler, and Protection classes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request releases version 1.2.2 with a focus on security improvements, bug fixes, and backward compatibility. The major updates include hardened redirect handling to prevent unsafe URL redirection, a fix for session cookie behavior, and improvements to the customization settings for the footer link. Automated tests and test infrastructure have also been enhanced to ensure these changes are robust.
Security & Redirect Handling Improvements:
wp_validate_redirect, ensuring that external or hostile URLs are rejected and users are always redirected to the site home if an unsafe URL is detected. This prevents open redirect vulnerabilities. [1] [2]Session Cookie Fixes:
expiresoption for correct browser session behavior, ensuring that session cookies are handled as expected by browsers.Customization & Backward Compatibility:
footer_link_urltofooter_link, with backward compatibility logic to support older configurations seamlessly. [1] [2] [3]Release & Documentation:
composer.json,package.json, andreadme.txtto 1.2.2, and added a changelog entry summarizing these changes. [1] [2] [3] [4]