From 4801106674288cc68d71cb2a3bb5eb0fd61c755e Mon Sep 17 00:00:00 2001 From: shubham kesri Date: Fri, 23 Aug 2024 06:12:12 +0530 Subject: [PATCH] Fixed | Initialising the encodedPubKey with empty String in case userInfo is null (#7508) Signed-off-by: kesrishubham2510 Co-authored-by: Sally MacFarlane --- CHANGELOG.md | 1 + .../hyperledger/besu/ethereum/p2p/discovery/dns/DNSEntry.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cd3f0126b..b9fccf29c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ - Correct entrypoint in Docker evmtool [#7430](https://github.com/hyperledger/besu/pull/7430) - Fix protocol schedule check for devnets [#7429](https://github.com/hyperledger/besu/pull/7429) - Fix behaviour when starting in a pre-merge network [#7431](https://github.com/hyperledger/besu/pull/7431) +- Fix Null pointer from DNS daemon [#7505](https://github.com/hyperledger/besu/issues/7505) ## 24.7.1 diff --git a/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/discovery/dns/DNSEntry.java b/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/discovery/dns/DNSEntry.java index bb85a3612f..cd439eea06 100644 --- a/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/discovery/dns/DNSEntry.java +++ b/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/discovery/dns/DNSEntry.java @@ -243,7 +243,7 @@ public interface DNSEntry { public ENRTreeLink(final String enrTreeLink) { final URI uri = URI.create(enrTreeLink); this.domainName = uri.getHost(); - this.encodedPubKey = uri.getUserInfo(); + this.encodedPubKey = uri.getUserInfo() == null ? "" : uri.getUserInfo(); this.pubKey = fromBase32(encodedPubKey); }