Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudfornt header issue #54

Open
lielran opened this issue Dec 13, 2022 · 2 comments
Open

Cloudfornt header issue #54

lielran opened this issue Dec 13, 2022 · 2 comments

Comments

@lielran
Copy link

lielran commented Dec 13, 2022

Screenshot 2022-12-13 at 16 20 31

![Screenshot 2022-12-13 at 20 15 06](https://user-images.githubusercontent.com/1004667/207412922-2a48dbe1-92ce-4ec8-9817-7a0c5919ed99.png)

(w1f6g52TQqKf0ipOC-3Gc2HelnR72vgScG9mCJ_ticxPbpYHco7Qmw==) ERROR Validation error: Lambda function result validation failed, the function returned an invalid header, invalid character : '%0D' in header value, headerName : Location.

@mehmetemreatasever
Copy link

I have the same issue.

@MartinEmrich
Copy link

Same here. Digging deeper with my almost nonexistent Lambda skills, I noticed this code fragment in the Lambda@Edge function which seems to handle that request:

     status: '302',
      statusDescription: 'Found',
      headers: {
        location: [{
          key: 'Location',
          value: `/?${body}`,
        }],
      },
    };

So as I read it, it takes the request body (which is multipart form encoded) and attaches it as-is to the redirect Location: header.
This data contains multiple CRLF (\r\n).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants