Cookie wrong behavior

Hello,

While working, I am focused possible bug in cookie processing when cookie body is pretty big and complex.

After setting cookie with name “MultiPass_Token” to JSON value with line breaks

“{\r
“token”: “NzVjYmQ0YjctOTBkYi00ZTgxLWFmNjMtMTUxODllOGVhMDJkDQpzdGF0aXN0aWMNCjYzNTc3Mzk0MjY4OTE4NDk4MQ0KTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgNi4xOyBXT1c2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzQ1LjAuMjQ1NC44NSBTYWZhcmkvNTM3LjM2:OjOGmklcetVga2h8gV+W+6jcCIXC/pMYWBITvSNfb80=”\r
}”

function webix.storage.cookie.get(‘MultiPass_Token’) returns NULL
but document.cookie shows that cookie exists.

Browser (Chrome) also shows that cookie with this name exists.

Parsing cookie with simple names and bodies are successfull.

I suppose function webix.storage.cookie.get have a bug in parsing such compex cookie format.

Hi, I can confirm the issue

Fix will be included in Webix 3.0, as quick solution you can use

webix.storage.cookie.set(key, escape(value))
value = unescape( webix.storage.cookie.get("key");