Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#22035 closed defect (bug) (fixed)

New rewrite rule for wp-app.php does not work correctly

Reported by: latz's profile Latz Owned by: nacin's profile nacin
Milestone: 3.5 Priority: normal
Severity: major Version: 3.5
Component: XML-RPC Keywords: has-patch commit
Focuses: Cc:

Description

AtomPub:

the rewrite rule added in #21509 for wp-app.php does not work correctly since it assumes the URL end with "wp-app.php" (.*wp-app\.php$). Actually a URL could look like this:

http://localhost/wp-app.php/service

In WP3.4 you're even redirected to this URL. Most applications using AtomPub will therefore use the above URL and receive a 404 error and not the anticipated 403.

Rewrite rule should be changed.

Attachments (2)

rewrite-whoops.diff (504 bytes) - added by wonderboymusic 12 years ago.
22035.diff (503 bytes) - added by markoheijnen 12 years ago.

Download all attachments as: .zip

Change History (10)

#1 @SergeyBiryukov
12 years ago

  • Milestone changed from Awaiting Review to 3.5

#2 @SergeyBiryukov
12 years ago

  • Version set to trunk

#3 @wonderboymusic
12 years ago

  • Keywords has-patch added; needs-patch removed

Yeah... sorry about that... patch attached

#5 @markoheijnen
12 years ago

  • Keywords commit added

Tested it and patch works. Not sure if it makes sense to create a unit test for this.

#6 @nacin
12 years ago

Rather than .*wp-app\.php/?(.+)?$ I think it should be .*wp-app\.php(/.*)?$, essentially requiring the slash if there are additional characters. That still work fine?

@markoheijnen
12 years ago

#7 @markoheijnen
12 years ago

Patch on the feedback of nacin. Still works fine

#8 @nacin
12 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 22441:

Update the old wp-app.php rule to allow for a trailing slash followed by endpoint data. props wonderboymusic. fixes #22035.

Note: See TracTickets for help on using tickets.