Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit462308b

Browse files
author
Felipe Zimmerle
committed
Improves the accuracy of version identification on status calls
Trying to differentiate among IIS, Apache, NGINX, and Standalone builds.
1 parenta235b53 commit462308b

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

‎apache2/msc_status_engine.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,10 @@ int DSOLOCAL msc_beacon_string (char *beacon_string, int beacon_string_max_len)
349349
#endif
350350
libxml=LIBXML_DOTTED_VERSION;
351351
modsec=MODSEC_VERSION;
352-
#ifdefIIS_VERSION
352+
#ifdefVERSION_IIS
353353
apache="IIS";
354+
#elifVERSION_NGINX
355+
apache="nginx";
354356
#else
355357
apache=real_server_signature;
356358
#endif

‎tests/regression/misc/20-status-engine.t‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,54 @@
7070
"arg1=val1&arg2=val2",
7171
),
7272
},
73+
# On and SecServerSignature
74+
{
75+
type=>"misc",
76+
comment=>"SecStatusEngine On/SecServerSignature - checking signature",
77+
conf=> qq(
78+
SecRuleEngine On
79+
SecServerSignature"SpiderServer v0.1a"
80+
SecStatusEngine On
81+
),
82+
match_log=> {
83+
error=> {
84+
apache=> [ qr/StatusEngine call: \"[0-9]+.[0-9]+.[0-9]+[-RC]*[0-9]*\,Apache/, 1],
85+
nginx => [ qr/StatusEngine call:\"[0-9]+.[0-9]+.[0-9]+[-RC]*[0-9]*\,nginx/, 1],
86+
}
87+
},
88+
match_response =>{
89+
status=> qr/^200$/,
90+
},
91+
request => new HTTP::Request(
92+
POST =>"http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
93+
[
94+
"Content-Type" =>"application/x-www-form-urlencoded",
95+
],
96+
"arg1=val1&arg2=val2",
97+
),
98+
},
99+
# On and SecServerSignature
100+
{
101+
type=>"misc",
102+
comment=>"SecStatusEngine On - checking signature",
103+
conf=> qq(
104+
SecStatusEngine On
105+
),
106+
match_log=> {
107+
error=> {
108+
apache=> [ qr/StatusEngine call: \"[0-9]+.[0-9]+.[0-9]+[-RC]*[0-9]*\,Apache/, 1],
109+
nginx => [ qr/StatusEngine call:\"[0-9]+.[0-9]+.[0-9]+[-RC]*[0-9]*\,nginx/, 1],
110+
}
111+
},
112+
match_response =>{
113+
status=> qr/^200$/,
114+
},
115+
request => new HTTP::Request(
116+
POST =>"http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
117+
[
118+
"Content-Type" =>"application/x-www-form-urlencoded",
119+
],
120+
"arg1=val1&arg2=val2",
121+
),
122+
},
73123

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp