[wp-trac] [WordPress Trac] #63943: Post Passwords over 255 are not controlled in Quick Edit, nor reported Server Level.

WordPress Trac noreply at wordpress.org
Mon Sep 8 12:05:24 UTC 2025


#63943: Post Passwords over 255 are not controlled in Quick Edit, nor reported
Server Level.
-------------------------------------------------+-------------------------
 Reporter:  SirLouen                             |       Owner:  rishabhwp
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Quick/Bulk Edit                      |     Version:  4.7
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests changes-    |     Focuses:
  requested report-upstream                      |
-------------------------------------------------+-------------------------

Comment (by SirLouen):

 Replying to [comment:4 rishabhwp]:
 > I did check and found there's a `test_post_password()` function in
 [https://github.com/WordPress/wordpress-
 develop/blob/trunk/tests/phpunit/tests/query/results.php#L1061
 results.php], but it only tests password-protected post queries, not the
 validation logic itself. The `_wp_translate_postdata()` function didn't
 have any existing password length validation tests, so this new test is
 covering a gap in the test suite.

 In this case, you can perfectly add the other test.

 You could also be adding some extra tests like for example having a user
 without `publish_post` cap calling to this function with a post_password
 and checking if the resulting array from this function has the password
 unset (just to add more coverage to this function)

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


More information about the wp-trac mailing list