From 8097a9d96432c6648ddd601bbae7df6d167420d1 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Fri, 30 Oct 2020 12:31:52 +0100 Subject: [PATCH] Passphrase.isEmpty: also check for validity --- .../src/main/java/org/pgpainless/util/Passphrase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgpainless-core/src/main/java/org/pgpainless/util/Passphrase.java b/pgpainless-core/src/main/java/org/pgpainless/util/Passphrase.java index 2168b0da..a46745df 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/util/Passphrase.java +++ b/pgpainless-core/src/main/java/org/pgpainless/util/Passphrase.java @@ -98,7 +98,7 @@ public class Passphrase { */ public boolean isEmpty() { synchronized (lock) { - return chars == null; + return valid && chars == null; } }