#1 Formmail bug

closed
Dave Cross
None
1
2012-05-18
2008-02-26
Anonymous
No

NMS FormMail Version 3.14c1 has a bug in which the script errors "The HTML form fails to specify the POST method" on submit.

The error is on line 2235: if ($method ne 'POST')
The 'ne' operator is wrong and should be 'eq'.

I ran into this when my web host switched to a new platform and the NMS script no longer worked.

Discussion

  • Logged In: NO

    You can delete this bug post. It is the server NMS is residing on that is somehow flipping the POST method to a GET method. I was never able to figure out why, but this "fix" was made to get around it. I am not confident that this "fix" doesn't compromise NMS's security so I have no alternative but to switch to a different form script.

     
  • Dave Cross
    Dave Cross
    2008-03-02

    Logged In: YES
    user_id=34146
    Originator: NO

    It looks to me as though the existing code is exactly right. The method is called "check_method_is_post" and the logic basically says:

    if ($method ne 'POST') {
    # return an error
    } else {
    # everything is ok
    }

    I can't see any problem with the code as it exists.