ããã¯ä½ï¼ ãªã¯ã¨ã¹ããã©ã¡ã¼ã¿ã»ã»ãã·ã§ã³ã«é¢ããã¾ã¨ã ã¨ã£ã¦ãç°¡åãªCSRF対ç PHPã«ããç°¡åãªãã°ã¤ã³èªè¨¼ãããã ã»ãã¥ã¢ãªæ²ç¤ºæ¿ãæå°æ§æããä½ã ããããã»ãã·ã§ã³ã絡ãè¨äºãæ¸ãã¦ãã¾ãããï¼ãã®è¨äºã§ç´¹ä»ãããã®ã以ä¸ã®ãã¹ã¦ãè¡ããå®æå½¢ã§ãï¼ ä¸æ£ãªã»ãã·ã§ã³IDã¯ç¡è¦ãã¦session_startã«ããã¨ã©ã¼çºçãé²ã ã»ãã·ã§ã³ã®å¤±å¹ã¾ã§ã®æé延é·ãè¡ã (ä»»æ) ã»ãã·ã§ã³ã®å¤±å¹ããçãã¹ãã³ã§ã»ãã·ã§ã³IDã®åçæãè¡ã (ä»»æ) CSRFãã¼ã¯ã³ã®æ¤è¨¼ãè¡ã (ããããæ´ã«æ¹åããã¨ããã°ãªãã¸ã§ã¯ãæåã§æ¸ããããã§ããï¼ã·ã³ãã«ã«ãããã£ãã®ã§æ¢ãã¦é¿ãã¾ãã) é¢æ°å®ç¾© <?php // CSRFãã¼ã¯ã³çæã«ä½¿ãããã·ã¥ã¢ã«ã´ãªãºã const CSRF_TOKEN_HASHALGO = 'sha256'; // ã»ãã·ã§ã³IDã®æ´æ°æå»ã«ä½¿ã
{{#tags}}- {{label}}
{{/tags}}