Skip to content

Commit

Permalink
Escape user email within fzn_cfg regex (fixes emails with + etc not…
Browse files Browse the repository at this point in the history
… being matched)
  • Loading branch information
Sambigeara committed Nov 10, 2021
1 parent f4588a7 commit c6dcd15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func NewDBListRepo(localWalFile LocalWalFile, webTokenStore WebTokenStore, syncF
web.uuid = listRepo.email // TODO does web need to store uuid??

listRepo.email = webTokenStore.Email()
listRepo.cfgFriendRegex = regexp.MustCompile(fmt.Sprintf("^@%s fzn_cfg:friend +(%s) *$", listRepo.email, EmailRegex))
listRepo.cfgFriendRegex = regexp.MustCompile(fmt.Sprintf("^@%s fzn_cfg:friend +(%s) *$", regexp.QuoteMeta(listRepo.email), EmailRegex))

// registerWeb also deals with the retrieval and instantiation of the web remotes
// Keeping the web assignment outside of registerWeb, as we use registerWeb to reinstantiate
Expand Down

0 comments on commit c6dcd15

Please sign in to comment.