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

Commit59a1746

Browse files
author
Felipe Zimmerle
committed
Using real server signature on status call
On Apache platform the server signature can be replaced using theSecServerSignature directive. Status call was using the signature informed bythis directive instead of using the original one. As reported atowasp-modsecurity#702.
1 parent8305600 commit59a1746

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

‎apache2/mod_security2.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ char DSOLOCAL *chroot_dir = NULL;
5454

5555
charDSOLOCAL*new_server_signature=NULL;
5656

57-
staticchar*real_server_signature=NULL;
57+
charDSOLOCAL*real_server_signature=NULL;
5858

5959
charDSOLOCAL*guardianlog_name=NULL;
6060

‎apache2/modsecurity.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ typedef struct msc_parm msc_parm;
133133
#defineFATAL_ERROR "ModSecurity: Fatal error (memory allocation or unexpected internal error)!"
134134

135135
externDSOLOCALchar*new_server_signature;
136+
externDSOLOCALchar*real_server_signature;
136137
externDSOLOCALchar*chroot_dir;
137138

138139
externmoduleAP_MODULE_DECLARE_DATAsecurity2_module;

‎apache2/msc_status_engine.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,7 @@ 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-
#ifdefWIN32
353-
apache="IIS";
354-
#else
355-
apache=apache_get_server_version();
356-
#endif
352+
apache=real_server_signature;
357353

358354
/* 6 represents: strlen("(null)") */
359355
beacon_string_len= (modsec ?strlen(modsec) :6)+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp