diff options
author | 2021-08-29 16:52:23 +0200 | |
---|---|---|
committer | 2021-08-29 16:52:23 +0200 | |
commit | 8aa72f995f90856d8ec964b79987ba0337c94c7d (patch) | |
tree | 3cc9c292b4cf1e46e15674e7a49842ec279a8e32 /internal/util/regexes.go | |
parent | Mention fixup (#167) (diff) | |
download | gotosocial-8aa72f995f90856d8ec964b79987ba0337c94c7d.tar.xz |
start working on struct validation for gtsmodel
Diffstat (limited to 'internal/util/regexes.go')
-rw-r--r-- | internal/util/regexes.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/util/regexes.go b/internal/util/regexes.go index 88212fc43..d3a42d1fc 100644 --- a/internal/util/regexes.go +++ b/internal/util/regexes.go @@ -90,6 +90,7 @@ var ( followPathRegex = regexp.MustCompile(followPathRegexString) ulidRegexString = `[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}` + ulidRegex = regexp.MustCompile(fmt.Sprintf(`^%s$`, ulidRegexString)) likedPathRegexString = fmt.Sprintf(`^/?%s/(%s)/%s$`, UsersPath, usernameRegexString, LikedPath) // likedPathRegex parses a path that validates and captures the username part from eg /users/example_username/liked |