Author |
Message |
catweazle
Regular


Joined: Oct 14, 2006
Posts: 60
Location: Norway
|
Posted:
Sun Jan 20, 2008 11:41 pm |
|
Hi All!
I have RavenNuke (v2.10.01) istalled at two of my sites.
Every now and then (quite often actually!) the security code image show only 4 characters (not 5 as it's supposed to). This produces an invalid login which is rather annoying to most users...
Any solution to avoid this happening?
Thanks alot for your time as well as a very great CMS and forum!! |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Mon Jan 21, 2008 12:00 am |
|
catweazle, I have seen that happen occasionally also. This is the first time, to my knowledge, that anyone else has said anything. I will open a ticket on it and we will see if we can figure out why it happens. I'm pretty sure it has to do with the width of the image not calculating correctly but we will look into it. Thanks. |
|
|
|
 |
catweazle

|
Posted:
Mon Jan 21, 2008 3:38 am |
|
Hi Raven.
Thanks alot for your time and fast replay.
Even though I have set my block-width to 200px the bug still remains.
I also thought it would have to do with the width of the image, and when you tell the very same I'm darn sure it is!!
Just thought I should let you know so you might be able to "kill this bug" before the release of v2.20.00
Thanks alot to the whole team - Great work!! |
|
|
|
 |
Susann
Moderator

Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support
|
Posted:
Mon Jan 21, 2008 5:11 am |
|
I noticed this behavior only a few times after I updated my standard nuke to RavenNuke
and didnĀ“t saw this behavior again.
The reason I had issues with this could be I had old files on the server. However only 4 characters is very seldom and it looks like that none of my users, 14000 currently, had any issues with the captcha otherwise I would know it. |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Mon Jan 21, 2008 5:48 am |
|
By chance is your site running on a windows platform? That is the only time that I have noticed a persistent problem. On linux, I've seen it only a few times out of 1000s. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
catweazle

|
Posted:
Mon Jan 21, 2008 5:57 am |
|
Hi.
Both my RavenNuke sites are new and clean installations (each on different server - none of them running on a windows platform).
I have this issue 1 time out of 15-25 times... |
|
|
|
 |
montego

|
Posted:
Mon Jan 21, 2008 6:09 am |
|
Ok. Good to know. Are these very active servers by chance? |
|
|
|
 |
catweazle

|
Posted:
Mon Jan 21, 2008 6:26 am |
|
I have never had any problems related to speed on these servers (both sites are generated in 0,17 - 0,21 seconds), so I find it hard to believe that this is caused on the server side... |
|
|
|
 |
Raven

|
Posted:
Mon Jan 21, 2008 10:49 am |
|
When I say a width problem it's not (unfortunately) a simple block width. It's part of the internal algorithm for creating the captcha and calculating the width needed as compared to the width of the pieces. In other words it's a problem with the captcha creation itself. |
|
|
|
 |
catweazle

|
Posted:
Mon Jan 21, 2008 11:58 am |
|
Raven wrote: | In other words it's a problem with the captcha creation itself. |
Believe it or not; I did in fact understand that much...
I just made 35 reloads on one of my pages, and got two faulty captcha images:
This image shows what usually happens:
This one is in fact a first-timer:
Looks like there should be plenty of room for the missing characters.
Could it be that the captcha rutine don't calculate the right amount of characters at all times? |
|
|
|
 |
Raven

|
Posted:
Mon Jan 21, 2008 12:13 pm |
|
Quote: | Could it be that the captcha rutine don't calculate the right amount of characters at all times? |
I think what you will find is that the missing characters are there but they are out of sight to the right of the border. That is the problem. As to why, I don't yet know. Otherwise you could match on just the visible characters. |
|
|
|
 |
catweazle

|
Posted:
Mon Jan 21, 2008 4:34 pm |
|
It might be I have very bad eyes (or a great imagination) but still...
I have compared lots of good captcha images with faulty ones, and to me it looks like the characters in fact are in place... but they are white (they have the background color)... In all the faulty images the colored lines are broken where the character(s) are supposed to be. You won't find broken colored lines in a good captcha image...
Take a look at the two images I posted earlier (above) and you'll see what I mean... |
|
|
|
 |
Gremmie
Former Moderator in Good Standing

Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA
|
Posted:
Mon Jan 21, 2008 5:04 pm |
|
I had a problem sort of like this once. It turns out that several of my font files had been uploaded with 0 file size. Check your includes/fonts directory for 12 font files and make sure they have non-zero length. |
_________________ Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module |
|
|
 |
Guardian2003
Site Admin

Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Tue Jan 22, 2008 2:56 am |
|
Open includes/class.php-captcha
find at around line 53;Code:
define('CAPTCHA_WIDTH', 250);
|
You might want to make that a little smaller depending on your theme, maybe something like;
Code:define('CAPTCHA_WIDTH', 175);
|
See how you go with that. |
|
|
|
 |
catweazle

|
Posted:
Tue Jan 22, 2008 4:05 am |
|
Thanks alot for your ideas and suggestions.
I checked the included fonts and they are all uploaded ok.
I decreased the "captcha_width" toCode:define('CAPTCHA_WIDTH', 175);
|
as suggested but it didn't help.
Then I decreased the "captcha_max_font_size" (I set it equal to the "captcha_min_font_size")Code: define('CAPTCHA_MAX_FONT_SIZE', 16);
|
and that really seem to fix it.
I have made an umpteen number of reloads on the site... and no more faulty captcha images so far...
Thanks alot for your time and effort guys!
Very much appreciated!!
--
Regards,
Catweazle. |
|
|
|
 |
Raven

|
Posted:
Tue Jan 22, 2008 9:01 am |
|
Looks like a future Team member in the making
Thanks Catweazle. I know I had monkeyed around with this awhile back and I never quite resolved it. I remember adjusting the font widths and that seemed to work for a while but didn't fix it permanently. Hopefully you found the magic width setting!
Guardian, should we adjust the default setting in the distro? |
|
|
|
 |
catweazle

|
Posted:
Tue Jan 22, 2008 9:44 am |
|
It sure works great on both my sites, and I'll be happy if this will be helpfull to others as well.
My current settings:Code:define('CAPTCHA_WIDTH', 150);
define('CAPTCHA_MAX_FONT_SIZE', 16);
|
Some times the last character is slightly off to the right, but that's no big deal really...  |
|
|
|
 |
technocrat
Life Cycles Becoming CPU Cycles

Joined: Jul 07, 2005
Posts: 511
|
Posted:
Tue Jan 22, 2008 10:33 am |
|
That's one of the problems is the character spacing will cause the text to go too long. It creates problems from time to time.
How ever in the second image you posted it appears there is an X in white. Perhaps we need to find and adjust the color coding for the text to not use white or which ever color is set for the background. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! / Only registered users can see links on this board! Get registered or login! |
|
|
 |
Guardian2003

|
Posted:
Tue Jan 22, 2008 11:05 am |
|
technocrat - thanks for the input!
catweazle - thanks for trying that and your feedback is appreciated, glad that you're sorted now
Raven - I think we should yes, I'm going to tinker with this a bit on my production site using all the default themes to see if I can determine some optimal settings and I'll then commit them to SVN
I had noticed the odd time I have had a failed log-in as an admin on my site but failed to notice the cause was an invisible digit in the CAPTCHA |
|
|
|
 |
montego

|
Posted:
Thu Jan 24, 2008 10:31 am |
|
I'll have to look more closely next time as well because I have had instances where letters were missing in-between others. Now I am wondering if they were there, but cleverly "hidden" due to its coloring.
Technocrat, is it even feasible the way the code works with the graphics library that a letter truly be missing? Might be worth double-checking. |
|
|
|
 |
|