Opened 8 years ago
Last modified 8 months ago
#38622 reopened defect (bug)
XML-RPC wp_newComment should return an error when a field exceeds the maximum length
Reported by: | rachelbaker | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | low |
Severity: | normal | Version: | 4.5 |
Component: | XML-RPC | Keywords: | good-first-bug has-patch has-unit-tests needs-refresh |
Focuses: | Cc: |
Description
We return a WP_Error
in wp_handle_comment_submission()
when the comment content, author name, author email, or author url exceeds the maximum length of its respective database column. See #10377.
We should do the same in the XML-RPC wp_newComment()
method.
Attachments (1)
Change History (12)
#3
@
5 years ago
- Keywords good-first-bug added
- Priority changed from normal to low
Marking this as good first bug, but a lower priority.
#4
@
5 years ago
- Keywords has-patch needs-testing added; needs-patch removed
Added max lengths check via the wp_check_comment_data_max_lengths()
function. Respect the $avoid_die
flag with the same logic that wp_allow_comment()
uses
This ticket was mentioned in PR #178 on WordPress/wordpress-develop by sorenbronsted.
5 years ago
#5
<!--
Hi there! Thanks for contributing to WordPress!
Pull Requests in this GitHub repository must be linked to a ticket in the WordPress Core Trac instance (https://core.trac.wordpress.org), and are only used for code review. No pull requests will be merged on GitHub.
See the WordPress Handbook page on using PRs for Code Review more information: https://make.wordpress.org/core/handbook/contribute/git/github-pull-requests-for-code-review/
If this is your first time contributing, you may also find reviewing these guides first to be helpful:
- FAQs for New Contributors: https://make.wordpress.org/core/handbook/tutorials/faq-for-new-contributors/
- Contributing with Code Guide: https://make.wordpress.org/core/handbook/contribute/
- WordPress Coding Standards: https://make.wordpress.org/core/handbook/best-practices/coding-standards/
- Inline Documentation Standards: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/
- Browser Support Policies: https://make.wordpress.org/core/handbook/best-practices/browser-support/
- Proper spelling and grammar related best practices: https://make.wordpress.org/core/handbook/best-practices/spelling/
-->
I have applied the patch from this ticket and fixed at bug when posting a comment via xmlrpc. Anon posting was missing the content_type which resulted in an error.
Trac ticket: https://core.trac.wordpress.org/ticket/38622
This ticket was mentioned in PR #179 on WordPress/wordpress-develop by sorenbronsted.
5 years ago
#6
<!--
Hi there! Thanks for contributing to WordPress!
Pull Requests in this GitHub repository must be linked to a ticket in the WordPress Core Trac instance (https://core.trac.wordpress.org), and are only used for code review. No pull requests will be merged on GitHub.
See the WordPress Handbook page on using PRs for Code Review more information: https://make.wordpress.org/core/handbook/contribute/git/github-pull-requests-for-code-review/
If this is your first time contributing, you may also find reviewing these guides first to be helpful:
- FAQs for New Contributors: https://make.wordpress.org/core/handbook/tutorials/faq-for-new-contributors/
- Contributing with Code Guide: https://make.wordpress.org/core/handbook/contribute/
- WordPress Coding Standards: https://make.wordpress.org/core/handbook/best-practices/coding-standards/
- Inline Documentation Standards: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/
- Browser Support Policies: https://make.wordpress.org/core/handbook/best-practices/browser-support/
- Proper spelling and grammar related best practices: https://make.wordpress.org/core/handbook/best-practices/spelling/
-->
I have applied the patch from this ticket and fixed at bug when posting a comment via xmlrpc. Anon posting was missing the content_type which resulted in an error. Fixed phpcs issues also.
Trac ticket: https://core.trac.wordpress.org/ticket/38622
This ticket was mentioned in PR #180 on WordPress/wordpress-develop by sorenbronsted.
5 years ago
#7
<!--
Hi there! Thanks for contributing to WordPress!
Pull Requests in this GitHub repository must be linked to a ticket in the WordPress Core Trac instance (https://core.trac.wordpress.org), and are only used for code review. No pull requests will be merged on GitHub.
See the WordPress Handbook page on using PRs for Code Review more information: https://make.wordpress.org/core/handbook/contribute/git/github-pull-requests-for-code-review/
If this is your first time contributing, you may also find reviewing these guides first to be helpful:
- FAQs for New Contributors: https://make.wordpress.org/core/handbook/tutorials/faq-for-new-contributors/
- Contributing with Code Guide: https://make.wordpress.org/core/handbook/contribute/
- WordPress Coding Standards: https://make.wordpress.org/core/handbook/best-practices/coding-standards/
- Inline Documentation Standards: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/
- Browser Support Policies: https://make.wordpress.org/core/handbook/best-practices/browser-support/
- Proper spelling and grammar related best practices: https://make.wordpress.org/core/handbook/best-practices/spelling/
-->
I have applied the patch from this ticket and fixed at bug when posting a comment via xmlrpc. Anon posting was missing the content_type which resulted in an error. Fixed phpcs issues also.
Trac ticket: https://core.trac.wordpress.org/ticket/38622
#8
@
4 years ago
- Keywords has-unit-tests added
- Resolution set to invalid
- Status changed from new to closed
Sorry that my PR messed up the this comment section. PR #180 state says 'undefined' but on https://github.com/WordPress/wordpress-develop/pull/180 it says 'all checks has passed' so the state on this ticket is not reflected correctly.
#9
@
4 years ago
- Keywords needs-testing removed
- Resolution invalid deleted
- Status changed from closed to reopened
I incorrectly set wrong keywords
This ticket was mentioned in PR #194 on WordPress/wordpress-develop by sorenbronsted.
4 years ago
#10
Applied patch
Trac ticket: https://core.trac.wordpress.org/ticket/38622
Related #38477