COOKIE or coding
| From: | Zhao chunliang[chunliang.zhao] | Date: | Wed, 05 Nov 2008 09:42:08 +0000 |
| Subject: | COOKIE or coding | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-282908@lists.php.net to get a copy of this message | ||
Dear: all
That is very abnormality.
1.Open the url : http://127.0.0.1/showCookie.php
ShowCookie.php code:
<?php
var_dump($_COOKIE);
?>
That's print:
[TCSPUBLICJAUTHM] =>
USER_ID=/zhW/2QXY/GUtIN7m4 dNQ==
2. The same window, input the string
"javascript:alert(document.cookie);" and enter, it's show :
3. now , I change the showCookie.php
<?php
echo "<script>alert('" .
$_COOKIE['TCSPUBLICJAUTHM'] . "');</script>";
var_dump($_COOKIE);
?>
That's print:
I think the cookie in php being changed.
Look forward to your help