New Upstream Snapshot - golang-github-gorilla-sessions
Ready changes
Summary
Merged new upstream version: 1.2.1+git20221209.1.0e1d1d7 (was: 1.2.1).
Resulting package
Built on 2022-12-10T18:13 (took 3m42s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-snapshots golang-github-gorilla-sessions-dev
Lintian Result
- golang-github-gorilla-sessions-dev_1.2.1+git20221209.1.0e1d1d7-1~jan+nus1_all.deb
- golang-github-gorilla-sessions_1.2.1+git20221209.1.0e1d1d7-1~jan+nus1.dsc
- golang-github-gorilla-sessions_1.2.1+git20221209.1.0e1d1d7-1~jan+nus1_amd64.buildinfo
- golang-github-gorilla-sessions_1.2.1+git20221209.1.0e1d1d7-1~jan+nus1_amd64.changes
Diff
diff --git a/.circleci/config.yml b/.circleci/config.yml
index bd23335..1b545b7 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,65 +1,70 @@
-version: 2.0
+version: 2.1
jobs:
- # Base test configuration for Go library tests Each distinct version should
- # inherit this base, and override (at least) the container image used.
- "test": &test
+ "test":
+ parameters:
+ version:
+ type: string
+ default: "latest"
+ golint:
+ type: boolean
+ default: true
+ modules:
+ type: boolean
+ default: true
+ goproxy:
+ type: string
+ default: ""
docker:
- - image: circleci/golang:latest
+ - image: "circleci/golang:<< parameters.version >>"
working_directory: /go/src/github.com/gorilla/sessions
- steps: &steps
- - checkout
- - run: go version
- - run: go get -t -v ./...
- - run: diff -u <(echo -n) <(gofmt -d .)
- - run: if [[ "$LATEST" = true ]]; then go vet -v .; fi
- - run: go test -v -race ./...
-
- "latest":
- <<: *test
environment:
- LATEST: true
-
-
- "1.12":
- <<: *test
- docker:
- - image: circleci/golang:1.12
-
- "1.11":
- <<: *test
- docker:
- - image: circleci/golang:1.11
-
- "1.10":
- <<: *test
- docker:
- - image: circleci/golang:1.10
-
- "1.9":
- <<: *test
- docker:
- - image: circleci/golang:1.9
-
- "1.8":
- <<: *test
- docker:
- - image: circleci/golang:1.8
-
- "1.7":
- <<: *test
- docker:
- - image: circleci/golang:1.7
-
+ GO111MODULE: "on"
+ GOPROXY: "<< parameters.goproxy >>"
+ steps:
+ - checkout
+ - run:
+ name: "Print the Go version"
+ command: >
+ go version
+ - run:
+ name: "Fetch dependencies"
+ command: >
+ if [[ << parameters.modules >> = true ]]; then
+ go mod download
+ export GO111MODULE=on
+ else
+ go get -v ./...
+ fi
+ # Only run gofmt, vet & lint against the latest Go version
+ - run:
+ name: "Run golint"
+ command: >
+ if [ << parameters.version >> = "latest" ] && [ << parameters.golint >> = true ]; then
+ go get -u golang.org/x/lint/golint
+ golint ./...
+ fi
+ - run:
+ name: "Run gofmt"
+ command: >
+ if [[ << parameters.version >> = "latest" ]]; then
+ diff -u <(echo -n) <(gofmt -d -e .)
+ fi
+ - run:
+ name: "Run go vet"
+ command: >
+ if [[ << parameters.version >> = "latest" ]]; then
+ go vet -v ./...
+ fi
+ - run:
+ name: "Run go test (+ race detector)"
+ command: >
+ go test -v -race ./...
workflows:
- version: 2
- build:
+ tests:
jobs:
- - "latest"
- - "1.12"
- - "1.11"
- - "1.10"
- - "1.9"
- - "1.8"
- - "1.7"
+ - test:
+ matrix:
+ parameters:
+ version: ["latest", "1.15", "1.14", "1.13", "1.12", "1.11"]
diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml
deleted file mode 100644
index 12440bf..0000000
--- a/.github/release-drafter.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-# Config for https://github.com/apps/release-drafter
-template: |
-
- <summary of changes here>
-
- ### CHANGELOG
-
- $CHANGES
diff --git a/.github/stale.yml b/.github/stale.yml
deleted file mode 100644
index de8a678..0000000
--- a/.github/stale.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-daysUntilStale: 60
-daysUntilClose: 7
-# Issues with these labels will never be considered stale
-exemptLabels:
- - v2
- - needs-review
- - work-required
-staleLabel: stale
-markComment: >
- This issue has been automatically marked as stale because it hasn't seen
- a recent update. It'll be automatically closed in a few days.
-closeComment: false
diff --git a/README.md b/README.md
index a8fb98b..b2b95ff 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,12 @@
[![GoDoc](https://godoc.org/github.com/gorilla/sessions?status.svg)](https://godoc.org/github.com/gorilla/sessions) [![Build Status](https://travis-ci.org/gorilla/sessions.svg?branch=master)](https://travis-ci.org/gorilla/sessions)
[![Sourcegraph](https://sourcegraph.com/github.com/gorilla/sessions/-/badge.svg)](https://sourcegraph.com/github.com/gorilla/sessions?badge)
+---
+
+**The Gorilla project has been archived, and is no longer under active maintainenance. You can read more here: https://github.com/gorilla#gorilla-toolkit**
+
+---
+
gorilla/sessions provides cookie and filesystem sessions and infrastructure for
custom session backends.
@@ -84,6 +90,7 @@ Other implementations of the `sessions.Store` interface:
- [github.com/lafriks/xormstore](https://github.com/lafriks/xormstore) - XORM (MySQL, PostgreSQL, SQLite, Microsoft SQL Server, TiDB)
- [github.com/GoogleCloudPlatform/firestore-gorilla-sessions](https://github.com/GoogleCloudPlatform/firestore-gorilla-sessions) - Cloud Firestore
- [github.com/stephenafamo/crdbstore](https://github.com/stephenafamo/crdbstore) - CockroachDB
+- [github.com/ryicoh/tikvstore](github.com/ryicoh/tikvstore) - TiKV
## License
diff --git a/cookie.go b/cookie.go
index 1928b04..6612662 100644
--- a/cookie.go
+++ b/cookie.go
@@ -1,3 +1,4 @@
+//go:build !go1.11
// +build !go1.11
package sessions
diff --git a/cookie_go111.go b/cookie_go111.go
index 173d1a3..9b58828 100644
--- a/cookie_go111.go
+++ b/cookie_go111.go
@@ -1,3 +1,4 @@
+//go:build go1.11
// +build go1.11
package sessions
diff --git a/cookie_go111_test.go b/cookie_go111_test.go
index 1aac273..e6137c7 100644
--- a/cookie_go111_test.go
+++ b/cookie_go111_test.go
@@ -1,3 +1,4 @@
+//go:build go1.11
// +build go1.11
package sessions
diff --git a/debian/changelog b/debian/changelog
index bf2e4b0..47bd44e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+golang-github-gorilla-sessions (1.2.1+git20221209.1.0e1d1d7-1) UNRELEASED; urgency=low
+
+ * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk> Sat, 10 Dec 2022 18:10:35 -0000
+
golang-github-gorilla-sessions (1.2.1-1) unstable; urgency=medium
* Add uscan watch file
diff --git a/options.go b/options.go
index 38ba72f..d33d076 100644
--- a/options.go
+++ b/options.go
@@ -1,3 +1,4 @@
+//go:build !go1.11
// +build !go1.11
package sessions
diff --git a/options_go111.go b/options_go111.go
index 388112a..af9cdf0 100644
--- a/options_go111.go
+++ b/options_go111.go
@@ -1,3 +1,4 @@
+//go:build go1.11
// +build go1.11
package sessions
diff --git a/store.go b/store.go
index bb7f964..eb45afb 100644
--- a/store.go
+++ b/store.go
@@ -10,7 +10,6 @@ import (
"net/http"
"os"
"path/filepath"
- "strings"
"sync"
"github.com/gorilla/securecookie"
@@ -201,6 +200,8 @@ func (s *FilesystemStore) New(r *http.Request, name string) (*Session, error) {
return session, err
}
+var base32RawStdEncoding = base32.StdEncoding.WithPadding(base32.NoPadding)
+
// Save adds a single session to the response.
//
// If the Options.MaxAge of the session is <= 0 then the session file will be
@@ -221,9 +222,8 @@ func (s *FilesystemStore) Save(r *http.Request, w http.ResponseWriter,
if session.ID == "" {
// Because the ID is used in the filename, encode it to
// use alphanumeric characters only.
- session.ID = strings.TrimRight(
- base32.StdEncoding.EncodeToString(
- securecookie.GenerateRandomKey(32)), "=")
+ session.ID = base32RawStdEncoding.EncodeToString(
+ securecookie.GenerateRandomKey(32))
}
if err := s.save(session); err != nil {
return err
Debdiff
File lists identical (after any substitutions)
No differences were encountered in the control files