From 7d50843754524c63c3eb872ff558d9c0f4d41095 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Sat, 9 Nov 2019 17:03:38 +0000 Subject: [PATCH] make signed queries mandatory --- .../main/groovy/com/muwire/core/connection/Connection.groovy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/groovy/com/muwire/core/connection/Connection.groovy b/core/src/main/groovy/com/muwire/core/connection/Connection.groovy index 50e68234..39b9ab82 100644 --- a/core/src/main/groovy/com/muwire/core/connection/Connection.groovy +++ b/core/src/main/groovy/com/muwire/core/connection/Connection.groovy @@ -236,7 +236,6 @@ abstract class Connection implements Closeable { if (search.compressedResults != null) compressedResults = search.compressedResults byte[] sig = null - // TODO: make this mandatory at some point if (search.sig != null) { sig = Base64.decode(search.sig) byte [] payload @@ -251,8 +250,10 @@ abstract class Connection implements Closeable { return } else log.info("query signature verified") - } else + } else { log.info("no signature in query") + return + } // TODO: make this mandatory at some point byte[] sig2 = null