Skip to content

Commit

Permalink
Fix auth in bitswap sent blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
ianopolous committed Jul 12, 2023
1 parent de72cd6 commit 2c200af
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void receiveMessage(MessageOuterClass.Message msg, Stream source) {
if (block.isPresent() && authoriser.allowRead(c, block.get(), sourcePeerId, auth.orElse("")).join()) {
MessageOuterClass.Message.Block blockP = MessageOuterClass.Message.Block.newBuilder()
.setPrefix(ByteString.copyFrom(prefixBytes(c)))
.setAuth(ByteString.copyFrom(auth.orElse("").getBytes(StandardCharsets.UTF_8)))
.setAuth(ByteString.copyFrom(ArrayOps.hexToBytes(auth.orElse(""))))
.setData(ByteString.copyFrom(block.get()))
.build();
int blockSize = blockP.getSerializedSize();
Expand Down

0 comments on commit 2c200af

Please sign in to comment.