sigv4 not work when a url contains special characters like `(

Open
#20 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
aws, javascript

Research direction

Start with src/functions/auth/auth.mjs at line 5 and review how the Lambda imports and uses the SigV4 package. Read the linked smithy-typescript issue for the special-character behavior, then verify whether the latest @smithy/signature-v4 package addresses it. Done means URLs containing !, ', (, ), and * produce a valid signature in this sample.

Written by the indexing model from the issue text.

Description

When a url contains characters like ! ' ( ) *, the signature calculated by the lambda in this sample becomes invalid. More details are in this issue https://github.com/smithy-lang/smithy-typescript/issues/1224

I'm not sure whether the deprecated package @aws-sdk/signature-v4 will get the required patch, but it would be better to bundle the latest @smithy/signature-v4 package in this Lambda.
https://github.com/aws-samples/aws-lambda-function-url-secured/blob/40eb7fed7d02edbb3f3f0ff2d969ed2ff73f8d6c/src/functions/auth/auth.mjs#L5

Dominant language
TypeScript
Stars
27
Forks
7
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws-samples/aws-lambda-function-url-secured

All issues in aws-samples/aws-lambda-function-url-secured

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.