Skip to content

🐛 Undo wp_magic_quotes() before capturing the HTTP request#508

Merged
retlehs merged 2 commits intomainfrom
fix/wp-magic-quotes-request
Mar 8, 2026
Merged

🐛 Undo wp_magic_quotes() before capturing the HTTP request#508
retlehs merged 2 commits intomainfrom
fix/wp-magic-quotes-request

Conversation

@retlehs
Copy link
Member

@retlehs retlehs commented Mar 8, 2026

Summary

  • Temporarily strips slashes added by wp_magic_quotes() before Request::capture(), then restores them with wp_magic_quotes() so WordPress internals are unaffected
  • Without this, request data accessed via Laravel's Request object contains extra backslashes (e.g. it's becomes it\'s)
  • Reproduced and verified the fix using a query string with a single quote (?foo=it's a test)

Closes #408

🤖 Generated with Claude Code

retlehs and others added 2 commits March 8, 2026 17:14
Closes #408

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@retlehs retlehs merged commit ab1ba75 into main Mar 8, 2026
3 checks passed
@retlehs retlehs deleted the fix/wp-magic-quotes-request branch March 8, 2026 22:22
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.

The captured request data is slashed because of the insanity that is wp_magic_quotes()

1 participant