This is an automated email from the ASF dual-hosted git repository.
pdallig pushed a commit to branch branch-0.11
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/branch-0.11 by this push:
new 310bdc34ae [ZEPPELIN-6022] Skip decryption of credentials.json when
file is empty (#4765)
310bdc34ae is described below
commit 310bdc34aef220034eb88550bad5c9df3257f06d
Author: zeotuan <[email protected]>
AuthorDate: Thu Jun 6 21:59:15 2024 +1000
[ZEPPELIN-6022] Skip decryption of credentials.json when file is empty
(#4765)
* Skip decryption when empty
* Use more elegant empty json string check
---
.../src/main/java/org/apache/zeppelin/user/Credentials.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Credentials.java
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Credentials.java
index df69853a2f..511ee07c5e 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Credentials.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/user/Credentials.java
@@ -137,7 +137,7 @@ public class Credentials {
private void loadFromFile() throws IOException {
try {
String json = storage.loadCredentials();
- if (json != null && encryptor != null) {
+ if (encryptor != null && StringUtils.isNotBlank(json)) {
json = encryptor.decrypt(json);
}