|
Walter Cedric's Security Images 4.3 for Joomla 1.0 on Jdownloads. |
|
|
|
Friday, 11 February 2011 |
|
Some of you who have been using the download section of the site may have
noticed some changes on the category and main download pages. The changes
have come about due to the sheer number of downloads that are daily using up
my bandwidth. Some of the downloads could be caused by bots/spiders that
regularly crawl my site and it would be nice to find a way of preventing
these from adding to the download bandwidth.
So, it has meant that I have had to consider implementing a captcha to prevent
these bots using bandwidth but allowing humans to easily download. The changes on
the category page have meant that you can't download directly from the category
list any more. You now need to click through to the actual download page where
you can download as before.
On the download page there is a 'captcha' which you will need to enter to activate
the download button. I have to admit that although it appears in the right place it
doesn't actually work yet. You can enter anything you like and it still lets you in.
So, that brings me to the problem I am encountering.
I am having some problems implementing Walter Cedric's Security Images
4.3 for Joomla 1.0 on Jdownloads. First of all security images is
working perfectly for both the standard Joomla contact form and for
registration.
However, I am trying to modify Jdownloads to use security images, to
prevent bots from performing downloads and stealing bandwidth, so far
the change has been partially successful. I have managed to make the
captcha appear on the download page. However, it always refuses a
captcha check by saying "Login has been refused by anti spamming system
(securityimages)". It does this consistently.
To keep the changes easy to understand I simply worked from the Security
images patches folder, copying the two existing php files that implement
the captcha for the contact form and renaming them to:
joomla.jdownloads.checker.php
joomla.jdownloads.html.php
I then changed the unique package name in both to $packageName =
'security_joomlaJdownloadspage';
I have inserted the relevant calls to both files in the correct place
exactly as shown in the original contact form:
In jdownloads.html.php -
if
(file_exists($mosConfig_absolute_path.'/administrator/components/com_securityimages/patches/joomla.jdownloads.html.php'))
{
require_once
($mosConfig_absolute_path.'/administrator/components/com_securityimages/patches/joomla.jdownloads.html.php');
}
In jdownloads.php -
if
(file_exists($mosConfig_absolute_path.'/administrator/components/com_securityimages/patches/joomla.jdownloads.checker.php'))
{
require_once
($mosConfig_absolute_path.'/administrator/components/com_securityimages/patches/joomla.jdownloads.checker.php');
}
Both these changes are partially successful in that they cause the
captcha to appear and the check to take place at the correct time just
prior to download. However, the verification still does not work. I have
even swapped the code to call the fully working contact versions
(joomla.contact.checker.php
and joomla.contact.html.php) and it still fails.
This points to a problem outside security images bearing in mind it is
working perfectly for both the contact form and for registration. It
just does not quite work for Jdownloads, almost but not quite.
Perhaps JDownloads is making changes to the session variables that is
disturbing Security Images from verifying the captcha input?
Anyhow, I am stumped and have spent a long time trying to get this to work.
It is a security images 4.3.3 installation on a Joomla 1.0.15 site. If I
manage to fix it then I will post the resulting fix here.
Below is an image of the captcha in place and working.
|
|
Last Updated ( Monday, 12 September 2011 )
|