diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2022-07-05 14:43:12 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-05 14:43:12 +1000 |
| commit | 290a38e424686493465cd10e3af05c0b9e7c4230 (patch) | |
| tree | 499e7f5f2a6da22f960b8781c832127eba626954 /internal/configuration/schema/const.go | |
| parent | 664d65d7fb4cd77f66629dc42c0a2c4a3ccc36a4 (diff) | |
fix(configuration): address parsing failure (#3653)
This fixes an issue with parsing address types from strings.
Diffstat (limited to 'internal/configuration/schema/const.go')
| -rw-r--r-- | internal/configuration/schema/const.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/configuration/schema/const.go b/internal/configuration/schema/const.go index 073712a6c..8ee9867b2 100644 --- a/internal/configuration/schema/const.go +++ b/internal/configuration/schema/const.go @@ -1,6 +1,7 @@ package schema import ( + "regexp" "time" ) @@ -52,3 +53,7 @@ const ( // TOTPSecretSizeMinimum is the minimum secret size. TOTPSecretSizeMinimum = 20 ) + +// regexpHasScheme checks if a string has a scheme. Valid characters for schemes include alphanumeric, hyphen, +// period, and plus characters. +var regexpHasScheme = regexp.MustCompile(`^[-+.a-zA-Z\d]+://`) |
