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

Control symbols from the request string in the configuration file passed to string variable as is. #2128

Open
enuribekov-tempesta opened this issue May 30, 2024 · 1 comment
Labels
bug good to start Start form this tasks if you're new in Tempesta FW
Milestone

Comments

@enuribekov-tempesta
Copy link
Contributor

Motivation

In the configuration file, in the section health_check request string contains control symbols:

health_check auto {
	request		"GET / HTTP/1.0\r\n\r\n";
	request_url	"/";

During parsing these string placed to a string buffer as is, with quotation marks and two printables instead of single escape character.

For example, for the request in the code above we get following:

"  G  E  T     /     H  T  T  P  /  1  .  1  \  r  \  n  \  r  \  n  "
22 47 45 54 20 2f 20 48 54 54 50 2f 31 2e 31 5c 72 5c 6e 5c 72 5c 6e 22

instead of:

G  E  T     /     H  T  T  P  /  1  .  1
47 45 54 20 2f 20 48 54 54 50 2f 31 2e 31 0d 0a 0d 0a

Scope

Found in the health_check section but potentially may appear in other similar string parameters.
Does not appear in the hard-coded default request and configuration files created by tempesta-test.

Testing

Reproduce only manually.
It make sense to create test case for parsing not generated by framework, but predefined typical configuration file.

@krizhanovsky
Copy link
Contributor

Does not appear in the hard-coded default request and configuration files created by tempesta-test.

Probably it makes sense to process shields in tempesta.sh probably with some help of Python/Perl instead of doing this in the kernel, just a proposal.

@krizhanovsky krizhanovsky added bug good to start Start form this tasks if you're new in Tempesta FW labels May 30, 2024
@krizhanovsky krizhanovsky added this to the 0.9 - LA milestone May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good to start Start form this tasks if you're new in Tempesta FW
Projects
None yet
Development

No branches or pull requests

2 participants