Opened 8 years ago
Closed 8 years ago
#38919 closed defect (bug) (fixed)
REST API: Can't unset password
Reported by: | iseulde | Owned by: | joehoyle |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | REST API | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
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.
Attachments (1)
Change History (8)
#1
@
8 years ago
- Keywords has-patch has-unit-tests added
- Milestone changed from Awaiting Review to 4.7
#3
@
8 years ago
Why are there two separate error messages? 'A post can not be sticky and have a password.'
and 'A sticky post can not be password protected.'
This ticket was mentioned in Slack in #core by helen. View the logs.
8 years ago
#5
@
8 years ago
@swissspidy Technically, there are two separate scenarios: Post already has sticky=true
, vs. sticky=true
is in the request.
This ticket was mentioned in Slack in #core-restapi by danielbachhuber. View the logs.
8 years ago
Note: See
TracTickets for help on using
tickets.
Itsabug!