-
Notifications
You must be signed in to change notification settings - Fork 1.7k
V3/collection re fix #2018
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
Closed
Closed
V3/collection re fix #2018
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
3334d2a
Regex search in collection data case insensitive fix
airween 4e1b99a
Fixed regex case insensitive search bug in LMDB
airween 640daa4
Added test cases
airween ea937cf
Increment OVECCOUNT value for bigger regex's
airween 8040904
Removed pcre dependency from outside of regex class
airween File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
[ | ||
{ | ||
"enabled":1, | ||
"version_min":300000, | ||
"title":"Testing setvar :: OWASP CRS id:920450 ('Translate' match)", | ||
"client":{ | ||
"ip":"200.249.12.31", | ||
"port":123 | ||
}, | ||
"server":{ | ||
"ip":"200.249.12.31", | ||
"port":80 | ||
}, | ||
"request":{ | ||
"headers":{ | ||
"Translate": "test" | ||
}, | ||
"uri":"/", | ||
"method":"GET" | ||
}, | ||
"response":{ | ||
"headers":{ | ||
"Date":"Mon, 13 Jul 2015 20:02:41 GMT", | ||
"Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", | ||
"Content-Type":"text/html" | ||
}, | ||
"body":[ | ||
"no need." | ||
] | ||
}, | ||
"expected":{ | ||
"http_code":400 | ||
}, | ||
"rules":[ | ||
"SecRuleEngine On", | ||
"SecDefaultAction \"phase:2,deny,block,status:400,log\"", | ||
"SecRule &TX:restricted_headers \"@eq 0\" \"id:901165,phase:1,pass,nolog,setvar:'tx.restricted_headers=/proxy/ /lock-token/ /content-range/ /translate/ /if/'\"", | ||
"SecRule REQUEST_HEADERS_NAMES \"@rx ^.*$\" \"id:920450,phase:2,block,capture,t:none,t:lowercase,msg:'HTTP header is restricted by policy (%{MATCHED_VAR})',logdata:' Restricted header detected %{MATCHED_VAR}',ver:'OWASP_CRS/3.1.0',severity:'CRITICAL',setvar:'tx.header_name_%{tx.0}=/%{tx.0}/',chain", | ||
"SecRule TX:/^HEADER_NAME_/ \"@within %{tx.restricted_headers}\" \"setvar:'tx.msg=%{rule.msg}',setvar:'tx.anomaly_score_pl1=+%{tx.critical_anomaly_score}',setvar:'tx.%{rule.id}-OWASP_CRS/POLICY/HEADERS_RESTRICTED-%{MATCHED_VAR_NAME}=%{MATCHED_VAR}'" | ||
] | ||
}, | ||
{ | ||
"enabled":1, | ||
"version_min":300000, | ||
"title":"Testing setvar :: OWASP CRS id:920450 ('Proxy-Connection' not match)", | ||
"client":{ | ||
"ip":"200.249.12.31", | ||
"port":123 | ||
}, | ||
"server":{ | ||
"ip":"200.249.12.31", | ||
"port":80 | ||
}, | ||
"request":{ | ||
"headers":{ | ||
"Accept": "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5", | ||
"Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", | ||
"Accept-Encoding": "gzip,deflate", | ||
"Accept-Language": "en-us,en;q=0.5", | ||
"Host": "localhost", | ||
"Keep-Alive": "300", | ||
"Proxy-Connection": "keep-alive", | ||
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv" | ||
}, | ||
"uri":"/", | ||
"method":"GET" | ||
}, | ||
"response":{ | ||
"headers":{ | ||
"Date":"Mon, 13 Jul 2015 20:02:41 GMT", | ||
"Last-Modified":"Sun, 26 Oct 2014 22:33:37 GMT", | ||
"Content-Type":"text/html" | ||
}, | ||
"body":[ | ||
"no need." | ||
] | ||
}, | ||
"expected":{ | ||
"http_code":200 | ||
}, | ||
"rules":[ | ||
"SecRuleEngine On", | ||
"SecDefaultAction \"phase:2,deny,block,status:400,log\"", | ||
"SecRule &TX:restricted_headers \"@eq 0\" \"id:901165,phase:1,pass,nolog,setvar:'tx.restricted_headers=/proxy/ /lock-token/ /content-range/ /translate/ /if/'\"", | ||
"SecRule REQUEST_HEADERS_NAMES \"@rx ^.*$\" \"id:920450,phase:2,block,capture,t:none,t:lowercase,msg:'HTTP header is restricted by policy (%{MATCHED_VAR})',logdata:' Restricted header detected %{MATCHED_VAR}',ver:'OWASP_CRS/3.1.0',severity:'CRITICAL',setvar:'tx.header_name_%{tx.0}=/%{tx.0}/',chain", | ||
"SecRule TX:/^HEADER_NAME_/ \"@within %{tx.restricted_headers}\" \"setvar:'tx.msg=%{rule.msg}',setvar:'tx.anomaly_score_pl1=+%{tx.critical_anomaly_score}',setvar:'tx.%{rule.id}-OWASP_CRS/POLICY/HEADERS_RESTRICTED-%{MATCHED_VAR_NAME}=%{MATCHED_VAR}'" | ||
] | ||
} | ||
] | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may not need this to be explicit anylonger.