Skip to content

Commit 0988398

Browse files
authored
Merge pull request #178 from AikidoSec/uppercase-uuid
Add support for uppercase UUID
2 parents 58b40fe + b6077fb commit 0988398

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/request-processor/utils/build_route_from_url.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
var (
11-
UUID = regexp.MustCompile(`(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$`)
11+
UUID = regexp.MustCompile(`(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$`)
1212
NUMBER = regexp.MustCompile(`^\d+$`)
1313
DATE = regexp.MustCompile(`^\d{4}-\d{2}-\d{2}|\d{2}-\d{2}-\d{4}$`)
1414
EMAIL = regexp.MustCompile(`^[a-zA-Z0-9.!#$%&'*+/=?^_` + "`" + `{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$`)

lib/request-processor/utils/utils_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ func TestBuildRouteFromURL(t *testing.T) {
201201
{"/posts/1ef21d2f-1207-6660-8c4f-419efbd44d48", "/posts/:uuid"},
202202
{"/posts/017f22e2-79b0-7cc3-98c4-dc0c0c07398f", "/posts/:uuid"},
203203
{"/posts/0d8f23a0-697f-83ae-802e-48f3756dd581", "/posts/:uuid"},
204+
{"/posts/ECBCDD2C-A441-4846-B5AC-0083D347FDF2", "/posts/:uuid"},
204205
{"/posts/00000000-0000-1000-6000-000000000000", "/posts/00000000-0000-1000-6000-000000000000"},
205206
{"/posts/abc", "/posts/abc"},
206207
{"/login/john.doe@acme.com", "/login/:email"},

0 commit comments

Comments
 (0)