Debian Codegraph @

samples/tests/spec/scripting/security.svg

raw
1 <?xml version="1.0" standalone="no"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
3 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
5 <!--
6
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
13
14 http://www.apache.org/licenses/LICENSE-2.0
15
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
21
22 -->
23 <!-- ========================================================================= -->
24 <!-- Checks that access to critical functions is not allowed. -->
25 <!-- Specifically, this test checks that: -->
26 <!-- -->
27 <!-- - access to local files is denied. -->
28 <!-- - access to the network via sockets is denied. -->
29 <!-- - access to audio is denied. -->
30 <!-- - access to logging is denied. -->
31 <!-- - access to network features is denied. -->
32 <!-- - access to system properties is denied. -->
33 <!-- - access to serialization is denied. -->
34 <!-- - access to SQL log is denied. -->
35 <!-- - access to SSL is denied. -->
36 <!-- -->
37 <!-- @author [email protected] -->
38 <!-- @version $Id$ -->
39 <!-- ========================================================================= -->
40
41 <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
42
43 <svg xmlns="http://www.w3.org/2000/svg"
44 xmlns:xlink="http://www.w3.org/1999/xlink"
45 width="450" height="500" viewBox="0 0 450 500">
46 <title>Check Security Settings on Load</title>
47
48 <script type="text/ecmascript" xlink:href="../../resources/script/scrollbar.js"/>
49 <script type="text/ecmascript" xlink:href="../../resources/script/common.js"/>
50 <script type="text/ecmascript" xlink:href="../../resources/script/rhinoSecurity.js" />
51
52 <style type="text/css"><![CDATA[
53 .cellLabel {
54 fill: white;
55 stroke: black;
56 shape-rendering: crispEdges;
57 }
58
59 .cellStatus {
60 stroke: black;
61 shape-rendering: crispEdges;
62 }
63
64 .label {
65 font-size: 12;
66 font-family: sans-serif;
67 fill: black;
68 text-anchor: middle;
69 }
70
71 .passedTest {
72 fill: rgb(0,200,50);
73 stroke: none;
74 shape-rendering: crispEdges;
75 }
76
77 .failedTest {
78 fill: crimson;
79 stroke: none;
80 shape-rendering: crispEdges;
81 }
82
83 #table {
84 stroke: black;
85 }
86
87 .untested {
88 fill: gray;
89 stroke: none;
90 shapeRendering: crispEdges;
91 }
92
93 .tableCell {
94 fill: none;
95 stroke: black;
96 shapeRendering: crispEdges;
97 }
98 ]]>
99 </style>
100
101 <!-- ============================================================= -->
102 <!-- Test content -->
103 <!-- ============================================================= -->
104 <g id="testContent">
105 <text x="225" y="30" class="title">
106 ECMA Script Security Check
107 </text>
108
109 <defs>
110 <g id="row" fill="gray">
111 <rect id="rowLabel" class="cellLabel" x="0" y="0" width="150" height="20"/>
112 <rect id="rowStatus" class="cellStatus" x="150" y="0" width="20"
113 height="20"/>
114 </g>
115 </defs>
116
117 <defs>
118 <clipPath id="clipA">
119 <use xlink:href="#contentClipRect"/>
120 </clipPath>
121
122 <rect id="contentClipRect" x="50" y="70" width="350" height="375"/>
123
124 <g id="upArrow" >
125 <circle cx="6" cy="6" r="6" fill="gray" />
126 <polygon points="0 0, -1 1, 1 1"
127 transform="translate(6, 4) scale(3)"/>
128 </g>
129
130 <g id="downArrow" >
131 <circle cx="6" cy="6" r="6" fill="gray" />
132 <polygon points="0 0, -1 1, 1 1"
133 transform="translate(6, 8) scale(3) rotate(180)"/>
134 </g>
135
136 <g id="cursor">
137 <polygon points="0 0, -1 1, 1 1"
138 transform="translate(2) scale(6) translate(0, 1) rotate(-90)"/>
139 </g>
140
141
142 </defs>
143
144 <g id="securityTableTitle" fill="none" stroke="black" shape-rendering="crispEdges">
145 <rect x="50" y="50" width="330" height="20" fill="lightgray"/>
146 <g>
147 <desc>Test Result</desc>
148 <polygon points="383,53 397,53 383,67" fill="crimson" stroke="none" />
149 <polygon points="383,67 397,67 397,53" fill="rgb(0,200,50)" stroke="none" />
150 </g>
151 <rect x="380" y="50" width="20" height="20" />
152 <text x="215" y="65" text-anchor="middle" stroke="none" fill="black">Security Check Type</text>
153 </g>
154
155 <g transform="translate(0, 0)">
156 <g id="scrolledArea">
157 <g id="clippedArea"
158 onload="new ScrollBar('securityResults', 30, 400, 70, 375, 1200, 12, '#upArrow', '#downArrow', '#cursor', 12)"
159 clip-path="url(#clipA)">
160 <g id="securityResults">
161 <!-- Here is where the security results will be appended -->
162 </g>
163 </g>
164 </g>
165 </g>
166
167 <use xlink:href="#contentClipRect" stroke="rgb(64,64,64)" fill="none"/>
168
169 <!-- =========================================== -->
170 <!-- Button for starting the security check -->
171 <!-- =========================================== -->
172 <g transform="translate(90, 470)" onmouseover="setAttribute('runTest', 'fill', 'gold')"
173 onmouseout="setAttribute('runTest', 'fill', 'lightgray')"
174 onclick="runEcmascriptSecurityTest()">
175 <rect id="runTest" x="-40" y="-10" width="80" height="20"
176 stroke="black" fill="lightgray" />
177
178 <text x="0" y="5" text-anchor="middle">Run Test</text>
179 </g>
180
181 <!-- =========================================== -->
182 <!-- Used to display the overall status -->
183 <!-- =========================================== -->
184 <g id="globalStatusGroup">
185 <rect x="380" y="460" width="20" height="20"
186 class="tableCell" />
187 <rect id="globalStatus"
188 x="383" y="463" width="14" height="14"
189 class="untested" />
190 <text id="successRatio" x="375" y="475" text-anchor="end">not run</text>
191 </g>
192
193 </g>
194
195
196
197 </svg>