Skip to content

Commit 5fd9f72

Browse files
authored
When reading expired sessions - expire them (#12686)
* When reading expired sessions - expire them Update to latest macaron/session following merge of https://gitea.com/macaron/session/pulls/11 Also remove old memory provider as 11 updates the memory provider to make it unnecessary. Signed-off-by: Andrew Thornton <[email protected]> * and macaron/session/pulls/12 Signed-off-by: Andrew Thornton <[email protected]>
1 parent ed81a95 commit 5fd9f72

File tree

9 files changed

+32
-231
lines changed

9 files changed

+32
-231
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require (
1414
gitea.com/macaron/i18n v0.0.0-20190822004228-474e714e2223
1515
gitea.com/macaron/inject v0.0.0-20190805023432-d4c86e31027a
1616
gitea.com/macaron/macaron v1.5.0
17-
gitea.com/macaron/session v0.0.0-20191207215012-613cebf0674d
17+
gitea.com/macaron/session v0.0.0-20200902202411-e3a87877db6e
1818
gitea.com/macaron/toolbox v0.0.0-20190822013122-05ff0fc766b7
1919
github.com/BurntSushi/toml v0.3.1
2020
github.com/PuerkitoBio/goquery v1.5.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ gitea.com/macaron/macaron v1.5.0 h1:TvWEcHw1/zaHlo0GTuKEukLh3A99+QsU2mjBrXLXjVQ=
4242
gitea.com/macaron/macaron v1.5.0/go.mod h1:P7hfDbQjcW22lkYkXlxdRIfWOXxH2+K4EogN4Q0UlLY=
4343
gitea.com/macaron/session v0.0.0-20190821211443-122c47c5f705 h1:mvkQGAlON1Z6Y8pqa/+FpYIskk54mazuECUfZK5oTg0=
4444
gitea.com/macaron/session v0.0.0-20190821211443-122c47c5f705/go.mod h1:1ujH0jD6Ca4iK9NL0Q2a7fG2chvXx5hVa7hBfABwpkA=
45-
gitea.com/macaron/session v0.0.0-20191207215012-613cebf0674d h1:XLww3CvnFZkXVwauN67fniDaIpIqsE+9KVcxlZKlvLU=
46-
gitea.com/macaron/session v0.0.0-20191207215012-613cebf0674d/go.mod h1:FanKy3WjWb5iw/iZBPk4ggoQT9FcM6bkBPvmDmsH6tY=
45+
gitea.com/macaron/session v0.0.0-20200902202411-e3a87877db6e h1:BHoJ/xWNt6FrVsL54JennM9HPIQlnbmRvmaC5DO65pU=
46+
gitea.com/macaron/session v0.0.0-20200902202411-e3a87877db6e/go.mod h1:FanKy3WjWb5iw/iZBPk4ggoQT9FcM6bkBPvmDmsH6tY=
4747
gitea.com/macaron/toolbox v0.0.0-20190822013122-05ff0fc766b7 h1:N9QFoeNsUXLhl14mefLzGluqV7w2mGU3u+iZU+jCeWk=
4848
gitea.com/macaron/toolbox v0.0.0-20190822013122-05ff0fc766b7/go.mod h1:kgsbFPPS4P+acDYDOPDa3N4IWWOuDJt5/INKRUz7aks=
4949
gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s=

modules/session/memory.go

Lines changed: 0 additions & 216 deletions
This file was deleted.

modules/session/virtual.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
package session
66

77
import (
8-
"container/list"
98
"encoding/json"
109
"fmt"
1110
"sync"
@@ -37,7 +36,7 @@ func (o *VirtualSessionProvider) Init(gclifetime int64, config string) error {
3736
// This is only slightly more wrong than modules/setting/session.go:23
3837
switch opts.Provider {
3938
case "memory":
40-
o.provider = &MemProvider{list: list.New(), data: make(map[string]*list.Element)}
39+
o.provider = &session.MemProvider{}
4140
case "file":
4241
o.provider = &session.FileProvider{}
4342
case "redis":

vendor/gitea.com/macaron/session/file.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/gitea.com/macaron/session/memory.go

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/gitea.com/macaron/session/mysql/mysql.go

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/gitea.com/macaron/session/postgres/postgres.go

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ gitea.com/macaron/inject
3636
# gitea.com/macaron/macaron v1.5.0
3737
## explicit
3838
gitea.com/macaron/macaron
39-
# gitea.com/macaron/session v0.0.0-20191207215012-613cebf0674d
39+
# gitea.com/macaron/session v0.0.0-20200902202411-e3a87877db6e
4040
## explicit
4141
gitea.com/macaron/session
4242
gitea.com/macaron/session/couchbase

0 commit comments

Comments
 (0)