Is this mail() function safe from header injection?

前端 未结 3 1110
北荒
北荒 2020-12-10 04:31

I\'m building a simple contact form for a website. It does not connect to a database, it just sends the email. Will this code prevent spammers from using header injections?

3条回答
  •  天命终不由人
    2020-12-10 05:14

    Nope, that doesn't sanitize anything.

    It would be very very easy to fudge up that mailer.

    I can add anything in a post value (that you read) to manipulate the mailer.

提交回复
热议问题