Skip to content

Commit 966a99f

Browse files
authoredSep 10, 2024
handle extra space before equal sign (#392)
* Signed-off-by: Emmanuel Jannetti <emmanuel.jannetti@oracle.com> 391: Add handle of extra space before equal sign * Signed-off-by: Emmanuel Jannetti <emmanuel.jannetti@oracle.com> change some text fields
1 parent e0956a3 commit 966a99f

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed
 

‎java/jdbc/statement-interceptor/demo-app/src/main/java/com/oracle/jdbc/samples/statementinterceptordemo/models/Statistic.java

+2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ public class Statistic {
4444
/**
4545
* minimum operation time in milliseconds
4646
*/
47+
@Builder.Default
4748
private double minTime = -1.0;
4849
/**
4950
* maximum operation time in milliseconds
5051
*/
52+
@Builder.Default
5153
private double maxTime = -1.0;;
5254
/**
5355
* total operation time in milliseconds

‎java/jdbc/statement-interceptor/demo-app/src/main/resources/demoStatementRules.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
{
2424
"className": "com.oracle.jdbc.samples.interceptor.rules.RegExpStatementRule",
25-
"parameter": "(.|\\s)*(OR|or)\\s*('.*'|\\d*)=('.*'|\\d*)(.|\\s)*",
25+
"parameter": "(.|\\s)*(OR|or)\\s*('.*'|\\d*)(.|\\s)*=(.|\\s)*('.*'|\\d*)(.|\\s)*",
2626
"actions": [
2727
"CONSOLE",
2828
"RAISE"

‎java/jdbc/statement-interceptor/demo-app/src/main/resources/templates/demohome.html

+5-8
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,8 @@ <h1 class="text-center">Welcome to JDBC Statement interceptor
4444
to analyse outgoing SQL statements.
4545
</p>
4646
<p class="lh-1 text-center">
47-
This application datasources are configured to leverage Statement
48-
listener of the <a
49-
href="https://github.com/ejannett/oracle-db-examples/tree/375-interceptor/java/jdbc/statement-interceptor/interceptor" target="_blank">JDBCInterceptor
50-
project</a>
51-
47+
This application's datasource uses the <a
48+
href="https://github.com/ejannett/oracle-db-examples/tree/375-interceptor/java/jdbc/statement-interceptor/interceptor" target="_blank">JDBC Interceptor</a> to monitor and intercept SQL
5249
</p>
5350
<p class="lh-1 text-center">
5451
Source code and detailed information about this demonstration can be found in
@@ -62,7 +59,7 @@ <h1 class="text-center">Welcome to JDBC Statement interceptor
6259
<button class="btn btn-primary" type="button"
6360
data-bs-toggle="collapse" data-bs-target="#offcanvasParams"
6461
aria-expanded="false" aria-controls="collapseExample">
65-
Interceptor rules...
62+
Show rules...
6663
</button>
6764
</div>
6865
<div class="collapse" id="offcanvasParams">
@@ -80,7 +77,7 @@ <h1 class="text-center">Welcome to JDBC Statement interceptor
8077
Click the submit button to get all.
8178
</p>
8279
<p>
83-
To trigger an SQL injection, you can try the following search criteria
80+
To trigger a SQL injection, you can try the following search criteria
8481
</p>
8582
<p class="font-monospace">' or 'a'='a</p>
8683
</div>
@@ -124,7 +121,7 @@ <h1 class="text-center">Welcome to JDBC Statement interceptor
124121

125122
</script>
126123
<div class="footer fixed-bottom p-2">
127-
<div class="fs-6">
124+
<div class="fs-5 text-center bg-secondary-subtle">
128125
Happily deployed using the <a class="link-primary" target="_blank" href="https://cloudmarketplace.oracle.com/marketplace/en_US/listing/149023331">App Stack for Java</a> in the Oracle Cloud Infrastructure &#127882; &#127873;.
129126
</div>
130127
</div>

‎java/jdbc/statement-interceptor/interceptor/src/main/resources/rules.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
{
1717
"className": "com.oracle.jdbc.samples.interceptor.rules.RegExpStatementRule",
18-
"parameter": "(.|\\s)*(OR|or)\\s*('.*'|\\d*)=('.*'|\\d*)(.|\\s)*",
18+
"parameter": "(.|\\s)*(OR|or)\\s*('.*'|\\d*)(.|\\s)*=(.|\\s)*('.*'|\\d*)(.|\\s)*",
1919
"actions": ["CONSOLE","RAISE"]
2020
}
2121
]

0 commit comments

Comments
 (0)
Failed to load comments.