Skip to content

Conversation

@soderlind
Copy link
Owner

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:

  • All posted redirect URLs are now validated using 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]
  • Added a PHPUnit test to verify that external redirect URLs are always rejected, increasing test coverage for the new redirect logic.

Session Cookie Fixes:

  • Session cookies now omit the expires option for correct browser session behavior, ensuring that session cookies are handled as expected by browsers.

Customization & Backward Compatibility:

  • The footer link customize key in settings has been updated from footer_link_url to footer_link, with backward compatibility logic to support older configurations seamlessly. [1] [2] [3]

Release & Documentation:

  • Updated version numbers in composer.json, package.json, and readme.txt to 1.2.2, and added a changelog entry summarizing these changes. [1] [2] [3] [4]

… 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.
@soderlind soderlind merged commit e7fdeaa into main Dec 15, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants