Skip to content

Fix URI Decode Logging Errors #1448

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

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

JacksonWeber
Copy link
Contributor

Fixes #1404

This pull request enhances the handling of AUTH_USER cookies in the HttpRequestParser class and adds comprehensive test cases to validate the changes. The updates improve robustness in cookie decoding, handle edge cases gracefully, and ensure better logging for malformed cookies.

Enhancements to HttpRequestParser functionality:

  • Updated the _getId method in HttpRequestParser to decode cookies more robustly, returning null for malformed cookies or missing values, and logging warnings for decoding errors. (AutoCollection/HttpRequestParser.ts, AutoCollection/HttpRequestParser.tsL252-R264)

Addition of test cases:

  • Added a new "Cookie Decoding" test suite in HttpRequestParser.tests.ts to verify the behavior of AUTH_USER cookie handling. This includes tests for valid cookies, malformed cookies, cookies with special characters, and scenarios with missing or empty cookies. (Tests/AutoCollection/HttpRequestParser.tests.ts, Tests/AutoCollection/HttpRequestParser.tests.tsR274-R414)

Logging improvements:

@JacksonWeber JacksonWeber requested a review from hectorhdzg July 9, 2025 04:05
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

Successfully merging this pull request may close these issues.

1 participant