diff options
author | 2021-08-29 16:52:23 +0200 | |
---|---|---|
committer | 2021-09-01 11:11:26 +0200 | |
commit | d2276fc553332477740e2c320d51a9cbc3cf2585 (patch) | |
tree | e02e1433afeedbd442d8d9202ddad8a1261b549e /internal/util/regexes.go | |
parent | Improve GetRemoteStatus and db.GetStatus() logic (#174) (diff) | |
download | gotosocial-d2276fc553332477740e2c320d51a9cbc3cf2585.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 |