Skip to content

Commit 7a5be45

Browse files
committed
Updated layout
1 parent 244d7ea commit 7a5be45

2 files changed

Lines changed: 42 additions & 38 deletions

File tree

sql-injection/src/main/webapp/index.jsp

Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,52 +10,42 @@
1010

1111
<p><strong>Valid customers are:</strong> Arthur Dent, Ford Prefect, Tricia Trillian McMillan, Zaphod Beeblebrox, Marvin, Slartibartfast</p>
1212

13-
<h2>Using Statement</h2>
14-
13+
<p>Use <strong>&apos; or &apos;1&apos;=&apos;1</strong> to attack the database.</p>
14+
1515
<form name="stmt" method="post" action="StatementServlet">
16-
<table>
17-
<tr>
18-
<td><label for="stmt" title="Name">Name</label></td>
19-
<td><input type="text" id="stmt" name="name" class="text-input" /></td>
20-
<td><input type="submit" value="Submit" /></td>
21-
</tr>
22-
</table>
16+
<fieldset>
17+
<legend>Using a simple Statement</legend>
18+
<label for="stmt" title="Name">Name</label>
19+
<input type="text" id="stmt" name="name" class="text-input" />
20+
<input type="submit" value="Search" />
21+
</fieldset>
2322
</form>
2423

25-
<h2>Using Statement with Escaping</h2>
26-
2724
<form name="stmtEsc" method="post" action="StatementEscapingServlet">
28-
<table>
29-
<tr>
30-
<td><label for="stmtEsc" title="Name">Name</label></td>
31-
<td><input type="text" id="stmtEsc" name="name" class="text-input" /></td>
32-
<td><input type="submit" value="Submit" /></td>
33-
</tr>
34-
</table>
25+
<fieldset>
26+
<legend>Using an escaped Statement</legend>
27+
<label for="stmtEsc" title="Name">Name</label>
28+
<input type="text" id="stmtEsc" name="name" class="text-input" />
29+
<input type="submit" value="Search" />
30+
</fieldset>
3531
</form>
3632

37-
<h2>Using Prepared Statement</h2>
38-
3933
<form name="pstmt" method="post" action="PreparedStatementServlet">
40-
<table>
41-
<tr>
42-
<td><label for="pstmt" title="Name">Name</label></td>
43-
<td><input type="text" id="pstmt" name="name" class="text-input" /></td>
44-
<td><input type="submit" name="submit" value="Submit" /></td>
45-
</tr>
46-
</table>
34+
<fieldset>
35+
<legend>Using a Prepared Statement</legend>
36+
<label for="pstmt" title="Name">Name</label>
37+
<input type="text" id="pstmt" name="name" class="text-input" />
38+
<input type="submit" name="submit" value="Search" />
39+
</fieldset>
4740
</form>
4841

49-
<h2>Using Hibernate Query Language (HQL)</h2>
50-
5142
<form name="hql" method="post" action="HQLServlet">
52-
<table>
53-
<tr>
54-
<td><label for="hql" title="Name">Name</label></td>
55-
<td><input type="text" id="hql" name="name" class="text-input" /></td>
56-
<td><input type="submit" name="submit" value="Submit" /></td>
57-
</tr>
58-
</table>
43+
<fieldset>
44+
<legend>Using the Hibernate Query Language (HQL)</legend>
45+
<label for="hql" title="Name">Name</label>
46+
<input type="text" id="hql" name="name" class="text-input" />
47+
<input type="submit" name="submit" value="Search" />
48+
</fieldset>
5949
</form>
6050
</body>
6151
</html>

sql-injection/src/main/webapp/resources/css/styles.css

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,26 @@ h2 {
1111
}
1212

1313
td {
14-
font-size: 115%;
14+
font-size: 1.2em;
1515
}
1616

1717
th {
1818
background-color: darkgrey;
1919
padding: 2pt;
2020
font-weight: bold;
21-
font-size: 125%;
21+
font-size: 1.2em;
22+
}
23+
24+
.text-input {
25+
width: 250px;
26+
}
27+
28+
p {
29+
font-size: 1.2em;
30+
}
31+
32+
fieldset {
33+
width: 800px;
34+
font-size: 1.2em;
35+
margin-top: 20px;
2236
}

0 commit comments

Comments
 (0)