PHP 安全邮件转载请标明出处: p 本文来自 CSDN 博客。x
PHP 如何运行 E-mail Injections
look at the PHP code from the previou chapterFirst.:
先来看一下上一章讲到 PHP 代码: 首先。
<html>
<body><?php
将很不安全。 if isset There is a weak in the PHP e-mail script in the previou chapter. 如果运用前一章讲到 PHP 邮件发送脚本发送邮件的话。
--------------------------------------------------------------------------------
PHP E-mail InjectionsPHP 如何运行 E-mail Injections
先来看一下上一章讲到 PHP 代码: First, look at the PHP code from the previou chapter: 首先。
<html>
<body>___FCKpd___1</body>
</html>
The problem with the code abov is that unauthor user can insert data into the mail header via the input form. 上述代码的问题就是未被授权的用户也可以通过输入表单向邮件标题 [mail header] 中插入数据信息。
将会发生什么情况呢? What happen if the user add the follow text to the email input field in the form? 如果用户将下面的文本添加到表单中的 email 输入框中。
someone@example.com%0A Cc:person2@example.com
person3@example.com,%0A Bcc:person3@example.com.
person5@example.coanotherperson4@example.com.m
%0A BTo:person6@example.com
e-mail 将会被发送到上述所有的地址中。 The mail function put the text abov into the mail header as usual, and now the header ha an extra Cc:, Bcc:, and To: field. When the user click the submit button, the e-mail will be sent to all of the address above!Mail 函数像往常一样将上述的文本添加到邮件标题中。现在标题中含有 Cc:,Bcc 以及 To: 这样的附加域 [extra field] 当用户点击提交按钮时。
--------------------------------------------------------------------------------
PHP Stop E-mail InjectionsPHP 如何终止运行 E-mail Injections
Th best wai to stop e-mail inject is to valid the input. 终止运行 inject 最佳方法就是去验证输入的信息。
但是现在已经在其中加入了用于检验表单中 E-mail 域的信息输入验证器 ” 具体如下: The code below is the same as in the previou chapter, but now we have ad an input valid that check the email field in the form: 下面这段代码和前一章提到过的相同。
<html>
<body><?php
funct spamcheck $field
{
//eregi perform a case insensit regular express match
$field || eregi "cc:", if eregi "to:".$field
{
return PUE;
}
else
{
return FA LSE;
}
send emai }//if "email" is fill out.l
将很不安全。 if isset There is a weak in the PHP e-mail script in the previou chapter. 如果运用前一章讲到 PHP 邮件发送脚本发送邮件的话。
--------------------------------------------------------------------------------
PHP E-mail InjectionsPHP 如何运行 E-mail Injections
先来看一下上一章讲到 PHP 代码: First, look at the PHP code from the previou chapter: 首先。
<html>
<body><?php
将很不安全。 if isset There is a weak in the PHP e-mail script in the previou chapter. 如果运用前一章讲到 PHP 邮件发送脚本发送邮件的话。
--------------------------------------------------------------------------------
PHP E-mail InjectionsPHP 如何运行 E-mail Injections
先来看一下上一章讲到 PHP 代码: First, look at the PHP code from the previou chapter: 首先。
<html>
<body>___FCKpd___1</body>
</html>
The problem with the code abov is that unauthor user can insert data into the mail header via the input form. 上述代码的问题就是未被授权的用户也可以通过输入表单向邮件标题 [mail header] 中插入数据信息。
将会发生什么情况呢? What happen if the user add the follow text to the email input field in the form? 如果用户将下面的文本添加到表单中的 email 输入框中。