Remove ctl:ruleUpdateTarget* and add ctl:ruleRemovetarget*

This commit is contained in:
brenosilva
2012-08-02 18:04:53 +00:00
parent 543a7db8a7
commit 592ec392d1
8 changed files with 189 additions and 48 deletions

View File

@@ -13,6 +13,7 @@
*/
#include "msc_crypt.h"
#include "msc_util.h"
#include "apr_sha1.h"
#include "apr_uri.h"
#include "acmp.h"
@@ -287,7 +288,7 @@ int init_response_body_html_parser(modsec_rec *msr) {
}
if((msr->r->content_encoding == NULL)||(apr_strnatcasecmp(msr->r->content_encoding,"(null)")==0)){
charset=strcasestr(msr->r->content_type,"charset=");
charset=ap_strcasestr(msr->r->content_type,"charset=");
if(charset == NULL){
if (msr->txcfg->debuglog_level >= 4)
msr_log(msr, 4, "init_response_body_html_parser: assuming ISO-8859-1.");
@@ -1013,7 +1014,7 @@ int inject_encrypted_response_body(modsec_rec *msr, int elts) {
encoding = (const char *) htmlGetMetaEncoding(msr->crypto_html_tree);
if (ctype && encoding == NULL) {
if (ctype && (p = strcasestr(ctype, "charset=") , p != NULL)) {
if (ctype && (p = ap_strcasestr(ctype, "charset=") , p != NULL)) {
p += 8 ;
if (encoding = apr_pstrndup(msr->mp, p, strcspn(p, " ;") ), encoding) {
xmlCharEncoding enc;