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 9621d4d7..bea7e3ff 100644 --- a/core/src/main/groovy/com/muwire/core/connection/Connection.groovy +++ b/core/src/main/groovy/com/muwire/core/connection/Connection.groovy @@ -157,8 +157,11 @@ abstract class Connection implements Closeable { protected void handleSearch(def search) { UUID uuid = UUID.fromString(search.uuid) - if (search.infohash != null) + byte [] infohash = null + if (search.infohash != null) { search.keywords = null + infohash = Base64.decode(search.infohash) + } Destination replyTo = new Destination(search.replyTo) TrustLevel trustLevel = trustService.getLevel(replyTo) @@ -182,7 +185,7 @@ abstract class Connection implements Closeable { SearchEvent searchEvent = new SearchEvent(searchTerms : search.keywords, - searchHash : Base64.decode(search.infohash), + searchHash : infohash, uuid : uuid) QueryEvent event = new QueryEvent ( searchEvent : searchEvent, replyTo : replyTo,