Navigation


RSS / Atom



Fixed SCode install for 3.12

2004-12-03 , ,

The instructions for installing [James Seng’s CAPTCHA module](http://james.seng.cc/archives/000145.html) for MovableType 3.x were incomplete. You need to also edit the `/lib/MT/App/Comments.pm` module
to perform the security check itself. This is the same trivial code insert as
in pre-3.x releases: sub post { … require MT::Blog; my $blog = MT::Blog->load($entry->blog_id);

if (!$q->param(‘text’)) { return $app->handle_error($app->translate(“Comment text is required.”)); } # # Security Code hack # 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); # # End Security Code hack # my ($comment, $commenter) = _make_comment($app, $entry); if (!$blog->allow_unreg_comments) { …

Save it and that’s all there is to it.

Comment


Commenting is closed for this article.