Make WordPress Core

Opened 8 years ago

Last modified 3 months ago

#17450 reopened defect (bug)

Almost pretty permalinks with non-ASCII characters do not work in Apache

Reported by: peaceablewhale Owned by: westi
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.1
Component: Permalinks Keywords: needs-unit-tests, needs-refresh, bulk-reopened
Focuses: Cc:


Almost pretty permalinks (using PATH_INFO) with non-ASCII characters do not work in Apache; a not found error is returned. The same permalink works in IIS when UTF-8 is used for server variables. It also works when mod_rewrite is used.

Attachments (2)

17450.diff (975 bytes) - added by solarissmoke 8 years ago.
17450.patch (770 bytes) - added by peaceablewhale 8 years ago.

Download all attachments as: .zip

Change History (18)

8 years ago

#1 @solarissmoke
8 years ago

  • Keywords has-patch needs-testing added

The problem is not just with Apache. Here's the issue: PATH_INFO is (according to the CGI spec) supplied url-decoded, but REQUEST_URI us url-encoded. !Wordpress does string comparisons on these two, which is fine when there are only ascii characters in the URL, but fails when there are others.

Here is a patch that works for me. I imagine it will need some testing to make sure the behaviour is consistent in all environments.

#2 @peaceablewhale
8 years ago

Patch breaks almost pretty permalinks in IIS. Trying to fix it.

#3 @peaceablewhale
8 years ago

Revised patch. Workaround now applies to Apache only.

#4 @peaceablewhale
8 years ago

Unfortunately, encoding PATH_INFO does not work either. I have reversed the patch logic so that we now decode REQUEST_URI instead. Verified effective in both IIS and Apache.

#5 @peaceablewhale
8 years ago

  • Version changed from 3.1.2 to 3.2

#6 @peaceablewhale
8 years ago

  • Owner set to westi
  • Status changed from new to reviewing

westi, I guess you may be the appropriate person to review this ticket, as I noticed your experience in resolving tickets related to servers~

#7 @SergeyBiryukov
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from reviewing to closed

This is caused by [15960] and can be fixed by the latest patches in #10249.

#8 @SergeyBiryukov
8 years ago

  • Milestone set to 3.3
  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Version changed from 3.2 to 3.1

Not exactly a duplicate of the original #10249 bug, just related. 3.1 is the earliest affected version.

Still, 10249.4.patch fixes this.

Last edited 8 years ago by SergeyBiryukov (previous) (diff)

#9 @SergeyBiryukov
8 years ago

  • Keywords needs-unit-tests added

#10 @SergeyBiryukov
8 years ago

  • Milestone changed from 3.3 to Future Release

#11 @peaceablewhale
7 years ago

How may unit test cases be made?

#12 @SergeyBiryukov
7 years ago

  • Milestone changed from Future Release to 3.4

#13 @nacin
7 years ago

  • Keywords 3.5-early added
  • Milestone changed from 3.4 to Future Release

Keeping on the same path as #10249.

#14 @chriscct7
4 years ago

  • Keywords needs-refresh added; has-patch needs-testing 3.5-early removed
  • Severity changed from major to normal

This and #10249 could be fixed and tested together probably considering comment:8

#15 @iseulde
5 months ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from reopened to closed

This ticket has not seen any activity in over *two* years, so I'm closing it as "wontfix".

The ticket may lack decisiveness, may have become irrelevant, or may not have gathered enough interest.

If you think this ticket does deserve some attention again, feel free to reopen.

For bugs, it would be great if you could provide updated steps to reproduce against the latest version of WordPress (5.0.2 at the time of writing). Remember images or a video can be superior to explain a problem. At the very least, quickly test again to make sure the bug still exists.

If it’s an enhancement or feature, some extra motivation may help.

Thank you for your contributions to WordPress! <3

#16 @JeffPaul
3 months ago

  • Keywords bulk-reopened added
  • Milestone set to Awaiting Review
  • Resolution wontfix deleted
  • Status changed from closed to reopened

A decision was made to reopen tickets that were closed in the bulk edit that this ticket was affected by. This ticket is being placed back into the Awaiting Review milestone so it can be individually evaluated and verified to determine if it is still relevant/valid or reproducible.

Note: See TracTickets for help on using tickets.