Skip to content

Commit

Permalink
added rgmz suggested regex
Browse files Browse the repository at this point in the history
  • Loading branch information
kashifkhan0771 committed Jan 28, 2025
1 parent 0bd7959 commit a0919f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/detectors/uri/uri.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var _ interface {
} = (*Scanner)(nil)

var (
keyPat = regexp.MustCompile(`\b(?:https?:\/\/)?[\w-\.$~!]{3,50}:([\w-\.%$^&#]{3,50})@[-.\w]+\b`)
keyPat = regexp.MustCompile(`\bhttps?:\/\/[\w!#$%&()*+,\-./;<=>?@[\\\]^_{|}~]{0,50}:([\w!#$%&()*+,\-./:;<=>?[\\\]^_{|}~]{3,50})@[a-zA-Z0-9.-]+(?:\.[a-zA-Z]{2,})?(?:[\d:]{1,5})?\b`)

// TODO: make local addr opt-out
defaultClient = detectors.DetectorHttpClientWithNoLocalAddresses
Expand Down

0 comments on commit a0919f5

Please sign in to comment.