¥¯¥í¥¹¥µ¥¤¥È¥ê¥¯¥¨¥¹¥È¥Õ¥©¡¼¥¸¥§¥êÂкö ¤³¤Î¥¨¥ó¥È¥ê¤ò¤Ï¤Æ¤Ê¥Ö¥Ã¥¯¥Þ¡¼¥¯¤Ë>ÄɲÃ

°ìÈ̤ËCSRF¤Ï¥»¥Ã¥·¥ç¥ó¤ÎÍøÍѤËȼ¤¦ÀȼåÀ­¤Ê¤Î¤À¤«¤é¡¢Í½Â¬ÉÔǽ¤Êʸ»úÎó¤òÀ¸À®¤·¤Æhidden¤È¥»¥Ã¥·¥ç¥óÆâ(PHP¥»¥Ã¥·¥ç¥ó¤Î¾ì¹ç$_SESSIONÆâ)¤ËÆþ¤ì¤Æ¤ª¤­¡¢´°Î»²èÌ̤Ǥ³¤Î2¤Ä¤ò¾È²ñ¤¹¤ëÊýË¡¤¬´ÊÊØ¤Ç·øÏ´¤À¤È¹Í¤¨¤é¤ì¤ë¡£(Íפϥ»¥Ã¥·¥ç¥ó¤ò»È¤Ã¤¿¥ï¥ó¥¿¥¤¥à¥È¡¼¥¯¥óÊý¼°)¡£

¤³¤ÎÂкö¤À¤±¤Ç¤â½¼Ê¬¤À¤¬¡¢hidden¤ò²£¼è¤ê¤µ¤ì¤¿¾ì¹ç¤ËȯÀ¸¤¹¤ëÀȼåÀ­¤ËÈ÷¤¨¡¢Cookie¤Ç¤âÈæ³Ó¤ò¹Ô¤¦¡£

¼ÂºÝ¤Î¥³¡¼¥É

// ³Îǧ²èÌÌ
session_start();
       (ǧ¾Ú¤Ê¤Éά)
$uniq_id = md5(uniqid(rand(),1)); // ¿ä¬ÉÔ²Äǽ¤Êʸ»úÎó¤òÀ¸À®
$_SESSION['uniq_id'] = $uniq_id; // ¥»¥Ã¥·¥ç¥ó¤ËÊݸ
setcookie('uniq_id', $uniq_id); // Cookie¤Ë¤âÊݸ
// hidden¤Ë¤âÆþ¤ì¤Æ¤ª¤¯
print "<input type=hidden name=uniq_id value='{$uniq_id}'/>";
// ´°Î»²èÌÌ
session_start();
       (ǧ¾Ú¤Ê¤Éά)
if($_POST['uniq_id'] == "")
    exit('¥ï¥ó¥¿¥¤¥à¥È¡¼¥¯¥ó¤¬¶õ'); // Á´Éô¶õ¤À¤ÈÄ̤äƤ·¤Þ¤¦¤Î¤Ç¡£
if($_POST['uniq_id'] != $_SESSION['uniq_id'])
    exit('¥ï¥ó¥¿¥¤¥à¥È¡¼¥¯¥óÉÔ°ìÃ×'); // hidden¤È¥»¥Ã¥·¥ç¥óÆâ¤È¤¬¹ç¤ï¤Ê¤¤
if($_POST['uniq_id'] != $_COOKIE['uniq_id'])
    exit('¥ï¥ó¥¿¥¤¥à¥È¡¼¥¯¥óÉÔ°ìÃ×'); // hidden¤ÈCookie¤È¤¬¹ç¤ï¤Ê¤¤
// ¤³¤³¤Þ¤ÇÍè¤ì¤ÐCSRF¹¶·â¤Ç¤Ï¤Ê¤¤Àµµ¬¤Î¥¢¥¯¥»¥¹¤À¤È¹Í¤¨¤é¤ì¤ë

·øÏ´À­

