@@ -1705,7 +1705,7 @@ char *parser_conn_limits_operator(apr_pool_t *mp, const char *p2,
1705
1705
}
1706
1706
else {
1707
1707
return apr_psprintf (mp , "ModSecurity: Invalid operator for " \
1708
- "SecReadStateLimit : %s, expected operators: @ipMatch, @ipMatchF " \
1708
+ "SecConnReadStateLimit : %s, expected operators: @ipMatch, @ipMatchF " \
1709
1709
"or @ipMatchFromFile with or without !" , p2 );
1710
1710
}
1711
1711
@@ -1726,7 +1726,7 @@ char *parser_conn_limits_operator(apr_pool_t *mp, const char *p2,
1726
1726
1727
1727
1728
1728
/**
1729
- * \brief Add SecReadStateLimit configuration option
1729
+ * \brief Add SecConnReadStateLimit configuration option
1730
1730
*
1731
1731
* \param cmd Pointer to configuration data
1732
1732
* \param _dcfg Pointer to directory configuration
@@ -1747,7 +1747,7 @@ static const char *cmd_conn_read_state_limit(cmd_parms *cmd, void *_dcfg,
1747
1747
limit = strtol (p1 , NULL , 10 );
1748
1748
if ((limit == LONG_MAX ) || (limit == LONG_MIN ) || (limit <= 0 )) {
1749
1749
return apr_psprintf (cmd -> pool , "ModSecurity: Invalid value for " \
1750
- "SecReadStateLimit : %s" , p1 );
1750
+ "SecConnReadStateLimit : %s" , p1 );
1751
1751
}
1752
1752
1753
1753
if (p2 != NULL ) {
@@ -1764,8 +1764,18 @@ static const char *cmd_conn_read_state_limit(cmd_parms *cmd, void *_dcfg,
1764
1764
return NULL ;
1765
1765
}
1766
1766
1767
+ static const char * cmd_read_state_limit (cmd_parms * cmd , void * _dcfg ,
1768
+ const char * p1 , const char * p2 )
1769
+ {
1770
+ ap_log_perror (APLOG_MARK , APLOG_STARTUP |APLOG_NOERRNO , 0 , cmd -> pool ,
1771
+ "SecReadStateLimit is depricated, use SecConnReadStateLimit " \
1772
+ "instead." );
1773
+
1774
+ return cmd_conn_read_state_limit (cmd , _dcfg , p1 , p2 );
1775
+ }
1776
+
1767
1777
/**
1768
- * \brief Add SecWriteStateLimit configuration option
1778
+ * \brief Add SecConnWriteStateLimit configuration option
1769
1779
*
1770
1780
* \param cmd Pointer to configuration data
1771
1781
* \param _dcfg Pointer to directory configuration
@@ -1786,7 +1796,7 @@ static const char *cmd_conn_write_state_limit(cmd_parms *cmd, void *_dcfg,
1786
1796
limit = strtol (p1 , NULL , 10 );
1787
1797
if ((limit == LONG_MAX ) || (limit == LONG_MIN ) || (limit <= 0 )) {
1788
1798
return apr_psprintf (cmd -> pool , "ModSecurity: Invalid value for " \
1789
- "SecWriteStateLimit : %s" , p1 );
1799
+ "SecConnWriteStateLimit : %s" , p1 );
1790
1800
}
1791
1801
1792
1802
if (p2 != NULL ) {
@@ -1802,6 +1812,16 @@ static const char *cmd_conn_write_state_limit(cmd_parms *cmd, void *_dcfg,
1802
1812
1803
1813
return NULL ;
1804
1814
}
1815
+ static const char * cmd_write_state_limit (cmd_parms * cmd , void * _dcfg ,
1816
+ const char * p1 , const char * p2 )
1817
+ {
1818
+ ap_log_perror (APLOG_MARK , APLOG_STARTUP |APLOG_NOERRNO , 0 , cmd -> pool ,
1819
+ "SecWriteStateLimit is depricated, use SecConnWriteStateLimit " \
1820
+ "instead." );
1821
+
1822
+ return cmd_conn_write_state_limit (cmd , _dcfg , p1 , p2 );
1823
+ }
1824
+
1805
1825
1806
1826
1807
1827
static const char * cmd_request_body_inmemory_limit (cmd_parms * cmd , void * _dcfg ,
@@ -2163,7 +2183,7 @@ static const char *cmd_sever_conn_filters_engine(cmd_parms *cmd, void *_dcfg,
2163
2183
else
2164
2184
{
2165
2185
return apr_psprintf (cmd -> pool , "ModSecurity: Invalid value for " \
2166
- "SecConnectionEngine : %s" , p1 );
2186
+ "SecConnEngine : %s" , p1 );
2167
2187
}
2168
2188
2169
2189
return NULL ;
@@ -3308,21 +3328,37 @@ const command_rec module_directives[] = {
3308
3328
),
3309
3329
3310
3330
AP_INIT_TAKE12 (
3311
- "SecReadStateLimit " ,
3331
+ "SecConnReadStateLimit " ,
3312
3332
cmd_conn_read_state_limit ,
3313
3333
NULL ,
3314
3334
CMD_SCOPE_ANY ,
3315
3335
"maximum number of threads in READ_BUSY state per ip address"
3316
3336
),
3317
3337
3318
3338
AP_INIT_TAKE12 (
3319
- "SecWriteStateLimit" ,
3339
+ "SecReadStateLimit" ,
3340
+ cmd_read_state_limit ,
3341
+ NULL ,
3342
+ CMD_SCOPE_ANY ,
3343
+ "maximum number of threads in READ_BUSY state per ip address"
3344
+ ),
3345
+
3346
+ AP_INIT_TAKE12 (
3347
+ "SecConnWriteStateLimit" ,
3320
3348
cmd_conn_write_state_limit ,
3321
3349
NULL ,
3322
3350
CMD_SCOPE_ANY ,
3323
3351
"maximum number of threads in WRITE_BUSY state per ip address"
3324
3352
),
3325
3353
3354
+ AP_INIT_TAKE12 (
3355
+ "SecWriteStateLimit" ,
3356
+ cmd_write_state_limit ,
3357
+ NULL ,
3358
+ CMD_SCOPE_ANY ,
3359
+ "maximum number of threads in WRITE_BUSY state per ip address"
3360
+ ),
3361
+
3326
3362
AP_INIT_TAKE1 (
3327
3363
"SecRequestBodyInMemoryLimit" ,
3328
3364
cmd_request_body_inmemory_limit ,
@@ -3438,7 +3474,7 @@ const command_rec module_directives[] = {
3438
3474
),
3439
3475
3440
3476
AP_INIT_TAKE1 (
3441
- "SecConnectionEngine " ,
3477
+ "SecConnEngine " ,
3442
3478
cmd_sever_conn_filters_engine ,
3443
3479
NULL ,
3444
3480
CMD_SCOPE_ANY ,
0 commit comments