Re: Security Image Mydownloads 1.5 | Titre du sujet : Re: Security Image Mydownloads 1.5 par eparcyl92 sur 19/07/2008 21:26:59
Bonsoir à toutes et tous Pour Mydownloads 1.5
tout est dans le submit.php:
if (!empty($_POST['submit'])) {
[color=CC0000]// Hack SecurityImage by Dugris
include_once(XOOPS_ROOT_PATH . "/class/xoopsformloader.php");
if ( defined('SECURITYIMAGE_INCLUDED') && !SecurityImage::CheckSecurityImage() ) {
redirect_header( '(script removed)history.go(-1)', 2, _SECURITYIMAGE_ERROR ) ;
exit();
}
// Hack SecurityImage by Dugris[/color]
$submitter = !empty($xoopsUser) ? $xoopsUser->getVar('uid') : 0;
Ensuite:
$xoopsTpl->assign('lang_description', _MD_DESCRIPTION);
[color=CC0000]// Hack SecurityImage by Dugris
if (defined('SECURITYIMAGE_INCLUDED')) {
$security_image = new SecurityImage( _SECURITYIMAGE_GETCODE );
if ($security_image->render()) {
$sform->addElement($security_image, true);
}
}
// Hack SecurityImage by Dugris[/color]
$xoopsTpl->assign('lang_submit', _SUBMIT);
et enfin:
$sform->addElement($shot_tray,false);
// Submit button
[color=CC0000]// Hack SecurityImage by Dugris
if (defined('SECURITYIMAGE_INCLUDED')) {
$security_image = new SecurityImage( _SECURITYIMAGE_GETCODE );
if ($security_image->render()) {
$sform->addElement($security_image, true);
}
}
// Hack SecurityImage by Dugris[/color]
$button_tray = new XoopsFormElementTray('' ,'');
Pour bien faire, il faudrait aussi sécuriser la section "Rapport de fichier brisé", surement le fichier brokenfile.php et/ou mydownloads_brokenfile.html
Bon samedi soir
|
|