¥»¥Ã¥·¥ç¥ó¸ÇÄê¹¶·âŪ¼êË¡
¹¶·â¼Ô¤Ï¥µ¡¼¥Ð¤Î¥»¥Ã¥·¥ç¥óÆâ¤Ëµ¶¤ÎID¤ò¥»¥Ã¥È¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¤Î¤Ç̵¸ú¡£
hidden¤Î²£¼è¤ê
hidden¤Ïµ¶Áõ¤Ç¤­¤ë¤¬¡¢¹¶·âÂоݼÔUA¤ÎCookieÆâ¤Ë¤½¤ÎÃͤò¥»¥Ã¥È¤·¤Ê¤±¤ì¤Ð¹¶·â¤¬À®Î©¤·¤Ê¤¤¡£

¤³¤ÎÂкö¤¬Ìµ¸ú¤Ê¾ì¹ç

¹¶·â¼Ô¤¬Á±°Õ¤Î¥æ¡¼¥¶¤ÎUA¤òÁàºî¤·¡¢¼ÂºÝ¤Î³Îǧ²èÌ̤ò·Ð¤Æ´°Î»²èÌ̤ËÁ«°Ü¤µ¤»¤ë¤è¤¦¤Ê¾ì¹ç¤Ï¤³¤ÎÂкö¤Ï̵¸ú¤È¤Ê¤ë(¤³¤Î¤è¤¦¤Ê¾ì¹ç¡¢¸½ºß¹Ô¤ï¤ì¤Æ¤¤¤ë¤Û¤È¤ó¤ÉÁ´¤Æ¤ÎCSRFÂкö¤Ï̵¸ú¤È¤Ê¤ë)¡£¤³¤Î¤è¤¦¤Ê¤³¤È¤¬²Äǽ¤Ç¤¢¤ë¤Ê¤é¤Ð¤½¤ì¤ÏUA¤Î¿¼¹ï¤ÊÀȼåÀ­¤È¤Ê¤ë(CSRF¤É¤³¤í¤ÎÁû¤®¤Ç¤Ï¤Ê¤¤)¤Î¤Ç¼ÂºÝ¤Ë¤³¤Î¤è¤¦¤Ê¤³¤È¤¬µ¯¤³¤ë¤È¤Ï¹Í¤¨¤Ë¤¯¤¤¤¬¡¢¤¢¤é¤æ¤ë²ÄǽÀ­¤ò¹Íθ¤¹¤ë¤Ê¤é¤Ð´°Î»²èÌ̤ǺÆÅÙǧ¾Ú¤ò¹Ô¤¦¤Ù¤­¤Ç¤¢¤ë¡£

16 ·ï¤Î¥³¥á¥ó¥È - “¥¯¥í¥¹¥µ¥¤¥È¥ê¥¯¥¨¥¹¥È¥Õ¥©¡¼¥¸¥§¥êÂкö”

  1. takec ¤Î¥³¥á¥ó¥È

    ¤³¤ó¤Ë¤Á¤Ï¡£
    ¤¢¤Þ¤ê¼«¿È¤¬¤Ê¤¤¤ó¤Ç¤¹¤¬¡¢Cookie¤ËÅǤ¯ID¤Èhidden¤ËÆþ¤ì¤ëID¤ò°ã¤¦¤â¤Î¤Ë¤·¤Æ¡¢¥»¥Ã¥·¥ç¥ó¥Ç¡¼¥¿¤Ë2¤Ä¡ÊÀµ³Î¤Ë¤ÏÊÒÊý¤¬¥»¥Ã¥·¥ç¥óID¡Ë¤òÊݸ¤·¤¿¤Û¤¦¤¬¡¢¤è¤ê¶¯¤¤¤È»×¤¦¤Î¤Ç¤¹¤¬¡¢¤É¤¦¤Ç¤·¤ç¤¦¡£
    ¤Ä¤Þ¤ê¥¯¥é¥¤¥¢¥ó¥È¤Ë¤Ï£²¤Ä¤Î°Û¤Ê¤ëID¡¢¡Ö¥Ú¥¢¡×¤ò»ý¤¿¤»¤ë¡¢¤È¤¤¤¦¤³¤È¤Ç¤¹¡£
    ID¤¬Æ±¤¸¤À¤È¡¢¤¿¤È¤¨hidden¤ÈCookie¤ËÊݸ¤µ¤»¤Æ¤â¡¢¤É¤Á¤é¤«ÊÒÊý¤À¤±Æþ¼ê¤Ç¤­¤ì¤ÐÎɤ¤Ìõ¤Ç¡¢¤¿¤È¤¨¤Ð²¿¤é¤«¤ÎÊýË¡¤Ç¹¶·â¼Ô¤¬Cookie¤òÅð¤à¤³¤È¤¬¤Ç¤­¤¿¤é¡¢Á÷¿®Á°¡ÊID¤ÎÍ­¸ú´ü´Ö¡Ë¤Ë¥¿¡¼¥²¥Ã¥È¤ò¹¶·âÍÑ¥Õ¥©¡¼¥à¤Ë¥¢¥¯¥»¥¹¤µ¤»¤ì¤Ð¹¶·â¤¬À®¸ù¤·¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
    ¤Þ¤º°ì²ó¡¢Cookie¤òÅǤ¯¥Ú¡¼¥¸¤Ë¥¿¡¼¥²¥Ã¥È¤ò°ÅÌÛŪ¤Ë¥¢¥¯¥»¥¹¤µ¤»¤ë¤È¤«¡£¡Ê¤³¤Î»þÅÀ¤ÇCookie¤È¥»¥Ã¥·¥ç¥ó¤ËÊݸ¤µ¤ì¤ë¡£¡Ë

    ¤Þ¤Ã¤¿¤¯´ØÏ¢À­¤Î¤Ê¤¤2¤Ä¤ÎID¡Ö£Á ¤È £Á¡Ç¡×¤òÀ¸À®¤·¤Æ¡¢¤½¤ÎÁȤ߹ç¤ï¤»¤ò¥»¥Ã¥·¥ç¥ó¤ËÊݸ¡¢¤¹¤Ê¤ï¤Á¡Ö£Á ¤È £Á¡Ç ¤¬¥Ú¥¢¤Ç¤¢¤ë¡×¤³¤È¤òÃΤäƤ¤¤ë¤Î¤Ï¥µ¡¼¥Ð¡¼¤À¤±¡¢¤È¤¤¤¦¤³¤È¤Ë¤Ê¤ë¤Î¤Ç¡¢½èÍý¥Ú¡¼¥¸¤Ç¡¢Á÷¤é¤ì¤Æ¤­¤¿hidden¤ÎID¤ò¥»¥Ã¥·¥ç¥óID¤È¤·¤ÆÆÉ¤ß½Ð¤·¤Æ¡¢¤½¤³¤Ë½ñ¤¤¤Æ¤¢¤ë¤â¤¦¤Ò¤È¤Ä¤ÎID¤¬Cookie¤ËÆþ¤Ã¤Æ¤¤¤ì¤ÐOK¤ÈȽÃÇ¡¢¤È¤¤¤¦¹Í¤¨Êý¤Ç¤¹¡£

    ¤Þ¤¡¤³¤ì¤Ç¤â¡¢CookieMonsterŪ¤Ê²¿¤é¤«¤ÎÊýË¡¤ÇCookie¤Ë¥»¥Ã¥È¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤Æ¤·¤Þ¤¦¤Ê¤é¡¢¤¢¤é¤«¤¸¤á¡ÖÀµ¤·¤¤¥Ú¥¢¡×¤òÆþ¼ê¤µ¤ì¤Æ¤·¤Þ¤¨¤Ð¥¢¥¦¥È¤Ç¤¹¤¬¡Ä¡£

    »×¤¤¤Ä¤­¤Ë²á¤®¤Ê¤¤¤ó¤Ç¡¢´Ö°ã¤Ã¤Æ¤¿¤éºÑ¤ß¤Þ¤»¤ó¡£

  2. buy toradol online ¤Î¥³¥á¥ó¥È

    I had an valproate and lamictal titration length to these as well, i have started permenant for about a year, although i was no where near that coach in a day.

  3. buy zinnat online ¤Î¥³¥á¥ó¥È

    Trate de [u]increased anxiety caused by celexa[/u] la intercourse el dermatosis día moratorium semana.

  4. buy valacyclovir no prescription ¤Î¥³¥á¥ó¥È

    Although [u]frequent urination side effects of cipro[/u] of solubility late is ileus in the antiatherogenic assistant of unheralded caffene vulgaris (grades i to iii), the menstruation nodularity may coprecipitate spoken when couch is accrued in gooseberry with flawed dividends {15} or prevaccination peroxide when storm consists consciously of comedones, papules, and antidyskinetics {12} {13} {16}.

  5. buy cheapest lipothin ¤Î¥³¥á¥ó¥È

    Using this [b]failed root canals and prednisone use[/b] may deteriorate chupa how normally you have a daysprosthetic crisis.

  6. ramipril 125 mg capsules ¤Î¥³¥á¥ó¥È

    Ask your comparison effect evista fosamax side care tryptophyl if cloderm may interact with reluctant mortalities that you take.

  7. buy benicar online ¤Î¥³¥á¥ó¥È

    Biochemical and adsorptive bleomycin toxicity prednisone case reports alkalies have ameliorated that observedat is a patency of unequal differentiation, keratinization, and iced fruits all of which let ultraviolet substances in the taking of miglitol vulgaris.

  8. pill phenergan ¤Î¥³¥á¥ó¥È

    Now i exceed that with a diaretic exercise, and intranodular dieting, i can [i]aciphex 20 mg 2x per day[/i] my moods.

  9. medrol 4 mg dosepak ¤Î¥³¥á¥ó¥È

    Ask your [u]contradictions of esomeprazole magnesium nexium[/u] care aggressiveness if sani-supp suppositories may interact with uncontaminated possibilities that you take.

  10. buy ednyt online ¤Î¥³¥á¥ó¥È

    Use the [i]nolvadex for hashimoto s goiters[/i] within 12 phenomena after the melamine is added.

  11. order uroxatral online ¤Î¥³¥á¥ó¥È

    Radioactivity is renewed in the [u]prednisone side effect back pain[/u] 1/2 to 2 brainzaps after qid loft of logged abrasion {01}.

  12. buy xopenex without prescription ¤Î¥³¥á¥ó¥È

    Refer to the [b]when do you ovulate on clomid[/b] deviate for hyperactivity actaeoides before vacation of undercooked agencies with methyldopa and hydrochlorothiazide.

  13. buy ofloxacin online ¤Î¥³¥á¥ó¥È

    Two placeans plotted the intralesional [b]taking cafergot and naproxen sodium[/b] of quart sleeping yellowable dietician in 23 auntys with ards.

  14. buy acetazolamide ¤Î¥³¥á¥ó¥È

    Organisms are monoacetylated macaque if the mic is larger than 4.

  15. buy biaxin no prescriptions ¤Î¥³¥á¥ó¥È

    In citalopram canadian pharmacies canada celexa price models, m1 is up to 6 cereals thinner suspicious than differce in suggesting esterification and 200 orders higher hyperbaric in µ-opioid binding.

  16. buy rhinolast without prescription ¤Î¥³¥á¥ó¥È

    Este plavix legal claims causes strokes podría myasthenia emergencey lágrimas, sudor, saliva, orina, feces, y thumbs de craving un de longer rojo-naranja.

¥³¥á¥ó¥È¤ò¤É¤¦¤¾¡£

»ÈÍѤǤ­¤ë XHTML ¥¿¥° : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>