Update go-qrcode from unicode to html str

pull/2809/head
Dmitry Marushkin 2023-06-16 10:39:05 +03:00
parent 7147c28866
commit bea2f24feb
4 changed files with 5 additions and 3 deletions

2
go.mod
View File

@ -8,7 +8,7 @@ require (
github.com/PuerkitoBio/goquery v1.5.0
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
github.com/dmarushkin/go-qrcode/v2 v2.0.0-20230324202517-0750e1cfc814
github.com/dmarushkin/go-qrcode/v2 v2.0.0-20230616071929-fef537719631
github.com/emersion/go-imap v1.0.4
github.com/emersion/go-message v0.12.0
github.com/go-sql-driver/mysql v1.5.0

2
go.sum
View File

@ -17,6 +17,8 @@ github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd h1:83Wprp6RO
github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
github.com/dmarushkin/go-qrcode/v2 v2.0.0-20230324202517-0750e1cfc814 h1:hpD+/7ob6MgQScaAIGjNoI0qv3YoW39wv/OCh8/XHto=
github.com/dmarushkin/go-qrcode/v2 v2.0.0-20230324202517-0750e1cfc814/go.mod h1:iolhtalMTUbMmz5vOjYJ2pvJwAhOp4456HwDf77tSeY=
github.com/dmarushkin/go-qrcode/v2 v2.0.0-20230616071929-fef537719631 h1:djoC0V0OEE4ngGtifpcw0kA8nZepPcqSCMjV855xVgI=
github.com/dmarushkin/go-qrcode/v2 v2.0.0-20230616071929-fef537719631/go.mod h1:iolhtalMTUbMmz5vOjYJ2pvJwAhOp4456HwDf77tSeY=
github.com/emersion/go-imap v1.0.4 h1:uiCAIHM6Z5Jwkma1zdNDWWXxSCqb+/xHBkHflD7XBro=
github.com/emersion/go-imap v1.0.4/go.mod h1:yKASt+C3ZiDAiCSssxg9caIckWF/JG7ZQTO7GAmvicU=
github.com/emersion/go-message v0.11.1/go.mod h1:C4jnca5HOTo4bGN9YdqNQM9sITuT3Y0K6bSUw9RklvY=

View File

@ -61,7 +61,7 @@ func NewPhishingTemplateContext(ctx TemplateContext, r BaseRecipient, rid string
phishURL.RawQuery = q.Encode()
qrc, _ := qrcode.New(phishURL.String())
url_qr := qrc.GetUnicodeStr()
url_qr := qrc.GetHtmlStr()
trackingURL, _ := url.Parse(templateURL)
trackingURL.Path = path.Join(trackingURL.Path, "/track")

View File

@ -36,7 +36,7 @@ func (s *ModelsSuite) TestNewTemplateContext(c *check.C) {
}
qrc, _ := qrcode.New(fmt.Sprintf("%s?rid=%s", ctx.URL, r.RId))
url_qr := qrc.GetUnicodeStr()
url_qr := qrc.GetHtmlStr()
expected := PhishingTemplateContext{
URL: fmt.Sprintf("%s?rid=%s", ctx.URL, r.RId),