From 8dd5a65699e34538148048fa055a3ec18d3f8590 Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Mon, 10 Jul 2023 23:44:15 +0200 Subject: [PATCH] q cleanup targetUa check --- .../src/main/kotlin/org/pgpainless/wot/dijkstra/Query.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/Query.kt b/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/Query.kt index 2c5c52eb..6d290968 100644 --- a/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/Query.kt +++ b/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/Query.kt @@ -305,11 +305,9 @@ class Query( // User ID to authenticate the User ID. But if the target has // revoked it, then it can't be authenticated. val targetUa: RevocationState? = target.userIds[targetUserid] - targetUa?.let { - if (it.isEffective(network.referenceTime())) { - logger.debug("{}: Target user id is revoked at reference time.", targetFpr) - return hashMapOf() - } + if (targetUa != null && targetUa.isEffective(network.referenceTime())) { + logger.debug("{}: Target user id is revoked at reference time.", targetFpr) + return hashMapOf() } // Dijkstra.