@@ -276,7 +276,8 @@ static apr_status_t modsecurity_tx_cleanup(void *data) {
276
276
apr_status_t modsecurity_tx_init (modsec_rec * msr ) {
277
277
const char * s = NULL ;
278
278
const apr_array_header_t * arr ;
279
- char * _cookies = NULL ;
279
+ char * semicolon = NULL ;
280
+ char * comma = NULL ;
280
281
apr_table_entry_t * te ;
281
282
int i ;
282
283
@@ -402,16 +403,16 @@ apr_status_t modsecurity_tx_init(modsec_rec *msr) {
402
403
for (i = 0 ; i < arr -> nelts ; i ++ ) {
403
404
if (strcasecmp (te [i ].key , "Cookie" ) == 0 ) {
404
405
if (msr -> txcfg -> cookie_format == COOKIES_V0 ) {
405
- _cookies = apr_pstrdup (msr -> mp , te [i ].val );
406
- while ((* _cookies != 0 )&& (* _cookies != ';' )) _cookies ++ ;
407
- if (* _cookies == ';' ) {
406
+ semicolon = apr_pstrdup (msr -> mp , te [i ].val );
407
+ while ((* semicolon != 0 )&& (* semicolon != ';' )) semicolon ++ ;
408
+ if (* semicolon == ';' ) {
408
409
parse_cookies_v0 (msr , te [i ].val , msr -> request_cookies , ";" );
409
410
} else {
410
- _cookies = apr_pstrdup (msr -> mp , te [i ].val );
411
- while ((* _cookies != 0 )&& (* _cookies != ',' )) _cookies ++ ;
412
- if (* _cookies == ',' ) {
413
- _cookies ++ ;
414
- if (* _cookies == 0x20 ) {// looks like comma is the separator
411
+ comma = apr_pstrdup (msr -> mp , te [i ].val );
412
+ while ((* comma != 0 )&& (* comma != ',' )) comma ++ ;
413
+ if (* comma == ',' ) {
414
+ comma ++ ;
415
+ if (* comma == 0x20 ) {// looks like comma is the separator
415
416
if (msr -> txcfg -> debuglog_level >= 5 ) {
416
417
msr_log (msr , 5 , "Cookie v0 parser: Using comma as a separator. Semi-colon was not identified!" );
417
418
}
0 commit comments