Skip to content

Commit

Permalink
handle input url edge cases (projectdiscovery#3004)
Browse files Browse the repository at this point in the history
* handle input url edge cases

* remove extra url logic
  • Loading branch information
tarunKoyalwar authored Dec 8, 2022
1 parent 36fac42 commit e4ae908
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion v2/pkg/input/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (h *Helper) convertInputToType(input string, inputType inputType, defaultPo
notURL := !strings.Contains(input, "://")
parsed, _ := url.Parse(input)
var host, port string
if !notURL {
if !notURL && parsed != nil {
host, port, _ = net.SplitHostPort(parsed.Host)
} else {
host, port, _ = net.SplitHostPort(input)
Expand Down

0 comments on commit e4ae908

Please sign in to comment.