Switch back to upstream goth repository and update govendor to latest goth version (#3863)

tokarchuk/v1.17
Lauris BH 7 years ago committed by Bo-Yi Wu
parent 6f62d4f180
commit ff64f188fd
  1. 1
      vendor/github.com/markbates/goth/README.md
  2. 12
      vendor/github.com/markbates/goth/gothic/gothic.go
  3. 54
      vendor/vendor.json

@ -46,6 +46,7 @@ $ go get github.com/markbates/goth
* Linkedin * Linkedin
* Meetup * Meetup
* MicrosoftOnline * MicrosoftOnline
* Naver
* OneDrive * OneDrive
* OpenID Connect (auto discovery) * OpenID Connect (auto discovery)
* Paypal * Paypal

@ -10,16 +10,16 @@ package gothic
import ( import (
"bytes" "bytes"
"compress/gzip" "compress/gzip"
"crypto/rand"
"encoding/base64" "encoding/base64"
"errors" "errors"
"fmt" "fmt"
"io"
"io/ioutil" "io/ioutil"
"math/rand"
"net/http" "net/http"
"net/url" "net/url"
"os" "os"
"strings" "strings"
"time"
"github.com/gorilla/mux" "github.com/gorilla/mux"
"github.com/gorilla/sessions" "github.com/gorilla/sessions"
@ -35,8 +35,6 @@ var defaultStore sessions.Store
var keySet = false var keySet = false
var gothicRand *rand.Rand
func init() { func init() {
key := []byte(os.Getenv("SESSION_SECRET")) key := []byte(os.Getenv("SESSION_SECRET"))
keySet = len(key) != 0 keySet = len(key) != 0
@ -45,7 +43,6 @@ func init() {
cookieStore.Options.HttpOnly = true cookieStore.Options.HttpOnly = true
Store = cookieStore Store = cookieStore
defaultStore = Store defaultStore = Store
gothicRand = rand.New(rand.NewSource(time.Now().UnixNano()))
} }
/* /*
@ -85,8 +82,9 @@ var SetState = func(req *http.Request) string {
// //
// https://auth0.com/docs/protocols/oauth2/oauth-state#keep-reading // https://auth0.com/docs/protocols/oauth2/oauth-state#keep-reading
nonceBytes := make([]byte, 64) nonceBytes := make([]byte, 64)
for i := 0; i < 64; i++ { _, err := io.ReadFull(rand.Reader, nonceBytes)
nonceBytes[i] = byte(gothicRand.Int63() % 256) if err != nil {
panic("gothic: source of randomness unavailable: " + err.Error())
} }
return base64.URLEncoding.EncodeToString(nonceBytes) return base64.URLEncoding.EncodeToString(nonceBytes)
} }

54
vendor/vendor.json vendored

@ -678,74 +678,64 @@
"revisionTime": "2017-10-25T03:15:54Z" "revisionTime": "2017-10-25T03:15:54Z"
}, },
{ {
"checksumSHA1": "q9MD1ienC+kmKq5i51oAktQEV1E=", "checksumSHA1": "2fOWeJ+HGddUUTBlvpRIF4v2x5E=",
"origin": "github.com/go-gitea/goth",
"path": "github.com/markbates/goth", "path": "github.com/markbates/goth",
"revision": "3b54d96084a5e11030f19556cf68a6ab5d93ba20", "revision": "4933f155d89c3c52ab4ca545c6602cf4a1e87913",
"revisionTime": "2018-03-12T06:32:04Z" "revisionTime": "2018-04-12T22:15:10Z"
}, },
{ {
"checksumSHA1": "FISfgOkoMtn98wglLUvfBTZ6baE=", "checksumSHA1": "cZLls/zE/yokmiyypPyGfJWh69E=",
"origin": "github.com/go-gitea/goth/gothic",
"path": "github.com/markbates/goth/gothic", "path": "github.com/markbates/goth/gothic",
"revision": "3b54d96084a5e11030f19556cf68a6ab5d93ba20", "revision": "4933f155d89c3c52ab4ca545c6602cf4a1e87913",
"revisionTime": "2018-03-12T06:32:04Z" "revisionTime": "2018-04-12T22:15:10Z"
}, },
{ {
"checksumSHA1": "pJ+Cws/TU22K6tZ/ALFOvvH1K5U=", "checksumSHA1": "pJ+Cws/TU22K6tZ/ALFOvvH1K5U=",
"origin": "github.com/go-gitea/goth/providers/bitbucket",
"path": "github.com/markbates/goth/providers/bitbucket", "path": "github.com/markbates/goth/providers/bitbucket",
"revision": "3b54d96084a5e11030f19556cf68a6ab5d93ba20", "revision": "4933f155d89c3c52ab4ca545c6602cf4a1e87913",
"revisionTime": "2018-03-12T06:32:04Z" "revisionTime": "2018-04-12T22:15:10Z"
}, },
{ {
"checksumSHA1": "XsF5HI4240QHbFXbtWWnGgTsoq8=", "checksumSHA1": "XsF5HI4240QHbFXbtWWnGgTsoq8=",
"origin": "github.com/go-gitea/goth/providers/dropbox",
"path": "github.com/markbates/goth/providers/dropbox", "path": "github.com/markbates/goth/providers/dropbox",
"revision": "3b54d96084a5e11030f19556cf68a6ab5d93ba20", "revision": "4933f155d89c3c52ab4ca545c6602cf4a1e87913",
"revisionTime": "2018-03-12T06:32:04Z" "revisionTime": "2018-04-12T22:15:10Z"
}, },
{ {
"checksumSHA1": "VzbroIA9R00Ig3iGnOlZLU7d4ls=", "checksumSHA1": "VzbroIA9R00Ig3iGnOlZLU7d4ls=",
"origin": "github.com/go-gitea/goth/providers/facebook",
"path": "github.com/markbates/goth/providers/facebook", "path": "github.com/markbates/goth/providers/facebook",
"revision": "3b54d96084a5e11030f19556cf68a6ab5d93ba20", "revision": "4933f155d89c3c52ab4ca545c6602cf4a1e87913",
"revisionTime": "2018-03-12T06:32:04Z" "revisionTime": "2018-04-12T22:15:10Z"
}, },
{ {
"checksumSHA1": "P6nBZ850aaekpOcoXNdRhK86bH8=", "checksumSHA1": "P6nBZ850aaekpOcoXNdRhK86bH8=",
"origin": "github.com/go-gitea/goth/providers/github",
"path": "github.com/markbates/goth/providers/github", "path": "github.com/markbates/goth/providers/github",
"revision": "3b54d96084a5e11030f19556cf68a6ab5d93ba20", "revision": "4933f155d89c3c52ab4ca545c6602cf4a1e87913",
"revisionTime": "2018-03-12T06:32:04Z" "revisionTime": "2018-04-12T22:15:10Z"
}, },
{ {
"checksumSHA1": "ld488t+yGoTwtmiCSSggEX4fxVk=", "checksumSHA1": "ld488t+yGoTwtmiCSSggEX4fxVk=",
"origin": "github.com/go-gitea/goth/providers/gitlab",
"path": "github.com/markbates/goth/providers/gitlab", "path": "github.com/markbates/goth/providers/gitlab",
"revision": "3b54d96084a5e11030f19556cf68a6ab5d93ba20", "revision": "4933f155d89c3c52ab4ca545c6602cf4a1e87913",
"revisionTime": "2018-03-12T06:32:04Z" "revisionTime": "2018-04-12T22:15:10Z"
}, },
{ {
"checksumSHA1": "qXEulD7vnwY9hFrxh91Pm5YrvTM=", "checksumSHA1": "qXEulD7vnwY9hFrxh91Pm5YrvTM=",
"origin": "github.com/go-gitea/goth/providers/gplus",
"path": "github.com/markbates/goth/providers/gplus", "path": "github.com/markbates/goth/providers/gplus",
"revision": "3b54d96084a5e11030f19556cf68a6ab5d93ba20", "revision": "4933f155d89c3c52ab4ca545c6602cf4a1e87913",
"revisionTime": "2018-03-12T06:32:04Z" "revisionTime": "2018-04-12T22:15:10Z"
}, },
{ {
"checksumSHA1": "wsOBzyp4LKDhfCPmX1LLP7T0S3U=", "checksumSHA1": "wsOBzyp4LKDhfCPmX1LLP7T0S3U=",
"origin": "github.com/go-gitea/goth/providers/openidConnect",
"path": "github.com/markbates/goth/providers/openidConnect", "path": "github.com/markbates/goth/providers/openidConnect",
"revision": "3b54d96084a5e11030f19556cf68a6ab5d93ba20", "revision": "4933f155d89c3c52ab4ca545c6602cf4a1e87913",
"revisionTime": "2018-03-12T06:32:04Z" "revisionTime": "2018-04-12T22:15:10Z"
}, },
{ {
"checksumSHA1": "o6RqMbbE8QNZhNT9TsAIRMPI8tg=", "checksumSHA1": "o6RqMbbE8QNZhNT9TsAIRMPI8tg=",
"origin": "github.com/go-gitea/goth/providers/twitter",
"path": "github.com/markbates/goth/providers/twitter", "path": "github.com/markbates/goth/providers/twitter",
"revision": "3b54d96084a5e11030f19556cf68a6ab5d93ba20", "revision": "4933f155d89c3c52ab4ca545c6602cf4a1e87913",
"revisionTime": "2018-03-12T06:32:04Z" "revisionTime": "2018-04-12T22:15:10Z"
}, },
{ {
"checksumSHA1": "61HNjGetaBoMp8HBOpuEZRSim8g=", "checksumSHA1": "61HNjGetaBoMp8HBOpuEZRSim8g=",

Loading…
Cancel
Save