Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-boot-admin
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
spring-boot-admin
Commits
ad0a38c7
Commit
ad0a38c7
authored
Nov 16, 2017
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the sanitizing for application metadata case-insensitive
fixes #590
parent
8143743d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
Application.java
...ain/java/de/codecentric/boot/admin/model/Application.java
+1
-1
ApplicationTest.java
...java/de/codecentric/boot/admin/model/ApplicationTest.java
+1
-1
No files found.
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/model/Application.java
View file @
ad0a38c7
...
...
@@ -318,7 +318,7 @@ public class Application implements Serializable {
private
static
Pattern
[]
createPatterns
(
String
...
keys
)
{
Pattern
[]
patterns
=
new
Pattern
[
keys
.
length
];
for
(
int
i
=
0
;
i
<
keys
.
length
;
i
++)
{
patterns
[
i
]
=
Pattern
.
compile
(
keys
[
i
]);
patterns
[
i
]
=
Pattern
.
compile
(
keys
[
i
]
,
Pattern
.
CASE_INSENSITIVE
);
}
return
patterns
;
}
...
...
spring-boot-admin-server/src/test/java/de/codecentric/boot/admin/model/ApplicationTest.java
View file @
ad0a38c7
...
...
@@ -81,7 +81,7 @@ public class ApplicationTest {
@Test
public
void
test_sanitize_metadata
()
throws
JsonProcessingException
{
Application
app
=
Application
.
create
(
"test"
).
withHealthUrl
(
"http://health"
)
.
addMetadata
(
"
password
"
,
"qwertz123"
).
addMetadata
(
"user"
,
"humptydumpty"
).
build
();
.
addMetadata
(
"
PASSWORD
"
,
"qwertz123"
).
addMetadata
(
"user"
,
"humptydumpty"
).
build
();
String
json
=
objectMapper
.
writeValueAsString
(
app
);
assertThat
(
json
,
not
(
containsString
(
"qwertz123"
)));
assertThat
(
json
,
containsString
(
"humptydumpty"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment