ActiveSupport::SecurityUtils.secure_compareãRack::Util.secure_compareã«ã¤ãã¦ã¡ã¢ã æååãç価ã§ãããã©ãã確èªããã®ã«a == bã¨ãã風ã«æ¸ããã¨ãå¤ãã ããããæ©å¯æ å ±ã®æ¯è¼ã«ãã®å½¢å¼ãç¨ããã¨ãå¦çã«è¦ããæéããã¢ã«ã´ãªãºã ãç¹å®ãããããæ©å¯æ å ±èªä½ãæ¼ããå¯è½æ§ãããï¼æè¬ãTiming Attackï¼ã ä¾ãã°ãã¯ã¼ãã³ãä¸æãã¼ã¯ã³ã®ç¢ºèªãªã©ã§ã¯Timing Attackã«æ°ãã¤ããå¿ è¦ãããã é常ã®æååæ¯è¼ã®å ´åã1byteç®ãã確èªãã¦ãããæååãç°ãªãæç¹ã§Falseãè¿ãå®è£ ãå¤ãã¨æãã 'secret' == 'hoge' # F 'secret' == 'soge' # TF 'secret' == 'sege' # TTF ... 'secret' == 'secret' #
{{#tags}}- {{label}}
{{/tags}}