Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#4698 closed defect (bug) (invalid)

WordPress Unable to handle Long URL with page Slug

Reported by: therealhopeful's profile therealhopeful Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords: page, slug, url
Focuses: Cc:

Description

Hello folks. I've run into a really weird problem with WordPress. It seems that it cannot recognise a page slug, if there are more than 61 characters after the question mark ('?') in in the URL.

For example, I have a page at this location:

http://www.correctnesscommentary.com/contact/

This page deterministically displays content depending on what information is fed to it via the URL (GET). I get a 404 error when attempting to go to this address:

http://www.correctnesscommentary.com/contact/?type=list&action=confirm&address=jfell3%40wi%2Err%2Ecom&name=Jim&code=3

However, if I trim the URL back by one character at a time and refresh the browser, this URL will work (with reduced page funcionality because of fewer variables):

http://www.correctnesscommentary.com/contact/?type=list&action=confirm&address=jfell3%40wi%2Err%2Ecom&name=

As you can see in this example, WordPress seems to only be able to buffer/ignore the first 61 characters after the question mark ('?').

So, this leads to several questions. Does anyone know if this is a reported bug? I tried to report it, but for some reason I couldn't get into the bug-reporting system. :( Also, where in the wordpress files is this situation handled (variables passed via GET to slugged pages)? I'm pretty good with code, so I could probably fix it myself, if I knew where the fix'n needs to be done. :)

Thanks!

Change History (1)

#1 @Otto42
16 years ago

  • Resolution set to invalid
  • Severity changed from blocker to normal
  • Status changed from new to closed
  • Version 2.2.1 deleted

It's not a 61 character limit, it's a problem because you're using "name" which is used elsewhere in Wordpress.

When making your own form like this, the best course of action is to prefix all your form field names with some unique string, like "mcf-" (my contact form) or something else. This prevents your form variables from interfering with Wordpress's own form variable checks.

Change the variable "name" to anything else (mcf-name, for example) and your form will probably work.

Note: See TracTickets for help on using tickets.