+ Reply to Thread
Results 1 to 4 of 4

Thread: bad_url not working if detectattacks is true

  1. #1
    Join Date
    Feb 2007
    Posts
    4

    Default bad_url not working if detectattacks is true

    I'm new to formmail so please forgive any newbie ignorance that maybe evident in the following.

    It's possible this should be posted as a bug, but I'm posting it here to see if others have similar issues.

    I successfully had "good_url" work and thought I should setup "bad_url".

    Didn't work when all the form elements had identical data, spent a PILE of time sniffing through the code trying to figure out the issue and came to the conclusion that attack detection happens before "parseInput(array)" is called. Also noticed that detectattacks automatically does a "createpage" without checking for "bad_url" or "bad_template".

    I solved the problem for myself, however this introduces an upgrade issue for me.

    The solution I went for was to change in the function detectAttacks() the createpage() to UserError() and if an attack is detected to parseInput before throwing the UserError.

    Is this an issue others have encountered? Does this seem like a good solution to others?

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

    Default Re: bad_url not working if detectattacks is true

    Hi,

    Test with real data. If you just put in repeating junk into your forms, FormMail will think this is a spammer trying to send spam to you.

    You can disable attack detection if you want by setting ENABLE_ATTACK_DETECTION to false, and then enable it again later when you're putting it into production.

    I don't recommend changing the code.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Feb 2007
    Posts
    4

    Default Re: bad_url not working if detectattacks is true

    The point of the excercise was to test "bad behaviour" and how the script handles it.

    I discovered that it didn't behave as I would like. detectattacks doesn't allow for showing the results of the error (if someone is stupid and as you know, people will always behave worse than we can imagine as programmers) in *my* look and feel. I suppose I could have learned to use the handler you have provided but I chose to learn about the code instead.

    I solved the problem. I thought you and others might be interested in the solution I came up with.

  4. #4
    Join Date
    May 2012
    Posts
    1

    Default Re: bad_url not working if detectattacks is true

    To force FormMail to display my bad_url page if the form input looks like an attack, I set the ATTACK_DETECTION_URL equal to the bad_url value. So whether the user made an error or attempted an attack, they get the same friendly, formatted error message. This minor customization shouldn't present a problem for upgrades to FormMail.

+ 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. good_url always works, bad_url doesn't for one form
    By jwig in forum Community Support
    Replies: 6
    Last Post: 25-Jan-2008, 05:02 AM
  2. bad_url template?
    By nickg21 in forum Community Support
    Replies: 1
    Last Post: 09-Jan-2007, 05:11 PM
  3. good_url, bad_url issues
    By mcameron in forum Community Support
    Replies: 1
    Last Post: 04-Dec-2006, 10:08 PM
  4. bad_url and badly formed 'email' field
    By tsrwebman in forum Community Support
    Replies: 2
    Last Post: 06-Nov-2006, 04:34 PM
  5. Bad_URL?
    By msoucy in forum FormMail Subscription Support
    Replies: 11
    Last Post: 03-May-2004, 12:51 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