@@ -276,7 +276,8 @@ static apr_status_t modsecurity_tx_cleanup(void *data) {
276276apr_status_t modsecurity_tx_init (modsec_rec * msr ) {
277277 const char * s = NULL ;
278278 const apr_array_header_t * arr ;
279- char * _cookies = NULL ;
279+ char * semicolon = NULL ;
280+ char * comma = NULL ;
280281 apr_table_entry_t * te ;
281282 int i ;
282283
@@ -402,16 +403,16 @@ apr_status_t modsecurity_tx_init(modsec_rec *msr) {
402403 for (i = 0 ; i < arr -> nelts ; i ++ ) {
403404 if (strcasecmp (te [i ].key , "Cookie" ) == 0 ) {
404405 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 == ';' ) {
408409 parse_cookies_v0 (msr , te [i ].val , msr -> request_cookies , ";" );
409410 } 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
415416 if (msr -> txcfg -> debuglog_level >= 5 ) {
416417 msr_log (msr , 5 , "Cookie v0 parser: Using comma as a separator. Semi-colon was not identified!" );
417418 }
0 commit comments