-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make WAF workaround opt-in for now #5038
Merged
Merged
Conversation
This file contains 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
swissspidy
added
Type: Bug
Something isn't working
P0
Critical, drop everything
Group: Integration
Integration with other platforms and plugins
Group: WordPress
Changes related to WordPress or Gutenberg integration
Pod: WP & Infra
labels
Oct 28, 2020
Size Change: 0 B Total Size: 1.4 MB ℹ️ View Unchanged
|
Codecov Report
@@ Coverage Diff @@
## main #5038 +/- ##
==========================================
- Coverage 75.80% 75.78% -0.03%
==========================================
Files 921 921
Lines 16307 16316 +9
==========================================
+ Hits 12362 12365 +3
- Misses 3945 3951 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
3 tasks
spacedmonkey
approved these changes
Oct 28, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. We have great options for refactoring later.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Group: Integration
Integration with other platforms and plugins
Group: WordPress
Changes related to WordPress or Gutenberg integration
P0
Critical, drop everything
Type: Bug
Something isn't working
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.
Summary
Turns out the mbstring polyfill we include is UTF-8 centric and not suitable for the UTF-16 conversion we are doing. That's why this decoding currently silently fails (i.e. leaves the string unchanged) when the native mbstring extension is not available (which can be the case on some systems).
For this reason, I am putting this behind a feature flag for now until this edge case is addressed.
Note: the mbstring polyfill is still needed because we need UTF-8 conversion for the AMP output on the frontend.
Relevant Technical Choices
To-do
User-facing changes
N/A
Testing Instructions
Verify that encoding only happens when feature flag is turned on.
The decoding always happens.
See #4805