Return friendly error if input is Base64 encoded
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- backend
Research direction
Start in modules/serialize/src/deserialize_factory.ts, then compare the first-byte handling in deserialize_header_v1.ts and deserialize_header_v2.ts. Trace the current version-selection branch and verify that Base64-encoded input reaches a friendly error before deserialization version selection; confirm the relevant serialization tests pass.
Written by the indexing model from the issue text.
Description
Problem:
We have some code that intends to return a friendly error if the first byte is base64 encoded:
- https://github.com/aws/aws-encryption-sdk-javascript/blob/43813f463ef6c53bd4de1963e7843b56733d1bec/modules/serialize/src/deserialize_header_v1.ts#L88-L93
- https://github.com/aws/aws-encryption-sdk-javascript/blob/43813f463ef6c53bd4de1963e7843b56733d1bec/modules/serialize/src/deserialize_header_v2.ts#L92-L96
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
- Dominant language
- TypeScript
- Stars
- 260
- Forks
- 68
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws/aws-encryption-sdk-javascript
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
aws/aws-encryption-sdk-javascript#1656 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
aws/aws-encryption-sdk-javascript#1691 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
aws/aws-encryption-sdk-javascript#1665 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
aws/aws-encryption-sdk-javascript#1663 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
aws/aws-encryption-sdk-javascript#1520 · 1 comment ·
All issues in aws/aws-encryption-sdk-javascript
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·