« Open Sesami - Freddie Hubbard | ホーム | Pandaがついに… »

MT-SCodeã??ã?©ã?°ã?¤ã??ã?§ã??ã??ã??å¯?ç??

MT-DSBLã??å°?å??ã??ã?¦ã??ã??MT-Blacklistã??å°?å??ã??ã?¦ã??ã??ã??ã?£ã?±ã??å°?ã?ªã??æ??ã?§ã??æ?°é??ã?®ã??ã??ã??ã??ã??ã??ã??ã?©ã??ã??æ??æ?¬ç??ã?ªå¯?ç??ã?¯ã?ªã??ã??ã?®ã??ã??ã??ã??ã??ã?¨æ??æ¡?ã??ã?¦ã??ã??ã?¨ã??ã??ã?§è¦?ã?¤ã??ã?¦ã??ã??ã?®ã??ã??MT-SCodeã??ã?©ã?°ã?¤ã??ã??

ã??ã?®ã??ã?©ã?°ã?¤ã??ã?¯ã??CAPTCHAã?¨ã??ã??èª?è¨?æ??æ??ã??å?©ç?¨ã??ã??ã??ã?®ã?§ã??ã??ã??ã??ã?®ã??ã??ã?¸ã?®ã??ã?¡ã??ã??è¨?å??æ¬?ã??è¦?ã?¦ã??ã??ã??ã?°ã??ã??ã??ã?®ã??ã??ã??ç??å??å??ã??ã??ã?¦è¡¨ç¤ºã??ã??ã??æ?°å??ã??èª?ã?¿å??ã?£ã?¦ã?¿ã?¤ã??ã?¤ã??ã??ã??ã??ã?¨ã?§ã??èª?è¨?ã??ä?¿ã??ã??ã?¨ã??ã??ã??ã?®ã??ã?¤ã??ã??ã??人é??ã?®ç?®ã??ã?¯èª?ã?¿å??ã??ã??ã??ã??ã??ã??ã??ã??ã?¯èª?ã?¿å??ã??ã?ªã??ã?¨ã??ã?£ã??ä??æ??ã??ã?§ã??ã??ã??

ã??ã?®å°?å??ã??ã?¯ã??å°?ã??æ??é??å??ã?£ã??ã?®ã?§ã??解決æ??æ??ã??å??ã??ã??ã?¦å??å¿?é??ã??è¨?å??ã??ã??ã??

1. SCode.pmã??ä¿®æ?£ã??ã??ã??
SCode.pmã??ã?¨ã??ã?£ã?¿ã?§é??ã??ã??ä¿®æ?£ã??ã??ã??ã??tmpã??ã?£ã?¬ã?¯ã??ã?ªã??æ??å®?ã??ã??ã?®å?´å??ã??ã??....../tmp/ã??ã?¨ã??ã??風ã??ã??æ??å??ã??/ã??å¿?ã??ã?¤ã??ã??ã??Codeã?®é??ã??ã??å??ã??ã??è¨?å®?ã?§ã??ã??ã??Defaultã?§ã?¯6æ¡?ã??ã?ªã?£ã?¦ã??ã??ã??tmpã??ã?£ã?¬ã?¯ã??ã?ªã??ä??ã??ã??ã??ã??ã??ã?¯Codeã??è?¯ã??ã??ã?®ã??ã??ã??ã??ã??ã?¯public_htmlã??ã??ä¸?層ã??ä??ã??ã??ã??ã??ã??ã??ã?°Webä¸?ã?§è¦?ã??ã?ªã??ã?ªã??ã??ã??ã?£ã?¬ã?¯ã??ã?ªã?®å±?æ?§ã?¯755ã??ã??

2. SCode.pmã??ã?¢ã??ã??ã??ã??ã??

{MTDIR}/lib/MTã?®ä¸?ã??ã?¢ã??ã??ã??ã??ã??ã??ã??

3. mt-scode.cgiã??ã?¢ã??ã??ã??ã??ã??

{MTDIR}/ã??mt-scode.cgiã??ã?¢ã??ã??ã??ã??ã??ã??å±?æ?§ã?¯755ã??å¤?æ?´ã??ã??ã??

4. scode.plã??ã?¢ã??ã??ã??ã??ã??

{MTDIR}/pluginã?®ä¸?ã??scode.plã??ã?¢ã??ã??ã??ã??ã??

5. Comments.pmã??ã??ã??ã??

{MTDIR}/lib/MT/Appã?®ä¸?ã??ã??ã??Comments.pmã??ä¿®æ?£ã??ã??ã??次ã?®é?¨å??ã??è¦?ã?¤ã??ã??ã??
if (!$q->param('text')) {
return $app->handle_error($app->translate("Comment text is required."));
}

ã??ã?®æ¬¡ã??ã??次ã?®æ??ç??ã??ã??ã??ã??ã??ã??ã??

# SecurityCode hack start
#
require MT::SCode;
my $code = $q->param('code');
my $scode = $q->param('scode');
my $sscode = MT::SCode::scode_get($code);
if ($scode ne $sscode) {
return $app->handle_error($app->translate(
"Wrong or missing Security Code."));
}
MT::SCode::scode_delete($code);
MT::SCode::scode_create($code);
#
# Security hack ends

6. Templateã??ã??ã??ã??

Individual Entry Templateã??Comment Listing Templateã??Comment Preview Templateã??Comment Error Templateã??ã??ã??ã??ã??

ã??ã?®ä¸?ã?§ã??<input type="submit"ã??ã?§å§?ã??ã??é?¨å??ã??è¦?ã?¤ã??ã?¦ã??ã??ã?®å??ã?®è¡?ã??次ã?®å??å®?ã??æ?¿å??ã??ã??ã??

<!-- Security Code Check -->
<input type="hidden" id="code" name="code" value="<$MTSecurityCode$>" />
<img border="0" src="<$MTCGIPath$><$MTSecurityImage$>?code=<$MTSecurityCode$>"><br />
<input tabindex=3 id="scode" name="scode" /><br /><br />
<!-- end of Security Code Check -->

ï??MT3.14ã?§ã?¯ã??Individual Entry Templateä??å¤?ã?¯ã??<input type="submit"ã??ã?®è¡?ã??ã?ªã??ã?£ã??ã?®ã?§ã??ã??ã??ã?ªã??ã?£ã??ã??ï??

7. MT3.xä??ä¸?ã?®äººã?¯æ¬¡ã?®ä??æ??ã??è¡?ã??ï??俺ã?®ã?¯MT3.14ï??

ã??lib/MT/Template/Context.pmã??ã?¨ã??ã??ã??ã?¡ã?¤ã??ã??ã??ã?¦ã??ã??ã??ã??ã??ã?¦ã??ã?¦ã?¨ã??ã?£ã?¿ã?§é??ã??ã??ã??ã??ã??次ã?®å?´æ??ã??æ?¢ã??ã??

