Make WordPress Core

Opened 15 years ago

Last modified 7 years ago

#17450 reopened defect (bug)

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

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

Description

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 15 years ago.
17450.patch​ (770 bytes ) - added by peaceablewhale 15 years ago.

Download all attachments as: .zip

Change History (16)

#1 @solarissmoke
15 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
15 years ago

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

#3 @peaceablewhale
15 years ago

Revised patch. Workaround now applies to Apache only.

#4 @peaceablewhale
15 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
15 years ago

  • Version 3.1.2 → 3.2

#6 @peaceablewhale
15 years ago

  • Owner set to westi
  • Status new → 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
15 years ago

  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status reviewing → closed

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

#8 @SergeyBiryukov
15 years ago

  • Milestone → 3.3
  • Resolution duplicate
  • Status closed → reopened
  • Version 3.2 → 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 15 years ago by SergeyBiryukov (previous) (diff)

#9 @SergeyBiryukov
15 years ago

  • Keywords needs-unit-tests added

#10 @SergeyBiryukov
15 years ago

  • Milestone 3.3 → Future Release

#11 @peaceablewhale
15 years ago

How may unit test cases be made?

#12 @SergeyBiryukov
15 years ago

  • Milestone Future Release → 3.4

#13 @nacin
15 years ago

  • Keywords 3.5-early added
  • Milestone 3.4 → Future Release

Keeping on the same path as #10249.

#14 @chriscct7
12 years ago

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

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

Note: See TracTickets for help on using tickets.