[Clipart] Re: cchost: Bug in the registration page
Bryce Harrington
bryce at bryceharrington.org
Fri Feb 17 00:17:31 PST 2006
On Fri, Feb 17, 2006 at 08:57:17AM +0100, Josef Vybiral wrote:
> Hello,
> I've tried to register an account on the new ocal cchost site to test it
> from the inside, but it has become a bit impossible to register because of
> missing images in the security code on the Register page. If I count well,
> it is supposed to be 16 letters/numbers in this code, but only a few of
Hmm, that should have been 6 letters. Or maybe 5. I don't know if that
change will fix this issue, but I've attached a patch for this below.
(I also dropped D - looks like O in this font.) rejon, can you try this
out when you get a chance?
> I had similar issues with my previous web hosting service 2 years ago.
> The problem was in the server, it was not able to send small files to the
> browser. Another reason of this behavior could be the code used to
> generate images for the code(if they are generated), or a bug in font? But
> I'm just guessing, I've not seen the php code yet.
Yeah, the amount of code I modified is pretty minor and doesn't seem
like it'd cause this problem, so my guess is that the problem would lay
at a different level. You could be right.
> At the end, is there a chance to download the code to check it? At least
> the registration script. I could perhaps put my eye on it tonight(GMT+1
> night ;) )
http://cvs.sourceforge.net/viewcvs.py/cctools/cchost1/cclib/cc-login.php?rev=1.21&view=auto
Index: cc-login.php
===================================================================
RCS file: /cvsroot/cctools/cchost1/cclib/cc-login.php,v
retrieving revision 1.21
diff -u -u -r1.21 cc-login.php
--- cc-login.php 14 Feb 2006 07:33:20 -0000 1.21
+++ cc-login.php 17 Feb 2006 08:04:09 -0000
@@ -98,13 +98,13 @@
*/
function GenKey()
{
- $length = 16;
- $key_chars ='abcdefhijkmnpqrstuvwxyACDEFGHJKLMNPQRSTUVWXY34567';
+ $length = 6;
+ $key_chars ='abcdefhijkmnpqrstuvwxyACEFGHJKLMNPQRSTUVWXY34567';
$rand_max = strlen($key_chars) - 1;
for ($i = 0; $i < $length; $i++)
{
- $rand_pos = rand(0, $rand_max);
+ $rand_pos = rand(0, $rand_max);
$rand_key[] = $key_chars{$rand_pos};
}
More information about the clipart
mailing list