sub _hdlr_comment_fields {
my ($ctx, $args, $cond) = @_;

ã??ã?®é?¨å??ã?®ä¸?ã??ã??ä??ä¸?ã??æ?¿å??
# Security code validation
require MT::SCode; # <-- new addition
srand int (time/10)+$$;
my $securitycode = int rand(MT::SCode::scode_tmp());
$securitycode++;
MT::SCode::scode_create($securitycode);
# End Security code hack

æ?´ã??ä¸?ã??ã??ã?¯ã??ã??ã??ã??ã?¦ã??ã?£ã?¦ã??次ã?®é?¨å??ã??æ?¢ã??ã??

<MT_TRANS phrase="Remember me?">
<input type="radio" id="remember" name="bakecookie" />....

ã??ã?®é?¨å??ã?®ä¸?ã??次ã??æ?¿å??
<!-- Security Code Check -->
<input type="hidden" id="code" name="code" value="$securitycode" />
<label for="scode">Security Code:</label><br />
<img border="0" alt="Please enter the security code you see here" src="$path/mt-scode.cgi?code=$securitycode" /><br />
<input tabindex="3" id="scode" name="scode" /><br /><br />
<!-- end of Security Code Check -->

æ?´ã??ä¸?ã??ã??ã?¯ã??ã??ã??ã??ã?¦ã??ä??ã??ã??ã??ã?ªæ¬¡ã?®é?¨å??ã??æ?¢ã??ã??

<MT_TRANS phrase="Remember me?">
<input type="radio" id="remember" name="bakecookie" />....

ã??ã?®é?¨å??ã?®ä¸?ã??次ã??æ?¿å??ã??

<!-- Security Code<!-- Security Code Check -->
<input type="hidden" id="code" name="code" value="$securitycode" />
<label for="scode">Security Code:</label><br />
<img border="0" alt="Please enter the security code you see here" src="$path/mt-scode.cgi?code=$securitycode" /><br />
<input tabindex="3" id="scode" name="scode" /><br /><br />
<!-- end of Security Code Check -->

ã??ã??ã?§ä??æ??ã?¯ç??äº?ã??å??ã?¯ã??ã?¡ã??ã??ä??æ??ç??é?¢ã??è¦?ã?¦ã??ç??å??å??ã??ã??ã??æ?°å??ã??表示ã??ã??ã?¦ã??ã??ã?¯ã??â?¦ã?§ã??ã?£ã??ã??

ã?¨ã??ã??ã??ç??å??ã??å?¨ã??表示ã??ã??ã?ªã??ã?§ã?¯ã?ªã??ã??ï??

ã??ã?®å??ã??æ?°æ??é??æ?©ã??ã??ã?¨ã??ã?ªã??ã??MT-SCodeã??ã?©ã?°ã?¤ã??ã?¯ã??ã??ã??ã??ã??ã??ä?¿ã?£ã?¦ã??ã??人ã??ã??ã?ªã??ã?®ã??ã??ã??ã??ã??ä¸?ã??æ¤?ç´¢ã??ã?¦ã??æ??ç?¯ã??æ??å?±ã??ä??ã??ã??ã?®ã?§ã??ã??ã??

試è¡?é?¯èª¤ã??ç?°ã??è¿?ã??ã?ªã??ã??ã??ã??ã??ã??ã??ã??ã??ã?¦ã??ã??æ??ã??cgiã?®ã??ã??ã??ã?°ã??ã??ã?¦ã?¿ã??ã??ã?¨ã??ã??ã??ã??mt-scode.cgiã?®æ?¡å??å??ã??cgidã??å¤?æ?´ã??ã?¦ã??ã??ã?©ã?¦ã?¶ä¸?ã?§å®?è¡?ã??ã?¦ã?¿ã??ã??ã??ã?®ã??ã??ã?ªã?¨ã?©ã??ã??å?ºã??ã??

Unquoted string "code" may clash with future reserved word at /virtual/krbys/public_html/cgi-bin/mt/mt-scode.cgid line 55.

ã?©ã??ã??ã??ã??mt-scode.cgiã?®55è¡?ç?®ã??å??é¡?ã??ã??ã??ã??ã??ã?ªã?®ã?§ã??ã??ã??55è¡?ç?®ã??è¦?ã?¦ã?¿ã??ã?¨ã??次ã?®ã??ã??ã??ã?ªã?£ã?¦ã??ã??ã??

$cookie = $cgi->cookie(-name=>code,-value=>$code);

ã??ã??ã??ã??ç?ºã??ã?¦ã??ã?¦ã??ä??ã??ã??ã??ã??ã??ã??cgiã?®ç??è??ã?¯ç??ç?¡ã??ç??ã??ã??俺ã?§ã??ã??ã??ã??ã??ã??ã??ã??ã??ã??ã?§ã??ã??ã??ã??ã??å??ã?®è©±ã?¯æ?¨æ¸¬ã?§ã??ã??ã??ã?©ã??ã??ã??ã??ã??-name=>codeã??ã?¨ã??ã??ã?®ã??ã?ªã??ã??ã?¨ã?ªã??æ?ªã??ã??æ°?ã??ã??ã??ã??ã??ã?®é?£ã?¯ã??-value=>$codeã??ã?¨ã??ã??ã??ã??ã??$ã??ã?¤ã??ã?¦ã??ã??ã??ã??ã??ã??ã??ã??ã??ã??-name=>$codeã??ã?¨å¤?æ?´ã??ã?¦ã??ã?£ã?¦ã?¿ã??ã??ã??ã?¨ã??ã??ã?£ã?¦ã?¿ã??ã??

ã??ã??ã?¨â?¦ã??

å??ã??ã??ï??ï??ã??ã?¡ã??ã??æ¬?ã??ã??ã?©ã??ã??ã??ã?ªæ?°å?¤ã??表示ã??ã??ã?¦ã??ã??ã?§ã?¯ã?ªã??ã??ï??

ã?¨ã??ã??ã??ã??ã?§ã??ä??ã?¨ã??ä¸?ä?¶è??ç??ã??ã??ã??ã??ã??ä??ã?®äººã?¯ä??ã??ã??ã?®ã??ã?¨ã??æ?¸ã??ã?¦ã??ã?ªã??ã?®ã??ã??ä¸?æ??ã??ã??ã?£ã?¦ã??ã??ã?®ã??ã??ã??ã??ï??ã??ã??ã?¨ã??ã??俺ã??ã??ã?¦ã??ã??ã??ã??ã??ã??ã?¨ã??ã??ã??ã?¡ã?¤ã??ã??å£?ã??ã??ã?®ã??ï??

ã??ã??ã?§ã??ã??ã?¡ã??ã??ã??ã??ã??æ¿?æ¸?ã?¨ç?¸æ??ã??ã?°è¨?ã??ã??ã?¨ã?¯ã?ªã??ã??

トラックバック(3)

トラックバックURL: http://keitaro.krbys.net/mt5/mt-tb.cgi/244

ã??ã??ã??å¯?ç??ã??å??å??(MTHash)ã??æ?¸ã??ã?¦ã??ã??3ã?¶æ??ç??é??ã??ã??ã??ã??ã?¯ã??ã??ã??ã??ã?§ã??ã?? ä??æ??ã?¯ã??ã?®MTHashã?¨ä??ã??ã??ã??ã?ªã??ã?©ã?°ã?¤ã?? MT-SCode ã??ç?ºè¦?ã??ã??ã?®ã?§ã?¡ã?¢ã??ã??ã??ã?? â??ã??krbys.net :: MT-SCodeã??ã?©ã?°ã?¤ã??ã?§ã??... 続きを読む

ã?¨ã??ã??ã??ã??ã??ã??ã?¨ã??ã??ã?®ã?§ã??ä??度ã?¯ç??é??è??ä??å¤?ã??ã??ã?®ã??ã?¡ã??ã??ã??å®?å?¨ã??å??ã??ä??ã??ã??ã??ã??ã??... 続きを読む

Bassoonery Photo Blog - MT-3.17ja (2005年6月11日 13:36)

ºòÆü¡¢MT-3.151ja¤?¤é3.17ja¤Ë?¢?Ã?×?°?ì¡??ɤ?¤Þ¤?¤¿¡£ ÆäËÌäÂê¤â... 続きを読む

コメント(3)

#ä??ã??ã?¶ã??ã?§ã??ã??

Blogã?§ã?¯ã??ã??ã??è¦?ã?ªã??ã??ã??æ??ã?§ã??ã??ã??ç?¡æ??ã??ã??ã??ã??ã??ã?¤ã??ã?¸ç??é??ã??ã??ã?®ã??ç?¨ã??ã??ã??ã??æ??æ??ã?§ã??ã??ã??ã??

ã??ã?¡ã??ã??ã??hashã??ä??è??ã??ã?§ã??ã??ã??ã??æ??ã??ä??ã?¦ã??ã?¨ã??ã??ã??ã??ã??ã??ã??ã??ã??ã??

http://www.zakimi.com/archives/2004/11/05/235403.php

ã??ã??ã??å®?ã??é?¢ç??ã??å¯?ç??ã?®ç´?ä??ã?§ã??ã??ã??å??å??ã??ã?ªã??ã??ã??ã??

ã??ã?¡ã??ã??ã??ã??ã??ã?¨ã??ã??ã??ã??ã??ã??ã??

Zakimi::Blogã??ã??ã?®æ??æ??ã?®æ??ã??ç°¡å??ã??ã??ã??ã??ã??ã??ã??ã??ã??

ä¸?æ??ç??é??ã??ã??ã??ã??ã??ã??ä¸?é??ã??ã??ã??ã??ã??ã?¡ã??ã??ã??æ??ã?¦ã??ã??ã??ã??ã??Blacklistã?ªã?©ã??ã??ã??ã??ã?®æ??æ??ã??ä??ã?®ã?¨ã??ã??ä¸?ç?ªã??ã??ã?®ã??ã?ªã??ã?¨æ??ã?£ã?¦ã??ã??次第ã??zRyuã??ã??ã?®ã??ã?¡ã??ã??ã??æ??ã??ã?¨ã??ã?¯ã??ã??ã??ã?¨ã??ã??ã??ã??ã??ï??ç¬?ï??ã??

ã?¯ã??ã??ã??ã??ã?¦ã??
ã??ã?¡ã??ã??ã??ã??ã??ã??æ??ã?¦ã??ã??ã?£ã?¦ã??ã?©ã?°ã??æ±?ã??ã??ã??ã??ã?£ã?¦ã??ã?¦ã??ã?©ã??ç??ã??ã??ã??ã??ã??
表示ã??ã??ã??ã??è¡?ã?£ã??ã?®ã?§ã??ã??ã??æ??å??ã??ã??ã?¨ã??
ã?¨ã?©ã??ï??Template/Context.pm line 1534ï??ã??å?ºã?¦ã??ã??ã??ã?®ã?§ã??ã??
ã??ã??ã??ã??
æ??å??ã?¯ã??ã?£ã??ã?¨ã??ã??ã??ã??ã?§ã??ã??ã??ã??ã??ã??ã??

コメントする

このブログ記事について

このページは、keitaroが2005年1月23日 16:19に書いたブログ記事です。

ひとつ前のブログ記事は「Open Sesami - Freddie Hubbard」です。

次のブログ記事は「Pandaがついに…」です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。