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

Commit227de9f

Browse files
author
Felipe Zimmerle
committed
Reverts commitb1cbccd
This belongs to a specific branch as long as it is not stable yet.
1 parent2f5af6a commit227de9f

File tree

2 files changed

+1
-67
lines changed

2 files changed

+1
-67
lines changed

‎apache2/apache2_config.c‎

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include"modsecurity.h"
1818
#include"msc_logging.h"
1919
#include"msc_util.h"
20-
#include"pdf_protect.h"
2120
#include"http_log.h"
2221
#include"apr_lib.h"
2322
#include"acmp.h"
@@ -113,14 +112,6 @@ void *create_directory_config(apr_pool_t *mp, char *path)
113112
dcfg->stream_inbody_inspection=NOT_SET;
114113
dcfg->stream_outbody_inspection=NOT_SET;
115114

116-
/* PDF XSS protection. */
117-
dcfg->pdfp_enabled=NOT_SET;
118-
dcfg->pdfp_secret=NOT_SET_P;
119-
dcfg->pdfp_timeout=NOT_SET;
120-
dcfg->pdfp_token_name=NOT_SET_P;
121-
dcfg->pdfp_only_get=NOT_SET;
122-
dcfg->pdfp_method=NOT_SET;
123-
124115
/* Geo Lookups */
125116
dcfg->geo=NOT_SET_P;
126117

@@ -532,20 +523,6 @@ void *merge_directory_configs(apr_pool_t *mp, void *_parent, void *_child)
532523
merged->stream_outbody_inspection= (child->stream_outbody_inspection==NOT_SET
533524
?parent->stream_outbody_inspection :child->stream_outbody_inspection);
534525

535-
/* PDF XSS protection. */
536-
merged->pdfp_enabled= (child->pdfp_enabled==NOT_SET
537-
?parent->pdfp_enabled :child->pdfp_enabled);
538-
merged->pdfp_secret= (child->pdfp_secret==NOT_SET_P
539-
?parent->pdfp_secret :child->pdfp_secret);
540-
merged->pdfp_timeout= (child->pdfp_timeout==NOT_SET
541-
?parent->pdfp_timeout :child->pdfp_timeout);
542-
merged->pdfp_token_name= (child->pdfp_token_name==NOT_SET_P
543-
?parent->pdfp_token_name :child->pdfp_token_name);
544-
merged->pdfp_only_get= (child->pdfp_only_get==NOT_SET
545-
?parent->pdfp_only_get :child->pdfp_only_get);
546-
merged->pdfp_method= (child->pdfp_method==NOT_SET
547-
?parent->pdfp_method :child->pdfp_method);
548-
549526
/* Geo Lookup */
550527
merged->geo= (child->geo==NOT_SET_P
551528
?parent->geo :child->geo);
@@ -701,14 +678,6 @@ void init_directory_config(directory_config *dcfg)
701678
if (dcfg->stream_inbody_inspection==NOT_SET)dcfg->stream_inbody_inspection=0;
702679
if (dcfg->stream_outbody_inspection==NOT_SET)dcfg->stream_outbody_inspection=0;
703680

704-
/* PDF XSS protection. */
705-
if (dcfg->pdfp_enabled==NOT_SET)dcfg->pdfp_enabled=0;
706-
if (dcfg->pdfp_secret==NOT_SET_P)dcfg->pdfp_secret=NULL;
707-
if (dcfg->pdfp_timeout==NOT_SET)dcfg->pdfp_timeout=10;
708-
if (dcfg->pdfp_token_name==NOT_SET_P)dcfg->pdfp_token_name="PDFPTOKEN";
709-
if (dcfg->pdfp_only_get==NOT_SET)dcfg->pdfp_only_get=1;
710-
if (dcfg->pdfp_method==NOT_SET)dcfg->pdfp_method=PDF_PROTECT_METHOD_TOKEN_REDIRECTION;
711-
712681
/* Geo Lookup */
713682
if (dcfg->geo==NOT_SET_P)dcfg->geo=NULL;
714683

@@ -2843,6 +2812,7 @@ static const char *cmd_cache_transformations(cmd_parms *cmd, void *_dcfg,
28432812
if (intval<0) {
28442813
returnapr_psprintf(cmd->pool,"ModSecurity: SecCacheTransformations maxlen must be positive: %s",charval);
28452814
}
2815+
28462816
/* The NOT_SET indicator is -1, a signed long, and therfore
28472817
* we cannot be >= the unsigned value of NOT_SET.
28482818
*/
@@ -2874,26 +2844,6 @@ static const char *cmd_cache_transformations(cmd_parms *cmd, void *_dcfg,
28742844
}
28752845

28762846

2877-
staticconstchar*cmd_pdf_protect_method(cmd_parms*cmd,void*_dcfg,
2878-
constchar*p1)
2879-
{
2880-
directory_config*dcfg= (directory_config*)_dcfg;
2881-
if (dcfg==NULL)returnNULL;
2882-
2883-
if (strcasecmp(p1,"TokenRedirection")==0) {
2884-
dcfg->pdfp_method=PDF_PROTECT_METHOD_TOKEN_REDIRECTION;
2885-
}else
2886-
if (strcasecmp(p1,"ForcedDownload")==0) {
2887-
dcfg->pdfp_method=PDF_PROTECT_METHOD_FORCED_DOWNLOAD;
2888-
}else {
2889-
return (constchar*)apr_psprintf(cmd->pool,
2890-
"ModSecurity: Unrecognised parameter value for SecPdfProtectMethod: %s",p1);
2891-
}
2892-
2893-
returnNULL;
2894-
}
2895-
2896-
28972847
/* -- Configuration directives definitions -- */
28982848

28992849
#defineCMD_SCOPE_MAIN (RSRC_CONF)
@@ -3570,14 +3520,6 @@ const command_rec module_directives[] = {
35703520
"Set Hash key"
35713521
),
35723522

3573-
AP_INIT_TAKE1 (
3574-
"SecPdfProtectMethod",
3575-
cmd_pdf_protect_method,
3576-
NULL,
3577-
RSRC_CONF,
3578-
"protection method to use. Can be 'TokenRedirection' (default) or 'ForcedDownload'"
3579-
),
3580-
35813523
AP_INIT_TAKE1 (
35823524
"SecHashParam",
35833525
cmd_hash_param,

‎apache2/modsecurity.h‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -547,14 +547,6 @@ struct directory_config {
547547
intstream_inbody_inspection;
548548
intstream_outbody_inspection;
549549

550-
/* PDF XSS Protection. */
551-
intpdfp_enabled;
552-
constchar*pdfp_secret;
553-
intpdfp_timeout;
554-
constchar*pdfp_token_name;
555-
intpdfp_only_get;
556-
intpdfp_method;
557-
558550
/* Geo Lookup */
559551
geo_db*geo;
560552

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp