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

Commit0787b45

Browse files
zimmerleFelipe Zimmerle
authored and
Felipe Zimmerle
committed
Adds support to JSON parser in the nginx module
Building with --enable-standalone-module was failing duethe lack of the reference to the msc_json.c file inside thestandalone/Makefile.am. This patch also place the dependencyof the yajl to the nginx module config script.
1 parent09ced44 commit0787b45

File tree

4 files changed

+23
-4
lines changed

4 files changed

+23
-4
lines changed

‎apache2/Makefile.win‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ DEFS=$(DEFS) -DWITH_LUA
3838
INCLUDES = $(INCLUDES) -I$(LUA)\include -I$(LUA) \
3939
!ENDIF
4040

41+
# Yajl/Json is optional
42+
!IF "$(YAJL)" != ""
43+
LIBS = $(LIBS) $(YAJL)\yajl.lib
44+
DEFS=$(DEFS) -DWITH_YAJL
45+
INCLUDES = $(INCLUDES) -I$(YAJL)\include -I$(YAJL) \
46+
!ENDIF
47+
4148
CFLAGS= -MD $(INCLUDES) $(DEFS)
4249

4350
LDFLAGS =
@@ -48,7 +55,8 @@ OBJS = mod_security2.obj apache2_config.obj apache2_io.obj apache2_util.obj \
4855
msc_parsers.obj msc_util.obj msc_pcre.obj persist_dbm.obj \
4956
msc_reqbody.obj msc_geo.obj msc_gsb.obj msc_crypt.obj msc_tree.obj msc_unicode.obj acmp.obj msc_lua.obj \
5057
msc_release.obj libinjection\libinjection_sqli.obj \
51-
msc_status_engine.obj
58+
msc_status_engine.obj \
59+
msc_json.obj
5260

5361
all: $(DLL)
5462

‎iis/Makefile.win‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ DEFS=$(DEFS) -DWITH_LUA
4141
INCLUDES = $(INCLUDES) -I$(LUA)\include -I$(LUA) \
4242
!ENDIF
4343

44+
# Yajl/Json is optional
45+
!IF "$(YAJL)" != ""
46+
LIBS = $(LIBS) $(YAJL)\yajl.lib
47+
DEFS=$(DEFS) -DWITH_YAJL
48+
INCLUDES = $(INCLUDES) -I$(YAJL)\include -I$(YAJL) \
49+
!ENDIF
50+
4451
CFLAGS= -MD /Zi $(INCLUDES) $(DEFS)
4552

4653
LDFLAGS = /DEF:"mymodule.def" /DEBUG /OPT:REF /OPT:ICF /MANIFEST /ManifestFile:"ModSecurityIIS.dll.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /TLBID:1 /DYNAMICBASE /NXCOMPAT
@@ -51,7 +58,8 @@ OBJS1 = mod_security2.obj apache2_config.obj apache2_io.obj apache2_util.obj \
5158
msc_parsers.obj msc_util.obj msc_pcre.obj persist_dbm.obj \
5259
msc_reqbody.obj msc_geo.obj msc_gsb.obj msc_unicode.obj acmp.obj msc_lua.obj \
5360
msc_release.obj msc_crypt.obj msc_tree.obj \
54-
msc_status_engine.obj
61+
msc_status_engine.obj \
62+
msc_json.obj
5563
OBJS2 = api.obj buckets.obj config.obj filters.obj hooks.obj regex.obj server.obj
5664
OBJS3 = main.obj moduleconfig.obj mymodule.obj
5765
OBJS4 = libinjection_sqli.obj

‎nginx/modsecurity/config.in‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ CFLAGS="$CFLAGS \
77
@LIBXML2_CFLAGS@\
88
@LUA_CFLAGS@\
99
@MODSEC_EXTRA_CFLAGS@\
10-
@PCRE_CFLAGS@"
10+
@PCRE_CFLAGS@\
11+
@YAJL_CFLAGS@"
1112

1213

1314
CORE_LIBS="$CORE_LIBS\
@@ -18,7 +19,8 @@ CORE_LIBS="$CORE_LIBS \
1819
@LIBXML2_LDADD@\
1920
@LUA_LDADD@\
2021
@PCRE_LDADD@\
21-
@APXS_LIBS@"
22+
@APXS_LIBS@\
23+
@YAJL_LIBS@"
2224

2325
ngx_addon_name=ngx_http_modsecurity
2426

‎standalone/Makefile.am‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ standalone_la_SOURCES = ../apache2/acmp.c \
1313
../apache2/msc_crypt.c \
1414
../apache2/msc_geo.c \
1515
../apache2/msc_gsb.c \
16+
../apache2/msc_json.c \
1617
../apache2/msc_logging.c \
1718
../apache2/msc_lua.c \
1819
../apache2/msc_multipart.c \

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp