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

fix: uri and request parsing; #222

Merged
merged 1 commit into from
Mar 7, 2023
Merged

Conversation

mohamed-gougam
Copy link
Contributor

Proposed changes

Right now we have a problem whenever the URI logged by NAP contains a comma ,. That's due to the fact that we are separating logged values with comma ,, so when splitting to get each value separately we fall in having erroneous values for both URI and request.

This fixes the problem as follow:

  1. Under /etc/app_protect/conf/log_default.json add config to escape the comma , for each logged value with the URI encoding %2C (this represents standard URI encoding for , )
  2. When parsing, for both URI and request, replace %2C with ,.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • I have updated any relevant documentation (README.md)

@netlify
Copy link

netlify bot commented Feb 27, 2023

Deploy Preview for agent-public-docs canceled.

Name Link
🔨 Latest commit cb38b5b
🔍 Latest deploy log https://app.netlify.com/sites/agent-public-docs/deploys/6406eb66b6ea2a00070de35d

@github-actions github-actions bot added bug Something isn't working chore Pull requests for routine tasks labels Feb 27, 2023
@mohamed-gougam mohamed-gougam force-pushed the fix-uri-and-request-parsing branch 2 times, most recently from db65ea6 to bec585d Compare February 27, 2023 17:31
Copy link
Contributor

@sanathkumarbs sanathkumarbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! We should make some Control Plane and Docs changes. I'll ping you about it.

src/plugins/nap_monitoring.go Show resolved Hide resolved
@oliveromahony
Copy link
Contributor

waiting on some unit tests before merging this

@mohamed-gougam mohamed-gougam force-pushed the fix-uri-and-request-parsing branch 4 times, most recently from 9f82298 to 7ae5ce2 Compare March 7, 2023 02:36
@oliveromahony oliveromahony merged commit 7e15481 into main Mar 7, 2023
@oliveromahony oliveromahony deleted the fix-uri-and-request-parsing branch March 7, 2023 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chore Pull requests for routine tasks dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants