{"action":"created","issue":{"url":"https://api.github.com/repos/paragi/sphp/issues/14","repository_url":"https://api.github.com/repos/paragi/sphp","labels_url":"https://api.github.com/repos/paragi/sphp/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/paragi/sphp/issues/14/comments","events_url":"https://api.github.com/repos/paragi/sphp/issues/14/events","html_url":"https://github.com/paragi/sphp/issues/14","id":303656672,"number":14,"title":"Subdomain cookie","user":{"login":"karimhb","id":3731447,"avatar_url":"https://avatars1.githubusercontent.com/u/3731447?v=4","gravatar_id":"","url":"https://api.github.com/users/karimhb","html_url":"https://github.com/karimhb","followers_url":"https://api.github.com/users/karimhb/followers","following_url":"https://api.github.com/users/karimhb/following{/other_user}","gists_url":"https://api.github.com/users/karimhb/gists{/gist_id}","starred_url":"https://api.github.com/users/karimhb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karimhb/subscriptions","organizations_url":"https://api.github.com/users/karimhb/orgs","repos_url":"https://api.github.com/users/karimhb/repos","events_url":"https://api.github.com/users/karimhb/events{/privacy}","received_events_url":"https://api.github.com/users/karimhb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-03-08T22:31:42Z","updated_at":"2018-03-10T23:13:06Z","closed_at":"2018-03-10T19:21:47Z","author_association":"NONE","body":"There is no way of setting cookies at .domain (DotDomain), cookies are always set at domain.com (without the dot).\r\n\r\n     `setcookie(\"AAA\", \"value\" -1, '/', \".domain.com\"); // is set at domain.com`"},"comment":{"url":"https://api.github.com/repos/paragi/sphp/issues/comments/372074924","html_url":"https://github.com/paragi/sphp/issues/14#issuecomment-372074924","issue_url":"https://api.github.com/repos/paragi/sphp/issues/14","id":372074924,"user":{"login":"karimhb","id":3731447,"avatar_url":"https://avatars1.githubusercontent.com/u/3731447?v=4","gravatar_id":"","url":"https://api.github.com/users/karimhb","html_url":"https://github.com/karimhb","followers_url":"https://api.github.com/users/karimhb/followers","following_url":"https://api.github.com/users/karimhb/following{/other_user}","gists_url":"https://api.github.com/users/karimhb/gists{/gist_id}","starred_url":"https://api.github.com/users/karimhb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karimhb/subscriptions","organizations_url":"https://api.github.com/users/karimhb/orgs","repos_url":"https://api.github.com/users/karimhb/repos","events_url":"https://api.github.com/users/karimhb/events{/privacy}","received_events_url":"https://api.github.com/users/karimhb/received_events","type":"User","site_admin":false},"created_at":"2018-03-10T23:13:06Z","updated_at":"2018-03-10T23:13:06Z","author_association":"NONE","body":"Hi Paragi,\r\n\r\nI am happy to help. This is why I started this issue in the first place. I appreciate your time and effort in developing such a great tool. I don't think the comma was the issue. The cookie wouldn't have been set at all without the comma, this was a random quick example and I missed the comma on github.\r\n\r\nHere are the results in both cases on same server and same browser with:\r\n`setcookie(\"AAA\", \"value\", 1520921941, '/', \".localhost\")`\r\n\r\n**ROW PHP**\r\nCookie is set @ .localhost (with the dot)\r\n\r\n```\r\n{\r\nHTTPS: \"on\",\r\nHTTP_CONNECTION: \"close\",\r\nHTTP_CACHE_CONTROL: \"max-age=0\",\r\nHTTP_USER_AGENT: \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36\",\r\nHTTP_UPGRADE_INSECURE_REQUESTS: \"1\",\r\nHTTP_ACCEPT: \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\r\nHTTP_ACCEPT_ENCODING: \"gzip, deflate, br\",\r\nHTTP_ACCEPT_LANGUAGE: \"en-GB,en;q=0.9,en-US;q=0.8,en-AU;q=0.7,ar;q=0.6\",\r\nHTTP_COOKIE: \"AAA=value\",\r\nPATH: \"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\",\r\nSERVER_SIGNATURE: \"\",\r\nSERVER_SOFTWARE: \"Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g\",\r\nSERVER_PORT: \"443\",\r\nREQUEST_SCHEME: \"https\",\r\nCONTEXT_PREFIX: \"\",\r\nREMOTE_PORT: \"39626\",\r\nGATEWAY_INTERFACE: \"CGI/1.1\",\r\nSERVER_PROTOCOL: \"HTTP/1.0\",\r\nREQUEST_METHOD: \"GET\",\r\nQUERY_STRING: \"\",\r\nREQUEST_URI: \"/test.php\",\r\nSCRIPT_NAME: \"/test.php\",\r\nPHP_SELF: \"/test.php\",\r\nREQUEST_TIME_FLOAT: 1520722298.056,\r\nREQUEST_TIME: 1520722298,\r\n}\r\n```\r\n\r\n**SPHP**\r\nCookie is set @ localhost (without the dot)\r\n\r\n```\r\n{\r\nHTTP_COOKIE: \"AAA=value\",\r\nHTTP_ACCEPT_LANGUAGE: \"en-GB,en;q=0.9,en-US;q=0.8,en-AU;q=0.7,ar;q=0.6\",\r\nHTTP_ACCEPT_ENCODING: \"identity\",\r\nHTTP_ACCEPT: \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\r\nHTTP_USER_AGENT: \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36\",\r\nHTTP_UPGRADE_INSECURE_REQUESTS: \"1\",\r\nHTTP_CACHE_CONTROL: \"max-age=0\",\r\nHTTP_CONNECTION: \"upgrade\",\r\nHTTP_COOKIE_PARSE_RAW: \"AAA=value\",\r\nSERVER_PROTOCOL: \"HTTP/1.1\",\r\nREQUEST_METHOD: \"GET\",\r\nQUERY_STRING:  \"\",\r\nREQUEST_URI: \"/test.php\",\r\nREMOTE_PORT: 45874,\r\nSCRIPT_NAME: \"/test.php\",\r\nDOCUMENT_ROOT: \"/home/node/dist\",\r\nPHP_SELF: \"/test.php\",\r\nSCRIPT_FILENAME: \"/home/node/dist/test.php\",\r\nPATH_TRANSLATED: \"/\",\r\nGATEWAY_INTERFACE: \"PHP preburner 0.1.3\",\r\nSERVER_SOFTWARE: \"PHP Appilation Server using Node.js and WS Websockets\",\r\nSERVER_SIGNATURE: \"PHP Appilation Server using Node.js and WS Websockets Server with PHP preburner 0.1.3 at localhost:3010\",\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"karimhb"}}