-
Notifications
You must be signed in to change notification settings - Fork 96
Implement IsURL util func, remove govalidator dependency #187
Copy link
Copy link
Closed
Description
The github.com/asaskevich/govalidator dependency could be removed from both zcrypto and zlint if zcrypto provided its own IsURL utility function.
Alternatively, removing the three invocations of govalidator.IsURL in x509/json.go would accomplish similar.
Lines 458 to 462 in 0afe7b2
| for _, name := range c.URIs { | |
| if govalidator.IsURL(name) { | |
| jc.Names = append(jc.Names, name) | |
| } | |
| } |
Lines 464 to 469 in 0afe7b2
| for _, name := range c.IPAddresses { | |
| str := name.String() | |
| if govalidator.IsURL(str) { | |
| jc.Names = append(jc.Names, str) | |
| } | |
| } |
Lines 557 to 563 in 0afe7b2
| // Check for wildcards and redacts, ignore malformed urls | |
| if strings.HasPrefix(name, "?.") || strings.HasPrefix(name, "*.") { | |
| ret = isValidName(name[2:]) | |
| } else { | |
| ret = govalidator.IsURL(name) | |
| } | |
| return |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels