{"id":14426,"date":"2017-10-06T08:00:16","date_gmt":"2017-10-05T23:00:16","guid":{"rendered":"http:\/\/www.techscore.com\/blog\/?p=14426"},"modified":"2018-11-14T16:33:43","modified_gmt":"2018-11-14T07:33:43","slug":"about-cookie","status":"publish","type":"post","link":"https:\/\/www.techscore.com\/blog\/2017\/10\/06\/about-cookie\/","title":{"rendered":"Cookie \u304c\u4e0a\u66f8\u304d\u3055\u308c\u308b !?"},"content":{"rendered":"
<\/p>\n
\u3053\u3093\u306b\u3061\u306f\u3001\u4e2d\u5c71\u3067\u3059\uff08\u5199\u771f\u306f\u79c1\u3067\u306f\u3042\u308a\u307e\u305b\u3093\uff09\u3002
\n\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067 Parasite Cookie \u3068\u3044\u3046\u9020\u8a9e\u3092\u7528\u3044\u307e\u3057\u305f\u304c<\/p>\n
\u97fb\u3092\u8e0f\u3093\u3067 Cuckoo Cookie \u306a\u3093\u3066\u306e\u3082\u60aa\u304f\u306a\u3044\u3067\u3059\u306d\u3002
\n\u5199\u771f\u306e\u3088\u3046\u306b\u30ab\u30c3\u30b3\u30a6\u304c\u4ed6\u306e\u9ce5\u306e\u5de3\u306b\u6258\u5375\u3059\u308b\u69d8\u306f\u3001\u6211\u306a\u304c\u3089\u7684\u3092\u5c04\u305f\u4f8b\u3048\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n
\u547c\u79f0\u306f\u3055\u3066\u304a\u304d Parasite Cookie \u306e\u52d5\u4f5c\u3067\u3075\u3068\u6c17\u306b\u306a\u3063\u305f\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002 \u305d\u3053\u3067\u3001\u4eca\u56de\u306f Cookie \u306e\u4e0a\u66f8\u304d\u306b\u3064\u3044\u3066\u8003\u5bdf\u3057\u3066\u307f\u307e\u3059\u3002 RFC 6265 \u306e 5.3. Storage Model \u306b\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n \n11. If the cookie store contains a cookie with the same name, domain, and path as the newly created cookie:<\/p>\n 1. Let old-cookie be the existing cookie with the same name, domain, and path as the newly created cookie. (Notice that this algorithm maintains the invariant that there is at most one such cookie.)<\/p>\n 2. If the newly created cookie was received from a \"non-HTTP\" API and the old-cookie's http-only-flag is set, abort these steps and ignore the newly created cookie entirely.<\/p>\n 3. Update the creation-time of the newly created cookie to match the creation-time of the old-cookie.<\/p>\n 4. Remove the old-cookie from the cookie store.\n<\/p><\/blockquote>\n \u4eca\u56de\u306e\u8abf\u67fb\u3067\u306e Parasite Cookie \u66f8\u304d\u8fbc\u307f\u306f HTTP Set-Cookie \u3067\u6307\u5b9a\u3057\u305f domain, path \u5c5e\u6027\u3068\u540c\u3058 path, domain \u3067\u5b9f\u884c\u3057\u307e\u3059\u3002 \u884c\u306f Cookie \u306e\u521d\u671f\u5024\u306e\u66f8\u304d\u8fbc\u307f\u3001\u5217\u306f Cookie \u306e\u4e0a\u66f8\u304d\u306e\u65b9\u6cd5\u3067\u3059\u3002 \u3064\u307e\u308a 1st-party Cookie \u3092 HTTP Set-Cookie \u3067\u66f8\u304d\u8fbc\u3093\u3060 [\u540d\u524d, \u5024]<\/em> \u306b\u3001\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\u696d\u8005\u304c Parasite Cookie \u3067\u4e0a\u66f8\u304d\u53ef\u80fd\u3067\u3059\u3002 Chrome \u3067\u306f\u540c\u3058\u540d\u524d\u306e Cookie \u304c\u5171\u5b58\u3067\u304d\u308b\u3088\u3046\u3067\u3059\u3002 \u307e\u305f alert(document.cookie); \u306e\u7d50\u679c\u306f<\/p>\n \u3068\u306a\u308a\u307e\u3057\u305f\u3002 \u5b9f\u9a13\u7d50\u679c\u304b\u3089 Parasite Cookie \u306b\u3088\u308b\u4e0a\u66f8\u304d\u306f\u30d6\u30e9\u30a6\u30b6\u4f9d\u5b58\u306e\u7d50\u679c\u3068\u306a\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3057\u305f\u3002
\n\u30ec\u30a2\u30b1\u30fc\u30b9\u3060\u3068\u306f\u601d\u3044\u307e\u3059\u304c\u3001\u65e2\u306b Cookie DB \u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b [\u540d\u524d, \u5024]<\/em> \u3068\u540c\u3058\u540d\u524d\u3067 Parasite Cookie \u304c\u66f8\u304d\u8fbc\u307e\u308c\u305f\u5834\u5408\u306b\u306f\u3069\u3046\u306a\u308b\u306e\u3067\u3057\u3087\u3046\u304b !?
\n\u5024\u304c\u4e0a\u66f8\u304d\u3055\u308c\u3066\u3057\u307e\u3046\u3068\u3057\u305f\u3089\u672c\u5f53\u306b\u8ff7\u60d1\u306a Parasite Cookie \u3067\u3059\u3088\u306d\u3002<\/p>\n
\n\u306a\u304a\u8abf\u67fb\u306b\u5229\u7528\u3057\u305f\u30d6\u30e9\u30a6\u30b6\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002
\n\uff08iOS \u3068 Android \u306e\u6a19\u6e96\u30d6\u30e9\u30a6\u30b6\u306b\u3064\u3044\u3066\u306f\u307e\u305f\u306e\u6a5f\u4f1a\u306b\uff09<\/p>\n\n
RFC \u306e\u78ba\u8a8d<\/h2>\n
\n\u305d\u306e\u969b\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u5b9f\u88c5\u304c\u4e0a\u8a18 2. \u306e\u4ed5\u69d8\u901a\u308a\u306a\u3089 httponly \u6307\u5b9a\u306e HTTP Set-Cookie \u306e\u7d50\u679c\u306f Parasite Cookie \u3067\u4e0a\u66f8\u304d\u3055\u308c\u308b\u3053\u3068\u306f\u306a\u3055\u305d\u3046\u3067\u3059\u3002<\/p>\nFirefox \u306e\u5834\u5408<\/h2>\n
<\/p>\n
\n\u5f8c\u8ff0\u3059\u308b Chrome \u306e\u5834\u5408\u3068\u52d5\u4f5c\u304c\u540c\u3058\u5834\u5408\u306f\u9752\u3001\u7570\u306a\u308b\u5834\u5408\u306f\u8d64\u3067\u30bb\u30eb\u3092\u7740\u8272\u3057\u3066\u3044\u307e\u3059\u3002
\nFirefox \u306e\u30c6\u30b9\u30c8\u7d50\u679c\u3092\u7aef\u7684\u306b\u8ff0\u3079\u308b\u3068<\/p>\n\n
\n\u3082\u3057 JavaScirpt \u7d4c\u7531\u3067\u8aad\u307f\u66f8\u304d\u3059\u308b\u5fc5\u8981\u304c\u306a\u3051\u308c\u3070 httponly \u3092\u6307\u5b9a\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\nChrome \u306e\u5834\u5408<\/h2>\n
<\/p>\n
\nHTTP Set-Cookie \u306e\u7d50\u679c\u3068 document.cookie \u3078\u306e\u66f8\u304d\u8fbc\u307f\u7d50\u679c\u306f\u5225\u3005\u306b\u7ba1\u7406\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u306d\u3002
\n\u5b9f\u969b\u306b 4 \u306e\uff08\u203b\uff09<\/span>\u306e HTTP Cookie Header \u306f<\/p>\n<\/p>\n
<\/p>\n
\n\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u9023\u60f3\u914d\u5217\u7d4c\u7531\u3067 Cookie \u3092\u6271\u3046\u5834\u5408\u3001\u9023\u60f3\u914d\u5217\u306e\u4f5c\u308a\u304b\u305f\u6b21\u7b2c\u3067\u7570\u306a\u308b\u7d50\u679c\u3068\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n\u307e\u3068\u3081<\/h2>\n
\n\u5b9f\u969b\u306b\u306f Parasite Cookie \u3067\u540d\u524d\u304c\u91cd\u8907\u3059\u308b\u30b1\u30fc\u30b9\u306f\u7a00\u3060\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u540c\u3058\u540d\u524d\u306e Cookie \u3092 HTTP Header \u3068 JavaScript \u53cc\u65b9\u3067\u8aad\u307f\u66f8\u304d\u3059\u308b\u3088\u3046\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u5b58\u5728\u3059\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002
\n\u305d\u306e\u3088\u3046\u306a\u5834\u5408\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u632f\u308b\u821e\u3044\u306e\u9055\u3044\u306b\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044 !!<\/p>\n","protected":false},"excerpt":{"rendered":"