From 35d628ef6d1d603ddc3323e095bc9a902dea7e89 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sat, 16 May 2026 23:16:30 -0300 Subject: [PATCH] bunker: fix concurrent map writes (url.Values is a map). --- bunker.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bunker.go b/bunker.go index b0912dc..901c276 100644 --- a/bunker.go +++ b/bunker.go @@ -6,6 +6,7 @@ import ( "encoding/hex" "errors" "fmt" + "maps" "net" "net/url" "os" @@ -251,8 +252,10 @@ var bunker = &cli.Command{ // this function will be called every now and then printBunkerInfo := func() { - qs.Set("secret", newSecret) - bunkerURI := fmt.Sprintf("bunker://%s?%s", pubkey.Hex(), qs.Encode()) + iqs := make(url.Values) + maps.Copy(iqs, qs) + iqs.Set("secret", newSecret) + bunkerURI := fmt.Sprintf("bunker://%s?%s", pubkey.Hex(), iqs.Encode()) authorizedKeysStr := "" if len(config.Clients) != 0 {