WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#11916 closed defect (bug) (fixed)

malformed redirect by wp-app.php when installed in an alternative directory

Reported by: macTijn Owned by: josephscott
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9.1
Component: AtomPub Keywords: atompub
Focuses: Cc:

Description

I am getting a wrong redirect form wp-app.php when I have my wordpress install in an alternative directory.

Situation:

  • WordPress installed in $SITEROOT/wordpress/
  • cp $SITEROOT/wordpress/index.php $siteroot/index.php with include "fixed" as per instructions on codex
  • enabled Atom publishing feature

Current (defective) behavior:
when requesting $SITE/wordpress/wp-app.php I get a redirect to $SITE/wp-app.php/service

Expected behavior:
when requesting $SITE/wordpress/wp-app.php I get a redirect to $SITE/wordpress/wp-app.php/service

I have not seen or tested any other forms of Location-related bugs.

Attachments (1)

wp-app.patch (546 bytes) - added by macTijn 4 years ago.
patch to fix path error

Download all attachments as: .zip

Change History (11)

comment:1 macTijn4 years ago

  • Version changed from 2.9 to 2.9.1

comment:2 macTijn4 years ago

I found that all absolute href's in the /service document are wrong this way.

comment:3 macTijn4 years ago

  • Resolution set to invalid
  • Status changed from new to closed

...however, I spoke too fast. This seems to be fixed in trunk, according to https://core.trac.wordpress.org/changeset?old_path=/tags/2.9.1/wp-app.php&old=12730&new_path=/trunk/wp-app.php&new=12730

closing bug, pardon me for bothering.

macTijn4 years ago

patch to fix path error

comment:4 macTijn4 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

spoke too soon. added patch that fixes it.

comment:5 josephscott4 years ago

This patch looks good, fixed the problem in my tests.

Though I'm not sure why you'd request wp-app.php by itself, the AtomPub RSD entry lists wp-app.php/service as the end point.

comment:6 nacin4 years ago

This should be home_url() which should allow us to clean out that old HTTPS check. (Which otherwise should be replaced with is_ssl()).

comment:7 josephscott4 years ago

There are likely several items in wp-app.php that could be brought up to speed with current WP methods. That should probably be addressed in a separate ticket (likely more than one) instead of adding them all here.

comment:8 mactijn4 years ago

wp-app.php/service also lists the wrong URL's in the XML, so wether I'm requesting $site/$wp-dir/wp-app.php directly is really besides the point.

comment:9 nacin4 years ago

  • Milestone changed from Future Release to 3.0

I've changed this code in [13427]. Changing home_url() to site_url() makes to me here sense.

comment:10 nacin4 years ago

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

(In [14136]) Switch to site_url() as wp-app base. fixes #11916

Note: See TracTickets for help on using tickets.