ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

"Disallowed Key Characters" on 404 page

April 14, 2009 5:33pm

Subscribe [5]
  • #1 / Apr 14, 2009 5:33pm

    wrightmight

    17 posts

    The site I’m developing is running on IIS (if I could change to linux, I would…but that’s besides the point). I contacted the hosting company and had them point all 404’s to this page: http://pacmeddna.adhostclient.com/index.php/404

    They changed server settings to point to the above page, but unfortunately when going to a non-existent page a “Disallowed Key Characters” message is the only thing that displays. I researched and couldn’t find a solution, but found a suggestion in this thread to change code in core.input.php so the disallowed characters are displayed:

    exit('Disallowed Key Characters');

    to

    exit("Disallowed Key Characters: $str");

    After making that temp code change I now receive this message instead:

    Disallowed Key Characters: 404;http://pacmeddna_adhostclient_com:80/index_php/asdfg

    My basic understanding is there’s a character in the string that isn’t allowed (the colon, maybe?), but I’m unsure what step to take at this point to resolve this problem. Any advice?

  • #2 / Apr 14, 2009 5:58pm

    Ingmar

    29245 posts

    While we’ll try to work through this with you, we do not officially support redirecting of 404 pages. May I ask how exactly your host does this redirecting? Something seems to be triggering the filter.

    Another question, do you have any global vars in path.php?

  • #3 / Apr 14, 2009 6:31pm

    wrightmight

    17 posts

    Below is my path.php code. I’ll ask the host how they’re doing the redirect.

    <?php
    
    // ------------------------------------------------------
    // DO NOT ALTER THIS FILE UNLESS YOU HAVE A REASON TO
    
    // ------------------------------------------------------
    // Path to the directory containing your backend files
    
    $system_path = "./[edited_system_path]/";
    
    // ------------------------------------------------------
    // MANUALLY CONFIGURABLE VARIABLES
    // See user guide for more information
    // ------------------------------------------------------
    
    $template_group = "";
    $template = "";
    $site_url = "";
    $site_index = "";
    $site_404 = "";
    $global_vars = array(); // This array must be associative
    
    ?>
  • #4 / Apr 14, 2009 6:52pm

    wrightmight

    17 posts

    Their reply: “We set the 404 page in IIS to be /index.php/404”

  • #5 / Apr 15, 2009 2:46am

    John Henry Donovan

    12339 posts

    wrightmight,

    I believe it is actually the underscore causing your issue.

    This seems unusual as in the all the periods have been replaced with an underscore which is a disallowed key character.

    In anything that I found in my research (minimal) it would appear like so

    404;http://pacmeddna.adhostclient.com:80/index.php/asdfg

    yet you have

    404;http://pacmeddna_adhostclient_com:80/index_php/asdfg

    I would go back to my your host and ask them about the underscores.

  • #6 / Apr 15, 2009 3:06pm

    wrightmight

    17 posts

    Their response: “We are not adding underscores or any other types of character; it is a simple
    IIS settings for 404 errors to go to /index.php/404.”

    Surely someone out there has created a custom 404 page for an EE install on a IIS server…

  • #7 / Apr 15, 2009 3:33pm

    Lisa Wess

    20502 posts

    wrightmight, this is not occurring at any other time other than when using that redirect?

  • #8 / Apr 15, 2009 8:08pm

    wrightmight

    17 posts

    Lisa- correct, this is the only time.

  • #9 / Apr 15, 2009 8:32pm

    Lisa Wess

    20502 posts

    I will run this past the team quickly, but in all honesty I’m not sure that we can offer support for this.  What is happening here is that the XSS Filter is being triggered which can happen with GET or POST data, including the contents of a cookie, and in this case, a redirect.

    What John points out is important here, why is the redirect like:

    404;http://pacmeddna_adhostclient_com:80/index_php/asdfg

    instead of with periods as one would expect?  What is the redirect doing that would cause that?

  • #10 / Apr 15, 2009 9:02pm

    Lisa Wess

    20502 posts

    Alright, I’ve checked with the dev team, what we need to identify for sure is where those URLs are coming from, can you check with your host about exactly how they’re implementing the redirect?

  • #11 / Apr 17, 2009 1:44am

    wrightmight

    17 posts

    Feel like I’m going in circles with the hosting company, who isn’t giving me any additional info. So considering we need to launch the site on Monday, I’m going to create a static 404.html page outside of EE for the time being.

    Thanks for following up with me! Hopefully I’ll get back to this eventually and figure out what’s wrong…

  • #12 / Apr 17, 2009 2:18am

    John Henry Donovan

    12339 posts

    Thanks for the update.

    Just to recap, is there any reason why you didn’t use the 404 setting in your template preferences and are using the server setting instead?

  • #13 / Apr 17, 2009 4:05pm

    wrightmight

    17 posts

    The first thing I did was change the “Templates > Template Preferences > 404 Page” setting to home/404 (where my 404 page resides, obviously), but that didn’t fix things on its own…hence needing to ask the hosting company to specify the 404 page in IIS.

  • #14 / Apr 17, 2009 4:08pm

    Sue Crocker

    26054 posts

    So has the hosting company responded yet?

  • #15 / Apr 20, 2009 7:25pm

    wrightmight

    17 posts

    They responded, but couldn’t give me any information as to how the underscores were appearing. In the end I created a static 404.html page outside of EE and told them to redirect to that file instead.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases