• Howdy (first post!)
    I’m all new and stuff to the WordPress package (so far so awesome) and have encountered some strange behavior. There is first the conclusion and seccond the ‘how I discovered this’ bit which may lead the way to figuring out how to prevent this from happening in the future (if it is indeed a bug).
    1) A cookie set by a wiki website on my server, in a different directory than wordpress, affected the functioning of my WordPress site. Specifically, a cookie with the name “name” caused WordPress to read the contents of that cookie as if I were requesting a post so-named. This returned a “Sorry, no posts matched your criteria” page.
    2) I noticed this because I was having some difficulty working between the “www.domain.com” and “domain.com” instances of my site. In hindsight, I should have realized early on that one of the tools that differentiates between these two instances is cookies. Through some error-log outputting, I discovered that when I accessed the “domain.com” version of my site, WordPress constructed it’s $request with a "post_name = 'reweck'" element.
    Through further digging, it became apparant that “reweck” is the regexed version of my login name from the wiki! – “DrewBeck” (regexed from line 194 of wp-post-header.php, or therabouts). So somewhere, WordPress was reading the cookie named “name” and inputting the data from it into the $name variable.
    This seems a strange side-effect to some code, somewhere. It could perhaps be easily fixed if the cookies were scoped in such a way that access was limited to the WordPress directory (that is, so WordPress would only look for cookies so scoped).
    This isn’t the sort of thing that is a major bug, I don’t think, but it may suggest some imprecise coding that could cause some grief down the line.

    In related news, I love WordPress!
    -drew

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘v. Strange Cookie Behavior (bug?)’ is closed to new replies.