简体   繁体   中英

Cleaning user input before sending it in mail

I am using PHPMailer class to send mails. Some mails contain user input. Should I clean user input before inserting it to mail body ? How to do this?

Tried to google for it but haven't fount anything useful.

是的,您应该ALWAYS清理/清除用户输入,以防止代码或SQL注入。

Sanitation is always key when handling user input.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM