Answered question

How can I fix a cookie that gets malformed in user validation?

My recorded cookie looks like this:

Cookie: _ga=GA1.3.907571147.1425586632; _dc_gtm_UA-54927908-1=1; _gat=1; quiz-data={"data":[{"id":9,"items":[{"id":64,"label":"Travelling"},{"id":65,"label":"Eating out"}]}],"score":[]}

I have tried to add the following to the controllor.properties file and retested the validation. The changes and results are as follows:

no line added to controller.properties
Result:
Cookie: quiz-data={"data":[{"id":9; "items":[{"id":64=; "label":"Travelling"}=; {"id":65=; "label":"Eating out"}]}]=; "score":[]}=; _ga=GA1.3.907571147.1425586632; _dc_gtm_UA-54927908-1=1; _gat=1

escaped.cookie.characters= ;
Result:
Cookie: quiz-data={"data":[{"id":9; "items":[{"id":64=; "label":"Travelling"}=; {"id":65=; "label":"Eating out"}]}]=; "score":[]}=; _ga=GA1.3.907571147.1425586632; _dc_gtm_UA-54927908-1=1; _gat=1

escaped.cookie.characters= ,
Result:
Cookie: quiz-data={"data":[{"id":9; "items":[{"id":64=; "label":"Travelling"}=; {"id":65=; "label":"Eating out"}]}]=; "score":[]}=; _ga=GA1.3.907571147.1425586632; _dc_gtm_UA-54927908-1=1; _gat=1

escaped.cookie.characters=,
Result:
Cookie: quiz-data={"data":[{"id":9; "items":[{"id":64=; "label":"Travelling"}=; {"id":65=; "label":"Eating out"}]}]=; "score":[]}=; _ga=GA1.3.907571147.1425586632; _dc_gtm_UA-54927908-1=1; _gat=1

comma.cookie.separator=true
Result:
Cookie: quiz-data={"data":[{"id":9; "items":[{"id":64=; "label":"Travelling"}=; {"id":65=; "label":"Eating out"}]}]=; "score":[]}=; _ga=GA1.3.907571147.1425586632; _dc_gtm_UA-54927908-1=1; _gat=1

escaped.cookie.characters=,;
Result:
Cookie: quiz-data={"data":[{"id":9; "items":[{"id":64=; "label":"Travelling"}=; {"id":65=; "label":"Eating out"}]}]=; "score":[]}=; _ga=GA1.3.907571147.1425586632; _dc_gtm_UA-54927908-1=1; _gat=1

escaped.cookie.characters=,;
comma.cookie.separator=true
Result:
Cookie: quiz-data={"data":[{"id":9; "items":[{"id":64=; "label":"Travelling"}=; {"id":65=; "label":"Eating out"}]}]=; "score":[]}=; _ga=GA1.3.907571147.1425586632; _dc_gtm_UA-54927908-1=1; _gat=1

As you can see, the commas are being replaced by equals signs and semicolons despite trying to escape them.

This is being looked at by support - however I thought the solution would be useful to the wider community.

Paul C.
Paul C.

Paul C.

Level
1
113 / 750
points
Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

It seems that comma is used as cookie separator when you replay with NeoLoad. That's why it is replaced by "=" sign. So i would rather use "comma.cookie.separator=false" key to avoid that behavior.

This has to be used with also the other key "escaped.cookie.characters= ; " so the whole value is not escaped.

 

Did you find this useful ?

No (0)

Yes (1)

100%

100% of users found this answer useful