Cap max size of federated repo list at 2048 bytes
This commit is contained in:
parent
6055b4fca0
commit
f327c0da24
2 changed files with 10 additions and 1 deletions
|
@ -157,6 +157,10 @@ func IsValidFederatedRepoURLList(urls string) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func IsOfValidLength(str string) bool {
|
||||
return len(str) <= 2048
|
||||
}
|
||||
|
||||
var (
|
||||
validUsernamePatternWithDots = regexp.MustCompile(`^[\da-zA-Z][-.\w]*$`)
|
||||
validUsernamePatternWithoutDots = regexp.MustCompile(`^[\da-zA-Z][-\w]*$`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue