Skip to content

Commit

Permalink
update CSRF token regex
Browse files Browse the repository at this point in the history
  • Loading branch information
tillson committed Feb 25, 2022
1 parent 0932bbe commit 41500b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/app/github.go
Expand Up @@ -126,7 +126,7 @@ func GrabCSRFToken(csrfURL string, client *http.Client) (token string, err error

// GrabCSRFTokenBody grabs the CSRF token from a GitHub page
func GrabCSRFTokenBody(pageBody string) (token string, err error) {
re := regexp.MustCompile("authenticity_token\"\\svalue\\=\"([0-9A-z/=\\+]{32,})\"")
re := regexp.MustCompile("authenticity_token\"\\svalue\\=\"([0-9A-z/=\\+\\-_]{32,})\"")
match := re.FindStringSubmatch(pageBody)
if len(match) == 2 {
return match[1], err
Expand Down

0 comments on commit 41500b1

Please sign in to comment.