diff --git a/core/Makefile.dep b/core/Makefile.dep index d2a46cf..8ff0bd9 100755 --- a/core/Makefile.dep +++ b/core/Makefile.dep @@ -47,8 +47,8 @@ app.o: ../templates/templates.h ../templates/patterncacher.h app.o: ../templates/indexpatterns.h ../templates/patterns.h app.o: ../templates/changepatterns.h ../templates/htmltextstream.h app.o: ../core/sessionmanager.h compress.h postparser.h httpsimpleparser.h -app.o: cookieparser.h postmultiparser.h acceptencodingparser.h -app.o: acceptbaseparser.h plugin.h pluginmsg.h +app.o: plugin.h pluginmsg.h cookieparser.h postmultiparser.h +app.o: acceptencodingparser.h acceptbaseparser.h basethread.o: basethread.h synchro.h bbcodeparser.o: bbcodeparser.h htmlfilter.h compress.o: compress.h log.h textstream.h logmanipulators.h diff --git a/core/pluginmsg.h b/core/pluginmsg.h index 1ea6214..fa0b66f 100755 --- a/core/pluginmsg.h +++ b/core/pluginmsg.h @@ -236,6 +236,13 @@ // the session pointer in info is null #define WINIX_BASE_URL_REDIRECT 31030 +// raw POST parameters +// in p1 there is a pointer to std::string meaning a parameter's name +// in p2 there is a pointer to std::string value +// this is sent only from PostParser +// PostMultiParser (multipart/form-data html forms) doesn't send this messsage +// there is no a session set (session pointer is null) +#define WINIX_POST_PARAMS 31040 diff --git a/core/postparser.h b/core/postparser.h index faa6ea2..fc6ab04 100755 --- a/core/postparser.h +++ b/core/postparser.h @@ -18,6 +18,7 @@ #include "utf8/utf8.h" #include "log.h" #include "config.h" +#include "plugin.h" @@ -30,6 +31,9 @@ class PostParser : public HttpSimpleParser bool input_as_utf8; size_t log_value_size; int var_index; + bool has_winix_post_params_msg; + + protected: @@ -77,6 +81,9 @@ protected: bool added; std::pair res; + if( has_winix_post_params_msg ) + plugin.Call(0, WINIX_POST_PARAMS, &name, &value); + ConvStr(name, temp_name); ConvStr(value, temp_value); @@ -121,6 +128,8 @@ public: post_tab = &post_tab_; var_index = 1; + has_winix_post_params_msg = plugin.HasMessage(WINIX_POST_PARAMS); + HttpSimpleParser::Parse(); } diff --git a/main/Makefile.dep b/main/Makefile.dep index b0d08b2..4ec32c4 100755 --- a/main/Makefile.dep +++ b/main/Makefile.dep @@ -52,6 +52,7 @@ main.o: ../templates/templates.h ../templates/patterncacher.h main.o: ../templates/indexpatterns.h ../templates/patterns.h main.o: ../templates/changepatterns.h ../templates/htmltextstream.h main.o: ../core/sessionmanager.h ../core/compress.h ../core/postparser.h -main.o: ../core/httpsimpleparser.h ../core/cookieparser.h -main.o: ../core/postmultiparser.h ../core/acceptencodingparser.h -main.o: ../core/acceptbaseparser.h ../core/plugin.h ../core/pluginmsg.h +main.o: ../core/httpsimpleparser.h ../core/plugin.h ../core/pluginmsg.h +main.o: ../core/cookieparser.h ../core/postmultiparser.h +main.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h +main.o: ../core/plugin.h