Skip to content

Commit

Permalink
[openhabcloud] Sensor short UUID/secret completely
Browse files Browse the repository at this point in the history
Signed-off-by: Sami Salonen <[email protected]>
  • Loading branch information
ssalonen committed Mar 5, 2022
1 parent da5bd42 commit c457beb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ public void onConnect() {
}

private static String sensored(String secret) {
if (secret.length() < 4) {
return "*******";
}
return secret.substring(0, 2) + "..." + secret.substring(secret.length() - 2, secret.length());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ protected void modified(Map<String, ?> config) {
}

private static String sensored(String secret) {
if (secret.length() < 4) {
return "*******";
}
return secret.substring(0, 2) + "..." + secret.substring(secret.length() - 2, secret.length());
}

Expand Down

0 comments on commit c457beb

Please sign in to comment.