[wp-trac] [WordPress Trac] #61144: Disable Post via email

WordPress Trac noreply at wordpress.org
Thu May 30 23:52:42 UTC 2024


#61144: Disable Post via email
------------------------------------------------+---------------------
 Reporter:  manbo                               |       Owner:  (none)
     Type:  defect (bug)                        |      Status:  new
 Priority:  normal                              |   Milestone:  6.7
Component:  Options, Meta APIs                  |     Version:  6.5
 Severity:  minor                               |  Resolution:
 Keywords:  has-testing-info needs-patch php81  |     Focuses:
------------------------------------------------+---------------------
Changes (by ironprogrammer):

 * keywords:  has-testing-info needs-patch => has-testing-info needs-patch
     php81
 * milestone:  Awaiting Review => 6.7


Comment:

 Welcome back to Trac, and thanks for the report, @manbo!

 As the deprecation notice indicates, the issue is nulls passed into
 [https://github.com/WordPress/wordpress-
 develop/blob/d4967a3619251680df39f2ca2024a4350abc8584/src/wp-
 includes/formatting.php#L4946 `sanitize_option()` here], where
 `mailserver_url`, `mailserver_login`, and `mailserver_pass` are by default
 [https://github.com/WordPress/wordpress-
 develop/blob/d4967a3619251680df39f2ca2024a4350abc8584/src/wp-
 admin/options.php#L342 included in the options to update]. Even though the
 fields are suppressed with the hook and aren't present in the `$_POST`
 data, `options.php` [https://github.com/WordPress/wordpress-
 develop/blob/d4967a3619251680df39f2ca2024a4350abc8584/src/wp-
 admin/options.php#L334 sets each included option to `null`] and then
 passes it to `update_option()`.

 Perhaps `sanitize_option()` could be updated to improve processing when
 these particular [optional] fields are null? Switching to
 [https://developer.wordpress.org/reference/functions/wp_strip_all_tags/
 wp_strip_all_tags] may be appropriate, since the other options in this
 case statement shouldn't be negatively affected by the `<script>` and
 `<style>` tag-removing "limitation" of that function.

 Tagging with `php81`, where this deprecation was introduced. I feel we may
 be too close to 6.6 beta for this to be addressed, but I'm optimistically
 milestoning for 6.7.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61144#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list