Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
Bump github.com/aws/aws-sdk-go from 1.44.221 to 1.44.224 (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
norling authored Mar 21, 2023
2 parents c4c636e + b2f7b74 commit f9a3e2d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/NBISweden/S3-Upload-Proxy
go 1.19

require (
github.com/aws/aws-sdk-go v1.44.221
github.com/aws/aws-sdk-go v1.44.224
github.com/golang-jwt/jwt/v4 v4.5.0
github.com/google/uuid v1.3.0
github.com/heptiolabs/healthcheck v0.0.0-20211123025425-613501dd5deb
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/aws/aws-sdk-go v1.17.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.44.221 h1:yndn4uvLolKXPoXIwKHhO5XtwlTnJfXLBKXs84C5+hQ=
github.com/aws/aws-sdk-go v1.44.221/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ=
github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
Expand Down
12 changes: 4 additions & 8 deletions helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,9 @@ func TLSkeyToFile(filename string, key *ecdsa.PrivateKey) error {
if err != nil {
return err
}
if err := pem.Encode(keyFile, &pem.Block{Type: "EC PRIVATE KEY", Bytes: pk}); err != nil {
return err
}
err = pem.Encode(keyFile, &pem.Block{Type: "EC PRIVATE KEY", Bytes: pk})

return nil
return err
}

func TLScertToFile(filename string, derBytes []byte) error {
Expand All @@ -361,9 +359,7 @@ func TLScertToFile(filename string, derBytes []byte) error {
return err
}
defer certFile.Close()
if err := pem.Encode(certFile, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes}); err != nil {
return err
}
err = pem.Encode(certFile, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes})

return nil
return err
}
4 changes: 2 additions & 2 deletions proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ func (p *Proxy) internalServerError(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(500)
}

func (p *Proxy) notAllowedResponse(w http.ResponseWriter, r *http.Request) {
func (p *Proxy) notAllowedResponse(w http.ResponseWriter, _ *http.Request) {
log.Debug("not allowed response")
w.WriteHeader(403)
}

func (p *Proxy) notAuthorized(w http.ResponseWriter, r *http.Request) {
func (p *Proxy) notAuthorized(w http.ResponseWriter, _ *http.Request) {
log.Debug("not authorized")
w.WriteHeader(401) // Actually correct!
}
Expand Down
2 changes: 1 addition & 1 deletion proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (m *MockMessenger) SendMessage(uuid string, body []byte) error {
type AlwaysDeny struct{}

// Authenticate does not authenticate anyone.
func (u *AlwaysDeny) Authenticate(r *http.Request) (jwt.MapClaims, error) {
func (u *AlwaysDeny) Authenticate(_ *http.Request) (jwt.MapClaims, error) {
return nil, fmt.Errorf("denied")
}

Expand Down
2 changes: 1 addition & 1 deletion userauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewAlwaysAllow() *AlwaysAllow {
}

// Authenticate authenticates everyone.
func (u *AlwaysAllow) Authenticate(r *http.Request) (jwt.MapClaims, error) {
func (u *AlwaysAllow) Authenticate(_ *http.Request) (jwt.MapClaims, error) {
return nil, nil
}

Expand Down

0 comments on commit f9a3e2d

Please sign in to comment.