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 using cookies

May 19, 2011 11:10am

Subscribe [3]
  • #1 / May 19, 2011 11:10am

    Eastwood Design

    605 posts

    running EE 1.7

    I am having some issues with a form form when combined with using cookies.

    In my form if a user does not enter a required field I want them to go back and still have the fields populated so they do not have to reenter all their info again.

    So I am using a cookie to save the form contents, problem is when I go back to the form all I get is the error: Disallowed Key Characters

    Here is the contents of the cookie:

    formname=|21|/home/conference_register/||open|home/conference_confirm||http://www.domain.com/index.php/home/conference_register/|2011WorkshopRegistration|freeform|1868|1|Mr|||||||||||||0|||||||0||

    here is the string form the error:
    ( I changed core.input.php to display the string

    exit(“Disallowed Key Characters: $str”);


    Disallowed Key Characters: formname=|21|/home/conf_test/||open|home/conference_confirm||http://www_privacyinfoagency_com/pia/index_php/home/conf_test/|2011WorkshopRegistration|freeform|1871|1|Mr|||||||||||||0|||||||0||

    Where is my disallowed character?

  • #2 / May 19, 2011 1:21pm

    Paul Stone

    97 posts

    According to this post (http://ellislab.com/forums/viewthread/55583/P18/#288096) the pipe ‘|’ and the period ‘.’ is not permitted in the cookie?

  • #3 / May 19, 2011 6:06pm

    Brandon Jones

    5500 posts

    Nice find, Paul. Does this help, Eastwood Design? Can you use another delimiter?

  • #4 / May 19, 2011 6:14pm

    Eastwood Design

    605 posts

    thanks, I am going to check and see if I can use another delimiter.  If not is there a config I can add to accept a pipe?

  • #5 / May 20, 2011 2:38pm

    Brandon Jones

    5500 posts

    Hi Eastwood Design,

    I believe those are not considered valid cookie characters in any application, though your mileage may very, it’d be best to play it safe. I’m not aware of a configuration value that affects this.

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

ExpressionEngine News!

#eecms, #events, #releases