Open lavaleri opened 3 years ago
We have some code that intends to return a friendly error if the first byte is base64 encoded:
However we can't ever get inside those statements because we first do a check at: https://github.com/aws/aws-encryption-sdk-javascript/blob/43813f463ef6c53bd4de1963e7843b56733d1bec/modules/serialize/src/deserialize_factory.ts#L74
Move the logic checking the expected first byte in Base64 before the branch that determines which version we're deserializing.
n/a
Could you please share the updated logic
Problem:
We have some code that intends to return a friendly error if the first byte is base64 encoded:
However we can't ever get inside those statements because we first do a check at: https://github.com/aws/aws-encryption-sdk-javascript/blob/43813f463ef6c53bd4de1963e7843b56733d1bec/modules/serialize/src/deserialize_factory.ts#L74
Solution:
Move the logic checking the expected first byte in Base64 before the branch that determines which version we're deserializing.
Out of scope:
n/a