Is PHPMailer Secure

后端 未结 2 920
隐瞒了意图╮
隐瞒了意图╮ 2021-01-25 10:53

I know this probably isn\'t an easy question but I\'m developing several webforms and want a PHP library that I can use to send the mail and have it automatically sanitize the d

2条回答
  •  不知归路
    2021-01-25 11:34

    PHPMailer doesn't create/use any SQL itself, nor does it have anything to do with javascript, so it's secure on those fronts. It is often used alongside code that does both, but that's not PHPMailer's concern.

    It applies filtering to headers in order to avoid header injection attacks, and (as far as I'm aware!) builds headers correctly in order to escape and encode according to RFCs - generally PHPMailer favours strict technical compliance where practical. There is one open issue relating to line length compliance.

    If run with PHP 5.6 using default settings, it verifies SSL/TLS certificates on secure connections. Earlier PHP versions don't do this by default, and you can disable it in PHP 5.6, though neither is recommended. There is an open issue relating to forcing this setting in earlier PHP versions.

    All that said, of course PHPMailer (like any technical library) can be abused to send all kinds of nasty phishing, spam and malware, and the SMTP class can be used to try to confuse the hell out of mail servers, though it will try its hardest to ensure it does so with the utmost respect for the RFCs.

提交回复
热议问题