Skip to content

Commit

Permalink
Merge branch 'main' into fix/dev-container-go-version
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Nov 5, 2024
2 parents a31bd9c + 6b4b02d commit 1565d87
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/devumesh"><img src="https://avatars.githubusercontent.com/u/58872100?v=4?s=100" width="100px;" alt="Umesh Balamurugan"/><br /><sub><b>Umesh Balamurugan</b></sub></a><br /><a href="https://github.com/flipt-io/flipt/commits?author=devumesh" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MMartyn"><img src="https://avatars.githubusercontent.com/u/1448102?v=4?s=100" width="100px;" alt="Matt Martyn"/><br /><sub><b>Matt Martyn</b></sub></a><br /><a href="https://github.com/flipt-io/flipt/commits?author=MMartyn" title="Code">💻</a></td>
</tr>
</tbody>
</table>
Expand Down
8 changes: 4 additions & 4 deletions rpc/flipt/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
)

const (
maxJsonStringSize = 10000
entityPropertyKey = "entityId"
maxJsonStringSizeKB = 1000
entityPropertyKey = "entityId"
)

// Validator validates types
Expand All @@ -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),
)
}

Expand Down

0 comments on commit 1565d87

Please sign in to comment.