【问题标题】:SMTP shows credentials in base64 encoded formSMTP 以 base64 编码形式显示凭据
【发布时间】:2018-09-09 10:50:57
【问题描述】:

我正在使用 PHPMailer 使用我的 gmail 帐户发送电子邮件。如果我使用 REST 客户端访问 PHP 文件,它会为我提供各种客户端服务器通信数据,其中我发现我自己的 gmail 用户名和密码是用 base64 编码发送的,任何人都可以使用类似的工具轻松地将其反转为纯文本burpsuite 拦截。这个 PHP 文件是使用 ajax 调用的,我得到了所有响应该 PHP 文件的信息。如何阻止 PHP 文件将此信息发送到客户端?

部分设置如下:

require_once('class.phpmailer.php');
include 'class.smtp.php';

$mail             = new PHPMailer();

$mail->IsSMTP(); // telling the class to use SMTP

$mail->SMTPDebug  = 2;                     // enables SMTP debug information (for testing)
                                          // 1 = errors and messages
                                          // 2 = messages only
$mail->SMTPAuth   = true;                  // enable SMTP authentication
$mail->SMTPSecure = "ssl";                 // sets the prefix to the servier
$mail->Host       = "ssl://173.194.67.109";      // sets GMAIL as the SMTP server
$mail->Port       = 465; 

【问题讨论】:

    标签: php email smtp gmail smtp-auth


    【解决方案1】:

    知道了,这是因为 SMTPDebug 设置为 2,注释掉了该行并且问题已解决。

    【讨论】:

      猜你喜欢
      • 2016-09-08
      • 1970-01-01
      • 2014-11-11
      • 2019-01-20
      • 2015-07-21
      • 2016-03-17
      • 2019-06-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多