Skip to content

Commit

Permalink
Upgrade dependencies, use library for csp header, remove deprecated s…
Browse files Browse the repository at this point in the history
…ecurity-headers
  • Loading branch information
jlelse committed Apr 16, 2024
1 parent 0a4fe1e commit 6f2f74a
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 95 deletions.
4 changes: 0 additions & 4 deletions captcha.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ func (a *goBlog) checkCaptcha(w http.ResponseWriter, r *http.Request) bool {
}
// Check if session contains a captchaId and if captcha is solved
if sesCaptchaId, ok := ses.Values["captchaid"]; ok && captcha.VerifyString(sesCaptchaId.(string), r.FormValue("digits")) {
if err != nil {
a.serveError(w, r, err.Error(), http.StatusInternalServerError)
return true
}
ses.Values["captcha"] = true
err = a.captchaSessions.Save(r, w, ses)
if err != nil {
Expand Down
40 changes: 19 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ require (
github.com/dmulholl/mp3lib v1.0.0
github.com/elnormous/contenttype v1.0.4
github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43
github.com/emersion/go-smtp v0.21.0
github.com/go-ap/activitypub v0.0.0-20240327073638-93645bda3b18
github.com/go-ap/client v0.0.0-20240327112549-6abf62c47e46
github.com/emersion/go-smtp v0.21.1
github.com/go-ap/activitypub v0.0.0-20240408091739-ba76b44c2594
github.com/go-ap/client v0.0.0-20240408093509-f0721baa55c2
github.com/go-ap/jsonld v0.0.0-20221030091449-f2a191312c73
github.com/go-chi/chi/v5 v5.0.12
github.com/go-fed/httpsig v1.1.0
Expand All @@ -35,7 +35,7 @@ require (
github.com/jlelse/feeds v1.3.0
github.com/justinas/alice v1.2.0
github.com/kaorimatz/go-opml v0.0.0-20210201121027-bc8e2852d7f9
github.com/klauspost/compress v1.17.7
github.com/klauspost/compress v1.17.8
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible
github.com/lopezator/migrator v0.3.1
github.com/mattn/go-sqlite3 v1.14.22
Expand All @@ -53,22 +53,23 @@ require (
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.9.0
github.com/tdewolff/minify/v2 v2.20.19
github.com/tiptophelmet/cspolicy v0.1.1
github.com/tkrajina/gpxgo v1.3.1
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80
github.com/traefik/yaegi v0.16.1
github.com/vcraescu/go-paginator/v2 v2.0.0
github.com/xhit/go-simple-mail/v2 v2.16.0
github.com/yuin/goldmark v1.7.1
github.com/yuin/goldmark-emoji v1.0.2
go.hacdias.com/indielib v0.2.3
golang.org/x/crypto v0.21.0
golang.org/x/net v0.23.0
golang.org/x/sync v0.6.0
go.hacdias.com/indielib v0.3.0
golang.org/x/crypto v0.22.0
golang.org/x/net v0.24.0
golang.org/x/sync v0.7.0
golang.org/x/text v0.14.0
gopkg.in/yaml.v3 v3.0.1
maunium.net/go/mautrix v0.18.0
nhooyr.io/websocket v1.8.10
willnorris.com/go/microformats v1.2.0
maunium.net/go/mautrix v0.18.1
nhooyr.io/websocket v1.8.11
willnorris.com/go/microformats v1.2.1-0.20240301064101-b5d1b9d2120e
)

require (
Expand All @@ -77,15 +78,14 @@ require (
github.com/andybalholm/cascadia v1.3.2 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/boombuler/barcode v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dlclark/regexp2 v1.11.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-ap/errors v0.0.0-20240304112515-6077fa9c17b0 // indirect
github.com/golang/glog v1.2.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/glog v1.2.1 // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
Expand All @@ -101,7 +101,7 @@ require (
github.com/mmcdole/goxpp v1.1.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.2.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rs/xid v1.5.0 // indirect
Expand All @@ -119,14 +119,12 @@ require (
github.com/tidwall/sjson v1.2.5 // indirect
github.com/toorop/go-dkim v0.0.0-20240103092955-90b7d1423f92 // indirect
github.com/valyala/fastjson v1.6.4 // indirect
go.mau.fi/util v0.4.1 // indirect
go.mau.fi/util v0.4.2 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
golang.org/x/image v0.15.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sys v0.18.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.33.0 // indirect
golang.org/x/oauth2 v0.19.0 // indirect
golang.org/x/sys v0.19.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
willnorris.com/go/webmention v0.0.0-20220108183051-4a23794272f0 // indirect
)
Loading

0 comments on commit 6f2f74a

Please sign in to comment.