Make WordPress Core

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#43265 closed defect (bug) (fixed)

REST API JS Client: Extend custom nonce functionality to collections

Reported by: ocean90 Owned by: adamsilverstein
Priority: normal Milestone: 4.9.5
Component: REST API Version: 4.9
Severity: normal Keywords: has-patch needs-testing
Cc: Focuses: javascript

Description

This is a follow-up to #40422.

Since [41553] a custom nonce can be passed to an API client. But when requesting a collection the nonce isn't used because WPApiBaseCollection is still using wpApiSettings.nonce. Chatted with @adamsilverstein and it seems to be an oversight.

Attached an initial patch.

Attachments (2)

43265.patch (1.4 KB ) - added by ocean90 9 years ago.
43265.2.patch (2.1 KB ) - added by ocean90 9 years ago.
Replace new nonces

Download all attachments as: .zip

Change History (7)

@ocean90
9 years ago

@ocean90
9 years ago

Replace new nonces

#1 @adamsilverstein
9 years ago

  • Owner set to adamsilverstein
  • Status newassigned

#2 @adamsilverstein
8 years ago

  • Keywords needs-testing added
  • Milestone Awaiting Review5.0

#3 @ocean90
8 years ago

  • Milestone 5.04.9.5

Moving to 4.9.5 to get this in line with #43266 and #42948.

Last edited 8 years ago by ocean90 (previous) (diff)

#4 @ocean90
8 years ago

  • Resolutionfixed
  • Status assignedclosed

In 42851:

REST API JS Client: Extend custom nonce functionality to collections.

This brings the improved nonce handling from [41553] to collections to remove the direct wpApiSettings.nonce dependency.

Props adamsilverstein, ocean90, swissspidy.
Fixes #43265.

#5 @ocean90
8 years ago

In 42853:

REST API JS Client: Extend custom nonce functionality to collections.

This brings the improved nonce handling from [41553] to collections to remove the direct wpApiSettings.nonce dependency.

Merge of [42851] to the 4.9 branch.

Props adamsilverstein, ocean90, swissspidy.
See #43265.

Note: See TracTickets for help on using tickets.