/
cookieValues.php
49 lines (49 loc) · 2.08 KB
/
cookieValues.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
setcookie('cookieValue', '1 + 2 = 3', time() + 86400, '/');
?>
<!DOCTYPE html>
<html>
<head>
<title>Escaped and unescaped cookie values</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link href="../../_common/testcase.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<header>
<h1>Escaped and unescaped cookie values</h1>
</header>
<div>
<section id="description">
<h3>Steps to reproduce</h3>
<ol>
<li>Open Firebug</li>
<li>
Enable and switch to the <em>Cookies</em> panel<br/>
<span class="ok">⇒ The panel should list a <code>cookieValue</code> cookie.</span>
</li>
<li>
Right-click the <em>Cookies</em> panel column header and check <em>Raw Value</em><br/>
<span class="ok">
⇒ The <em>Value</em> column of the <code>cookieValue</code>
should contain <code>1 + 2 = 3</code> and the <em>Raw Value</em> column
<code>1+%2B+2+%3D+3</code>.
</span>
</li>
<li>
Expand the cookie<br/>
<span class="ok">⇒ The <em>Value</em> tab should display <code>1 + 2 = 3</code>.</span>
</li>
<li>
Switch to the <em>Raw Data</em> tab<br/>
<span class="ok">⇒ The <em>Raw Data</em> tab should display <code>1+%2B+2+%3D+3</code>.</span>
</li>
</ol>
<h3>Expected result</h3>
<ul>
<li>The cookie value must be shown in its raw form and in the URL escaped form.</li>
</ul>
</section>
<footer>Sebastian Zartner, sebastianzartner@gmail.com</footer>
</div>
</body>
</html>