+ Reply to Thread
Results 1 to 4 of 4

Thread: Badhandler Problems

  1. #1
    Join Date
    Aug 2004
    Posts
    4

    Default Badhandler Problems

    Hi!
    I have a problem with my form: www.stiligt.se/stila.html. The badhandler-script only saves the teckensnittsnamn-field and not the realname nor the email fields.

    I also want to include the file-field and the radiobuttons in the badhandler-script but i can't figure out how to do.
    Thanks /Jacob

  2. #2
    Join Date
    Dec 2003
    Posts
    3,901

    Default Re: Badhandler Problems

    Hi,

    For the "file" field, forget it - it's a security feature of browsers that prevent you from ever setting this value inside a form. Any "value=" attribute is just ignored. I think the reason is to prevent malicious websites from secretly uploading files from people's computers.

    For your "sort" field, you have the name wrong. A checkbox field would be named "sort[]" but a radio field is just "sort".

    For the "realname" and "email" fields, this is a security feature of FormMail. It won't provide any special fields back to the bad handler.

    The reason for this is that an attacker could use your bad handler to set values for special fields that you don't want changed (e.g. subject, recipients, etc.).

    In actual fact, we're thinking about this more and it's probably a lame idea. We might remove this restriction in a later version.

    To workaround this security feature, you need to use derived fields.

    Here's how:
    1. Rename "realname" to "username".
    2. Rename "email" to "useremail".
    3. Add the following hidden field to your form:
    Code:
    <input type="hidden" name="derive_fields"
    	  value="realname=username,email=useremail" />
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Aug 2004
    Posts
    4

    Default Re: Badhandler Problems

    Weiiiii, it works!
    You are phenomenal!
    Thanks man!

    Ehm.... One question - what is that "/" before the ">" about?
    <input type="hidden" name="derive_fields"
    value="realname=username,email=useremail" />

  4. #4
    Join Date
    Dec 2003
    Posts
    3,901

    Default Re: Badhandler Problems

    Hi,

    That's great news!

    Ehm.... One question - what is that "/" before the ">" about?
    We're gradually making all of our scripts XHTML compliant.

    XHTML requires that stand-alone tags are terminated. So, in XHTML it's valid to write:

    Code:
    <p></p>
    <p></p>
    and

    Code:
    <p />
    <p />
    but not:

    Code:
    <p>
    <p>
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. problems to display template.
    By minorarias in forum FormMail Subscription Support
    Replies: 3
    Last Post: 31-Jan-2005, 10:23 PM
  2. mail_options and template problems
    By middric in forum FormMail Subscription Support
    Replies: 1
    Last Post: 09-Jan-2005, 09:29 PM
  3. Template problems
    By msoucy in forum FormMail Subscription Support
    Replies: 8
    Last Post: 03-Dec-2004, 05:31 AM
  4. csv file problems
    By Badnet in forum FormMail Subscription Support
    Replies: 2
    Last Post: 12-Nov-2004, 03:06 AM
  5. No return link for badhandler
    By ptr in forum FormMail Subscription Support
    Replies: 3
    Last Post: 27-May-2004, 12:27 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts