Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#43265 closed defect (bug) (fixed)

REST API JS Client: Extend custom nonce functionality to collections

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

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 6 years ago.
43265.2.patch (2.1 KB) - added by ocean90 6 years ago.
Replace new nonces

Download all attachments as: .zip

Change History (7)

@ocean90
6 years ago

@ocean90
6 years ago

Replace new nonces

#1 @adamsilverstein
6 years ago

  • Owner set to adamsilverstein
  • Status changed from new to assigned

#2 @adamsilverstein
6 years ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to 5.0

#3 @ocean90
6 years ago

  • Milestone changed from 5.0 to 4.9.5

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

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

#4 @ocean90
6 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

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
6 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.