diff --git a/.all-contributorsrc b/.all-contributorsrc
index 7a157ba24..5e5d0b068 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -520,6 +520,15 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "MMartyn",
+ "name": "Matt Martyn",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1448102?v=4",
+ "profile": "https://github.com/MMartyn",
+ "contributions": [
+ "code"
+ ]
}
],
"contributorsPerLine": 7,
diff --git a/README.md b/README.md
index e6705e2ec..725feffa3 100644
--- a/README.md
+++ b/README.md
@@ -415,6 +415,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
Umesh Balamurugan 💻 |
+ Matt Martyn 💻 |
diff --git a/rpc/flipt/validation.go b/rpc/flipt/validation.go
index fd5a4672a..3866e62c2 100644
--- a/rpc/flipt/validation.go
+++ b/rpc/flipt/validation.go
@@ -11,8 +11,8 @@ import (
)
const (
- maxJsonStringSize = 10000
- entityPropertyKey = "entityId"
+ maxJsonStringSizeKB = 1000
+ entityPropertyKey = "entityId"
)
// Validator validates types
@@ -32,9 +32,9 @@ func validateJsonParameter(jsonValue string, parameterName string) error {
return errors.InvalidFieldError(parameterName, "must be a json string")
}
- if len(bytes) > maxJsonStringSize {
+ if len(bytes) > (maxJsonStringSizeKB * 1024) {
return errors.InvalidFieldError(parameterName,
- fmt.Sprintf("must be less than %d KB", maxJsonStringSize),
+ fmt.Sprintf("must be less than %d KB", maxJsonStringSizeKB),
)
}