Skip to content
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

Sanitize nonce check. #644

Merged
merged 1 commit into from
Apr 17, 2024
Merged

Sanitize nonce check. #644

merged 1 commit into from
Apr 17, 2024

Conversation

mauteri
Copy link
Contributor

@mauteri mauteri commented Apr 17, 2024

Description of the Change

Sanitize nonce check.

Closes #611

How to test the Change

Changelog Entry

Security - Vulnerability

Credits

Props @mauteri

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

Copy link

what-the-diff bot commented Apr 17, 2024

PR Summary

  • Enhanced Data Validation in User Profile Fields
    Changes were made in file class-user.php to further improve the system's immune to untrusted data and unwanted behaviours. The save_profile_fields method now uses additional functions sanitize_text_field and wp_unslash to handle and clean up the profile field data - by removing unnecessary slashes and sanitizing text field input. This change is significant in enhancing the overall security of the system.

  • Improved Post Content Handling in Posts
    Modifications were done in the file class-post.php to improve how the system handles null post content. The get_content method now includes a null-coalescing operator to return an empty string in scenarios where post_content may be null. This can prevent unexpected errors that would otherwise occur if the system attempts to interact with null content.

@mauteri mauteri merged commit 799e9b2 into main Apr 17, 2024
11 checks passed
@mauteri mauteri deleted the GP-611 branch April 17, 2024 13:08
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.

WP.ORG: Data Must be Sanitized, Escaped, and Validated
1 participant