diff --git a/go.mod b/go.mod index bf65558a6ca321bd5c07140147fdbec00cab438e..c4e9c425ddaf0048e04d780a56d748d61652f7c5 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module git.autistici.org/ai3/accountserver go 1.14 require ( - git.autistici.org/ai3/go-common v0.0.0-20211202183323-8cfdcfb55570 + git.autistici.org/ai3/go-common v0.0.0-20211205111915-06f1625b2297 git.autistici.org/ai3/tools/aux-db v0.0.0-20210127161623-c7f0177bcc33 git.autistici.org/id/auth v0.0.0-20210507085352-c4f218c42591 git.autistici.org/id/go-sso v0.0.0-20210117165919-e56e6579953d @@ -17,12 +17,10 @@ require ( github.com/pquerna/otp v1.3.0 github.com/prometheus/client_golang v1.11.0 github.com/sethvargo/go-password v0.2.0 - golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 + golang.org/x/crypto v0.0.0-20211202192323-5770296d904e golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c gopkg.in/yaml.v2 v2.4.0 ) -replace git.autistici.org/ai3/go-common => /home/ale/src/go/src/git.autistici.org/ai3/go-common - replace git.autistici.org/id/auth => /home/ale/src/go/src/git.autistici.org/id/auth diff --git a/go.sum b/go.sum index 5ede272871fc5e1f4c0b783dc18b9b649dc6fb39..3e5269af6f597ae13e0535d383242ca94682a2d2 100644 --- a/go.sum +++ b/go.sum @@ -44,6 +44,9 @@ git.autistici.org/ai3/go-common v0.0.0-20210507084757-2cf72583ce0e h1:nmuXsaCsbS git.autistici.org/ai3/go-common v0.0.0-20210507084757-2cf72583ce0e/go.mod h1:cLzAklDVrfLAgJSny1+oPf17m2G4VK447OpE0ssqxFw= git.autistici.org/ai3/go-common v0.0.0-20211123230456-40588d0f6008 h1:AAo57H2BTW1KaKZNEL3udwUf9PM9uJdWwQoOYiopTO4= git.autistici.org/ai3/go-common v0.0.0-20211123230456-40588d0f6008/go.mod h1:FUD4csv4WEpcXD0APGOnlSs+a9WpNjP0z9YcVGTN6sI= +git.autistici.org/ai3/go-common v0.0.0-20211202183323-8cfdcfb55570/go.mod h1:5CE8ECPZsIGYEw4hIuBbUwMHbQhG81CaSU2VMvL2j6w= +git.autistici.org/ai3/go-common v0.0.0-20211205111915-06f1625b2297 h1:RUlGEhPRng4202IY9rv91vI3l7x0eS/u4y1lzOEoK1A= +git.autistici.org/ai3/go-common v0.0.0-20211205111915-06f1625b2297/go.mod h1:mw4pRTvvlll+Uvsfw6Brkx30hYZBi1P0mRAxoECNWY4= git.autistici.org/ai3/tools/aux-db v0.0.0-20210127161623-c7f0177bcc33 h1:r8/Z/jrey5pK6GiPR6i9vTEx8yR3xcspDC7LLWp4mrc= git.autistici.org/ai3/tools/aux-db v0.0.0-20210127161623-c7f0177bcc33/go.mod h1:SI8ChSMUpEgxWFvzc/FGFtcrOuYTVu6Ai5cTOjMP3+U= git.autistici.org/id/auth v0.0.0-20210110171913-dd493db32815/go.mod h1:Hq4zcqE2hbrXsC9j79kzfnBf2BqlGmuVCRIz+AwX/FY= @@ -680,6 +683,8 @@ golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s3 golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 h1:/pEO3GD/ABYAjuakUS6xSEmmlyVS4kxBNkeA9tLJiTI= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20211202192323-5770296d904e h1:MUP6MR3rJ7Gk9LEia0LP2ytiH6MuCfs7qYz+47jGdD8= +golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= diff --git a/vendor/git.autistici.org/ai3/go-common/go.mod b/vendor/git.autistici.org/ai3/go-common/go.mod index 5a4c3120cfa02ce957fa852dc8899678f97608cc..9152342fd171cfdaa876d822b8db656ead0546b1 100644 --- a/vendor/git.autistici.org/ai3/go-common/go.mod +++ b/vendor/git.autistici.org/ai3/go-common/go.mod @@ -24,6 +24,6 @@ require ( github.com/russross/blackfriday/v2 v2.1.0 github.com/theckman/go-flock v0.8.1 go.opencensus.io v0.23.0 - golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 + golang.org/x/crypto v0.0.0-20211202192323-5770296d904e golang.org/x/sync v0.0.0-20210220032951-036812b2e83c ) diff --git a/vendor/git.autistici.org/ai3/go-common/go.sum b/vendor/git.autistici.org/ai3/go-common/go.sum index 7a00676285e5fe15ccfd31aab8bcb6034a0d0a28..b384b025ff8d5c2c234b26e7fa77d9957e36943c 100644 --- a/vendor/git.autistici.org/ai3/go-common/go.sum +++ b/vendor/git.autistici.org/ai3/go-common/go.sum @@ -204,6 +204,8 @@ golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 h1:/pEO3GD/ABYAjuakUS6xSEmmlyVS4kxBNkeA9tLJiTI= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20211202192323-5770296d904e h1:MUP6MR3rJ7Gk9LEia0LP2ytiH6MuCfs7qYz+47jGdD8= +golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= diff --git a/vendor/git.autistici.org/ai3/go-common/serverutil/json.go.no-copy b/vendor/git.autistici.org/ai3/go-common/serverutil/json.go.no-copy deleted file mode 100644 index 3034b4706305f686c91d25ae88abc5d8c05ec096..0000000000000000000000000000000000000000 --- a/vendor/git.autistici.org/ai3/go-common/serverutil/json.go.no-copy +++ /dev/null @@ -1,44 +0,0 @@ -package serverutil - -import ( - "encoding/json" - "log" - "mime" - "net/http" -) - -// DecodeJSONRequest decodes a JSON object from an incoming HTTP POST -// request and return true when successful. In case of errors, it will -// write an error response to w and return false. -func DecodeJSONRequest(w http.ResponseWriter, r *http.Request, obj interface{}) bool { - if r.Method != "POST" { - http.Error(w, "Method not allowed", http.StatusMethodNotAllowed) - return false - } - if ct, _, _ := mime.ParseMediaType(r.Header.Get("Content-Type")); ct != "application/json" { - http.Error(w, "Need JSON request", http.StatusBadRequest) - return false - } - - if err := json.NewDecoder(r.Body).Decode(obj); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return false - } - - return true -} - -// EncodeJSONResponse writes an application/json response to w. -func EncodeJSONResponse(w http.ResponseWriter, obj interface{}) { - w.Header().Set("Content-Type", "application/json") - w.Header().Set("Pragma", "no-cache") - w.Header().Set("Cache-Control", "no-store") - w.Header().Set("Expires", "-1") - w.Header().Set("X-Content-Type-Options", "nosniff") - - err := json.NewEncoder(w).Encode(obj) - if err != nil { - log.Printf("error writing JSON response: %v", err) - // Too late to return an error to the client now. - } -} diff --git a/vendor/modules.txt b/vendor/modules.txt index a4bbb2e9f621c61d5a38b1aac04a144a0b7e88a6..af64ee624a8b296a7eba2abf783ef7ff8e6b2c80 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,6 +1,6 @@ # contrib.go.opencensus.io/exporter/zipkin v0.1.2 contrib.go.opencensus.io/exporter/zipkin -# git.autistici.org/ai3/go-common v0.0.0-20211202183323-8cfdcfb55570 => /home/ale/src/go/src/git.autistici.org/ai3/go-common +# git.autistici.org/ai3/go-common v0.0.0-20211205111915-06f1625b2297 ## explicit git.autistici.org/ai3/go-common git.autistici.org/ai3/go-common/clientutil @@ -173,7 +173,7 @@ go.opencensus.io/trace go.opencensus.io/trace/internal go.opencensus.io/trace/propagation go.opencensus.io/trace/tracestate -# golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 +# golang.org/x/crypto v0.0.0-20211202192323-5770296d904e ## explicit golang.org/x/crypto/argon2 golang.org/x/crypto/blake2b @@ -230,5 +230,4 @@ google.golang.org/protobuf/types/known/timestamppb # gopkg.in/yaml.v2 v2.4.0 ## explicit gopkg.in/yaml.v2 -# git.autistici.org/ai3/go-common => /home/ale/src/go/src/git.autistici.org/ai3/go-common # git.autistici.org/id/auth => /home/ale/src/go/src/git.autistici.org/id/auth