6ad9059d367403b060a649000dc01cd33fda3bb9
The CloudWatch Logs API defines its limits in terms of bytes, but its inputs in terms of UTF-8 encoded strings. Byte-sequences which are not valid UTF-8 encodings are normalized to the Unicode replacement character U+FFFD, which is a 3-byte sequence in UTF-8. This replacement can cause the input to grow, exceeding the API limit and causing failed API calls. This commit adds logic for counting the effective byte length after normalization and splitting input without splitting valid UTF-8 byte-sequences into two invalid byte-sequences. Fixes https://github.com/moby/moby/issues/37747 Signed-off-by: Samuel Karp <skarp@amazon.com> (cherry picked from commit 1e8ef386279e2e28aff199047e798fad660efbdd) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 757650e8dcca87f95ba083a80639769a0b6ca1cc Component: engine
Description
No description provided
Languages
Go
92%
Shell
5.5%
Dockerfile
1.1%
Go-Checksums
0.9%
Makefile
0.3%
Other
0.2%