diff --git a/fizz/tool/FizzCommandCommon.cpp b/fizz/tool/FizzCommandCommon.cpp index b4d188cc2fe..ae49411a99e 100644 --- a/fizz/tool/FizzCommandCommon.cpp +++ b/fizz/tool/FizzCommandCommon.cpp @@ -173,11 +173,8 @@ folly::Optional readECHConfigsJson(std::string echFile) { folly::Optional parseECHConfigsBase64( std::string echConfigListBase64) { std::vector echConfigs; - echConfigListBase64.erase( - std::remove(echConfigListBase64.begin(), echConfigListBase64.end(), '\n'), - echConfigListBase64.cend()); - auto configBuf = - folly::IOBuf::copyBuffer(folly::base64Decode(echConfigListBase64)); + auto configBuf = folly::IOBuf::copyBuffer( + folly::base64Decode(folly::trimWhitespace(echConfigListBase64))); folly::io::Cursor cursor(configBuf.get()); return decode(cursor); }