Conversation
|
This PR will trigger a patch release when merged. |
|
Created https://jira.corp.adobe.com/browse/LLMO-3333 for second iteration to shift sending promise token from header to cookie |
|
Hey @dipratap , Please find review Review – PR #1861MUST (Critical) – Changes in this PR1. JSDoc out of sync with implementation JSDoc still says "context.request for headers" but the code now uses context.pathInfo.headers. Update the JSDoc to match. Suggested fix: Change to: @param {object} context - Request context (context.pathInfo.headers for headers) 2. Null-safe header access Switching from context.request?.headers?.get?.('x-promise-token') to context.pathInfo?.headers?.['x-promise-token'] is null-safe. Confirm pathInfo.headers is populated by the middleware and that header keys are normalized (e.g. lowercased) so 'x-promise-token' matches. SHOULD (Recommended) – Changes in this PR3. LLMO admin check 4. Error message 5. Cookie vs header (LLMO-3333) MUST (Critical) – Pre-existing ( not changed in this PR)6. Sanitize error messages before returning to client probeError.message and hostError.message are returned directly to the client and can leak internal details (hostnames, DNS errors, etc.). Use cleanupHeaderValue() from @adobe/helix-shared-utils before returning. 7. Avoid exposing environment name in client responses Returning env?.ENV (e.g. prod, stage, dev) in the response can help attackers infer deployment topology. Use a generic message such as "API is not available in this environment" instead. SHOULD (Recommended) – Pre-existing / Out of scope8. Token exchange error handling |
Please ensure your pull request adheres to the following guidelines:
describe here the problem you're solving.
If the PR is changing the API specification:
yet. Ideally, return a 501 status code with a message explaining the feature is not implemented yet.
If the PR is changing the API implementation or an entity exposed through the API:
If the PR is introducing a new audit type:
Related Issues
Thanks for contributing!