From 1a64deeb894dc95e2645a75771732c6cc53a79ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 4 Oct 2023 01:35:06 +0200 Subject: Squash changes containing private information There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository --- .../websites/tools/games/codenames/greenapid.patch | 39 ---------------------- 1 file changed, 39 deletions(-) delete mode 100644 modules/private/websites/tools/games/codenames/greenapid.patch (limited to 'modules/private/websites/tools/games/codenames/greenapid.patch') diff --git a/modules/private/websites/tools/games/codenames/greenapid.patch b/modules/private/websites/tools/games/codenames/greenapid.patch deleted file mode 100644 index 21a9fad..0000000 --- a/modules/private/websites/tools/games/codenames/greenapid.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/cmd/greenapid/main.go b/cmd/greenapid/main.go -index 86499e9..1589323 100644 ---- a/cmd/greenapid/main.go -+++ b/cmd/greenapid/main.go -@@ -1,6 +1,7 @@ - package main - - import ( -+ "net" - "net/http" - - "github.com/jbowens/codenamesgreen/gameapi" -@@ -13,6 +14,12 @@ func main() { - } - - h := gameapi.Handler(wordLists) -- err = http.ListenAndServe(":8080", h) -+ server := &http.Server{Handler: h} -+ ln, err := net.Listen("unix", "/run/codenamesgreen/socket.sock") -+ if err != nil { -+ panic(err) -+ } -+ -+ err = server.Serve(ln) - panic(err) - } -diff --git a/gameapi/handler.go b/gameapi/handler.go -index d67cf94..108e7e1 100644 ---- a/gameapi/handler.go -+++ b/gameapi/handler.go -@@ -101,7 +101,7 @@ func (h *handler) handleIndex(rw http.ResponseWriter, req *http.Request) { - for { - w1 := strings.ToLower(h.allWords[h.rand.Int63n(int64(len(h.allWords)))]) - w2 := strings.ToLower(h.allWords[h.rand.Int63n(int64(len(h.allWords)))]) -- id := fmt.Sprintf("%s-%s", w1, w2) -+ id = fmt.Sprintf("%s-%s", w1, w2) - if _, ok := h.games[id]; !ok { - break - } -- cgit v1.2.3