Change REQUEST_FILENAME behavior#3048
Merged
airween merged 1 commit intoowasp-modsecurity:v3/masterfrom Jan 30, 2024
Merged
Conversation
|
Contributor
|
I don't know why I didn't make a pr, even make a issue. However, our version is patched in 2022: // It's patched just the use of --- src/transaction.cc 2022-03-19 13:59:14.000000000 +0800
+++ /tmp/transaction.cc 2024-02-02 17:46:05.000000000 +0800
@@ -463,6 +463,14 @@ int Transaction::processURI(const char *
size_t pos_raw_query = uri_s.find("?");
+ std::string path_info_raw;
+ if (pos_raw_query == std::string::npos) {
+ path_info_raw = std::string(uri_s, 0);
+ } else {
+ path_info_raw = std::string(uri_s, 0, pos_raw_query);
+ }
+ std::string path_info = utils::uri_decode(path_info_raw);
+
m_uri_decoded = utils::uri_decode(uri_s);
size_t var_size = pos_raw_query;
@@ -477,14 +485,6 @@ int Transaction::processURI(const char *
m_variableRequestProtocol.set("HTTP/" + std::string(http_version),
m_variableOffset + requestLine.size() + 1);
-
- std::string path_info;
- if (pos_raw_query == std::string::npos) {
- path_info = std::string(uri_s, 0);
- } else {
- path_info = std::string(uri_s, 0, pos_raw_query);
- }
- path_info = utils::uri_decode(path_info);
m_uri_no_query_string_decoded = std::unique_ptr<std::string>(
new std::string(path_info));
@@ -496,6 +496,7 @@ int Transaction::processURI(const char *Should I review all our changes, and try to make PR or issue? |
Member
Author
Well, there are a few of us who walk this path :)
Sure, let's see and discuss it. Also, there is a channel on OWASP's Slack where you can join to - the name is |
Damiengourdin1664
approved these changes
Feb 3, 2024
Damiengourdin1664
approved these changes
Feb 3, 2024
This comment was marked as spam.
This comment was marked as spam.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.