File: csp1.html

package info (click to toggle)
fossil 1%3A2.27-2
  • links: PTS
  • area: main
  • in suites: sid
  • size: 28,724 kB
  • sloc: ansic: 334,116; tcl: 14,158; javascript: 10,327; sh: 6,791; makefile: 4,290; pascal: 1,139; cpp: 1,001; cs: 879; sql: 376; asm: 281; perl: 166; xml: 95
file content (18 lines) | stat: -rw-r--r-- 545 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html>
<html>
<head>
<title>Title: Content Security Policy Test</title>
</head>
<body>
<h1>Content Security Policy Test</h1>

<p>If the content-security-policy is ineffective, a pop-up dialog
box will appears.  If there is no dialog box, then CSP is working
correctly.</p>

<script>alert('Content Security Policy is ineffective');</script>
<img src='/' onerror='alert("CSP is ineffective")'>

<p>As a double-check, open the Developer Console in your web-browser
and verify that two CSP violations were detected and blocked.</p>
</body>