Skip to content

Commit

Permalink
fix form extraction: action parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
dogancanbakir committed Oct 11, 2024
1 parent 28f3ba3 commit 9dc2431
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/utils/formfields.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ func ParseFormFields(document *goquery.Document) []navigation.Form {
enctype = "application/x-www-form-urlencoded"
}

if action != "" {
actionUrl, err := urlutil.ParseURL(action, true)
if err != nil {
return
}

if actionUrl, err := urlutil.ParseURL(action, true); err == nil {
// donot modify absolute urls and windows paths
if actionUrl.IsAbs() || strings.HasPrefix(action, "//") || strings.HasPrefix(action, "\\") {
// keep absolute urls as is
Expand Down

0 comments on commit 9dc2431

Please sign in to comment.