WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#18403 closed defect (bug) (fixed)

Cache ajax nonce in internal linking

Reported by: mitchoyoshitaka Owned by: nacin
Milestone: 3.3 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch
Focuses: Cc:

Description

Every time we make an internal linking query, we lookup $('#_ajax_linking_nonce').val(). It's super fast, but why not just check it once?

Attachments (1)

18403.diff (679 bytes) - added by mitchoyoshitaka 3 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 nacin3 years ago

inputs.nonce might be cleaner.

mitchoyoshitaka3 years ago

comment:2 SergeyBiryukov3 years ago

  • Milestone changed from Awaiting Review to 3.3

comment:3 nacin3 years ago

  • Owner changed from koopersmith to nacin
  • Status changed from new to accepted
  • Type changed from enhancement to defect (bug)

autosave recycles nonces for us if they're in their last legs. We should do the same here.

comment:4 nacin3 years ago

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

In [18820]:

Cache internal linking nonce jQuery object. props mitchoyoshitaka. Update this nonce through autosave. fixes #18403.

Note: See TracTickets for help on using tickets.