We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I discovered this while working on #13. I believe I confirmed it's not a regression, but would welcome confirmation.
When re-flagging a comment, I do not get the expected "already flagged" message.
sfrc_flags
eyIxOTAzMCI6MX0%3D
The problem is during unserialization
safe-report-comments/safe-report-comments.php
Lines 248 to 251 in d28439f
Problem one is the base64 decoding leaves a trailing character
wp> $base64 = base64_decode( 'eyIxOTAzMCI6MX0%3D' ) => string(12) "{"19030":1}7"
Which then prevents json decoding
wp> json_decode( $base64 ); => NULL
Because the data ends up as null (which is "cleaned" into an empty array), our comment isn't found in the data so is not considered "already flagged".
Note: It may be difficult to fully see this on the front-end due to the transients fallback. Conditional blocks at
Line 298 in d28439f
Line 346 in d28439f
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I discovered this while working on #13. I believe I confirmed it's not a regression, but would welcome confirmation.
Issue
When re-flagging a comment, I do not get the expected "already flagged" message.
Reproduce
sfrc_flags
cookie value something like thiseyIxOTAzMCI6MX0%3D
The problem is during unserialization
safe-report-comments/safe-report-comments.php
Lines 248 to 251 in d28439f
Problem one is the base64 decoding leaves a trailing character
Which then prevents json decoding
Because the data ends up as null (which is "cleaned" into an empty array), our comment isn't found in the data so is not considered "already flagged".
Note: It may be difficult to fully see this on the front-end due to the transients fallback. Conditional blocks at
safe-report-comments/safe-report-comments.php
Line 298 in d28439f
safe-report-comments/safe-report-comments.php
Line 346 in d28439f
The text was updated successfully, but these errors were encountered: