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
7e1062b7
Commit
7e1062b7
authored
Jun 18, 2018
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not include metadata in toString() to prevent password leaks
fixes #789
parent
96498dad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
Application.java
...decentric/boot/admin/client/registration/Application.java
+1
-0
ApplicationTest.java
...ntric/boot/admin/client/registration/ApplicationTest.java
+7
-1
No files found.
spring-boot-admin-client/src/main/java/de/codecentric/boot/admin/client/registration/Application.java
View file @
7e1062b7
...
...
@@ -27,6 +27,7 @@ import org.springframework.util.Assert;
* @author Johannes Edmeier
*/
@lombok
.
Data
@lombok
.
ToString
(
exclude
=
"metadata"
)
public
class
Application
{
private
final
String
name
;
private
final
String
managementUrl
;
...
...
spring-boot-admin-client/src/test/java/de/codecentric/boot/admin/client/registration/ApplicationTest.java
View file @
7e1062b7
/*
* Copyright 2014-201
7
the original author or authors.
* Copyright 2014-201
8
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -70,4 +70,10 @@ public class ApplicationTest {
assertThat
(
a1
).
isNotEqualTo
(
a3
);
assertThat
(
a2
).
isNotEqualTo
(
a3
);
}
@Test
public
void
should_not_return_sensitive_data_in_toString
()
{
Application
application
=
Application
.
create
(
"app"
).
healthUrl
(
"HEALTH"
).
metadata
(
"password"
,
"geheim"
).
build
();
assertThat
(
application
.
toString
()).
doesNotContain
(
"geheim"
);
}
}
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