Make WordPress Core

Opened 7 weeks ago

Last modified 7 weeks ago

#65980 accepted defect (bug)

Compression test 400 error if ajax url contains a query string

Reported by: tofandel Owned by: westonruter
Priority: normal Milestone: 7.2
Component: General Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

If a filter for a translation plugin (eg: wpml) modifies the ajax url to contain a query string like admin-ajax.php?lang=en, then the compression test done in wp-admin/includes/template.php causes a 400 error because it contains multiple search params (?lang=en?action=wp-compression-test) in the url

Change History (3)

This ticket was mentioned in ​PR #13295 on ​WordPress/wordpress-develop by ​@tofandel.


7 weeks ago
#1

  • Keywords has-patch added

The admin_url function is a function that is filtered, as such other plugins can add query string to it like ?lang=en when this is the case the request for the compression test is an invalid request that triggers error 400 because it contains multiple '?' in the url

This pull request changes the handling to handle this case

#2 @westonruter
7 weeks ago

This should be made obsolete by #57548

#3 @westonruter
7 weeks ago

  • Milestone Awaiting Review → 7.2
  • Owner set to westonruter
  • Status new → accepted

I'll milestone this for visibility, but the relevant code will likely (hopefully) be deleted entirely in WP 7.2.

Note: See TracTickets for help on using tickets.