{"action":"opened","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/6172","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/6172/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/6172/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/6172/events","html_url":"https://github.com/cakephp/cakephp/issues/6172","id":64385169,"number":6172,"title":"3.0 - Cookies unable to contain brackets","user":{"login":"patrickconroy","id":954577,"avatar_url":"https://avatars.githubusercontent.com/u/954577?v=3","gravatar_id":"","url":"https://api.github.com/users/patrickconroy","html_url":"https://github.com/patrickconroy","followers_url":"https://api.github.com/users/patrickconroy/followers","following_url":"https://api.github.com/users/patrickconroy/following{/other_user}","gists_url":"https://api.github.com/users/patrickconroy/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickconroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickconroy/subscriptions","organizations_url":"https://api.github.com/users/patrickconroy/orgs","repos_url":"https://api.github.com/users/patrickconroy/repos","events_url":"https://api.github.com/users/patrickconroy/events{/privacy}","received_events_url":"https://api.github.com/users/patrickconroy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-25T22:17:16Z","updated_at":"2015-03-25T22:17:16Z","closed_at":null,"body":"It's possible this is one of those things that are impossible to fix, but right now I can't use `CookieComponent` to write cookies that have brackets in the name. In my 2.x app there are cookies that are set with the array-style, `CakeCookie[ThisThing]`, but in 3.0 I can't just do this:\r\n```\r\n$this->Cookie->write('CakeCookie[ThisThing]', 10);\r\n```\r\nTrying to use dots, `Cookie->write('CakeCookie.ThisThing', 10)` results in the cookie name being `CakeCookie`, which isn't usable either. It seems that it's the `Hash` class:\r\n\r\n```\r\n#1\r\nHash::insert([], 'CakeCookie[ThisThing]', 'hello'); # -> Array ()\r\n\r\n#2\r\nHash::insert([], 'what', 'hello'); # -> Array ( [what] => hello )\r\n```\r\n\r\nShould `#1` above be an empty array? I don't know what the special conditions `Hash::insert` are doing with brackets, but `noTokens` in that method seems to be messing this up.\r\n\r\nThanks"}}