Skip to content
This repository was archived by the owner on Feb 4, 2021. It is now read-only.

Commit 9c3a584

Browse files
authored
Merge pull request #94 from ProgrammingLab/gedorinku/escape_glob
Glob escape
2 parents dfe5cdf + 8121288 commit 9c3a584

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

Gopkg.lock

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

infra/store/session/session_store.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"time"
99

1010
"github.com/go-redis/redis"
11+
"github.com/gobwas/glob"
1112
"github.com/pkg/errors"
1213
"github.com/volatiletech/sqlboiler/queries/qm"
1314
"golang.org/x/crypto/bcrypt"
@@ -154,5 +155,5 @@ func (s *sessionStoreImpl) setSession(userID model.UserID) (*model.Session, erro
154155
}
155156

156157
func redisKey(sessionID string) string {
157-
return fmt.Sprintf("%s:%s", keyPrefix, sessionID)
158+
return fmt.Sprintf("%s:%s", keyPrefix, glob.QuoteMeta(sessionID))
158159
}

0 commit comments

Comments
 (0)