[wp-trac] [WordPress Trac] #38919: REST API: Can't unset password

WordPress Trac noreply at wordpress.org
Wed Nov 23 19:57:02 UTC 2016


#38919: REST API: Can't unset password
--------------------------+-----------------------------
 Reporter:  iseulde       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Once a password is set, it's not possible to unset it. The password is
 explicitly prevented from being set when it's an empty string:

 {{{
 if ( ! empty( $schema['properties']['password'] ) && isset(
 $request['password'] ) && '' !== $request['password'] ) {
   $prepared_post->post_password = $request['password'];
   ...
 }}}

 Is there a reason for this? Not sure if I'm missing something.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38919>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list