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

Improve normalization of flow->host_server_name #2310

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

IvanNardi
Copy link
Collaborator

Follow-up of 4543385

Remove trailing spaces for any HTTP header (we already remove leading spaces)

We want:

  • a "normalized" string in flow->host_server_name, but
  • to parse the original string for flow risk checking

ndpi_hostname_sni_set() is a private function, so there is no need to export its flags.

Copy link
Collaborator

@utoni utoni left a comment

Choose a reason for hiding this comment

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

What about ndpi_is_valid_hostname in QUIC and FastCGI?
Don't they need any changes?

Follow-up of 4543385

Remove trailing spaces for any HTTP header (we already remove leading
spaces)

We want:
* a "normalized" string in `flow->host_server_name`, but
* to parse the original string for flow risk checking

`ndpi_hostname_sni_set()` is a private function, so there is no need to
export its flags.
@IvanNardi
Copy link
Collaborator Author

What about ndpi_is_valid_hostname in QUIC and FastCGI? Don't they need any changes?

Thanks!! Done in last revision

Copy link

sonarcloud bot commented Feb 8, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@utoni utoni merged commit f352e4f into ntop:dev Feb 9, 2024
33 checks passed
@IvanNardi IvanNardi deleted the sni-improvements branch February 9, 2024 10:03
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.

2 participants