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

Commit

Permalink
Merge pull request #94 from ProgrammingLab/gedorinku/escape_glob
Browse files Browse the repository at this point in the history
Glob escape
  • Loading branch information
gedorinku authored Apr 17, 2019
2 parents dfe5cdf + 8121288 commit 9c3a584
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
18 changes: 18 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion infra/store/session/session_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"time"

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

func redisKey(sessionID string) string {
return fmt.Sprintf("%s:%s", keyPrefix, sessionID)
return fmt.Sprintf("%s:%s", keyPrefix, glob.QuoteMeta(sessionID))
}

0 comments on commit 9c3a584

Please sign in to comment.