RegPage 5165

10/01/2010 20:15 peterpiper99#1
I edited this regpage some, I removed the images and stuff, but how can I make it so that the max password limit AINT 8 WORDS/NUMBERS? I want the password limit to be freely chosen.

Here is the code:
Code:
<?php
  define ("MaxNameLength", 32);
  define ("WrongChars", "\r\n"); // Type other Chars, which shouldn't be in the Names, behind \r\n, but before "
  define ("AccountFilesPath", "C:\OldCODB\Users\\");
  define ("AccountFilesEnding", ".usr");
?>
 <?php // New Account?
      If (IsSet($_GET["account"]["password"])) {

        // Variables
        $Account = $_GET["account"];
        $Password = $_GET["password"];
        $AllRight = True;
        
        // Wrong Chars?
        For ($I=0; $I<StrLen(WrongChars); $I++) {
          If (StrPos($Account, SubStr(WrongChars,$I,1))) {
            Echo "<p>Your Name musn't contain the char \"".SubStr(WrongChars,$I,1)."\"</p>";
            $AllRight = False;
          }
        }
        
        // File Exists?
        If (file_exists(AccountFilesPath.$Account.AccountFilesEnding)) {
          Echo "<p>This Account already exists!</p>";
          $AllRight = False;
        }
        
        // All Right?
        If ($AllRight) {
          // File-Data
          
          
          $Text .= "$Password ";
          
          
          // Create File
          File_Put_Contents (AccountFilesPath.$Account.AccountFilesEnding, $Text);
          
          // Check File
          if(!file_exists(AccountFilesPath.$Account.AccountFilesEnding)) {
            echo "<p>Error!</p>";
          }
          
          Echo "<p>This Account is created succesfully!</p>";
        }
      }
    ?>
<div> </FONT></FONT></FONT></FONT></P></DIV>
    <center></FONT>
    <form action="" type=post>
      <label for="name">Account:<div></label> <input type=text id="name" name="account" size=20 maxlength=<?php Echo MaxNameLength; ?> /><br>
    <h1><center></center></h1>
<label for="name">Password:<div></label> <input type=password id="password" name="password" size=20 maxlength=<?php Echo MaxNameLength; ?> /><br>
    <h1><center></center></h1>
<label for="name">Retype password:<div></label> <input type=password id="password" name="password" size=20 maxlength=<?php Echo MaxNameLength; ?> /><br>
      <button type=submit>Register</button></DIV>
10/01/2010 20:36 Arcо#2
From what I see, the max length for the password is 32.
PHP Code:
<label for="name">Password:<div></label> <input type=password id="password" name="password" size=20 maxlength=<?php Echo MaxNameLength?> /><br>
10/01/2010 21:40 _Vodka#3
Quote:
Originally Posted by †he Knight §olari§ View Post
if (Arco.Likes.Cock) Arco.Is.Getting.DoublePenetrated
:facepalm:

@OP
decker, u tried change the max limit lol?
10/02/2010 06:07 peterpiper99#4
Quote:
Originally Posted by copz1337 View Post
hi Decker aka peterpiper
Reported for spam.

@Jacob
There is no MaxLimit.
10/02/2010 07:18 Arcо#5
Quote:
Originally Posted by peterpiper99 View Post
Reported for spam.

@Jacob
There is no MaxLimit.
Yes there is, its currently set at 32.
10/02/2010 07:57 peterpiper99#6
That's MaxNameLength, I was literally searching for MaxLimit.
10/02/2010 08:21 Arcо#7
If you bothered reading my post you;d know what to look for >.>
[Only registered and activated users can see links. Click Here To Register...]
10/02/2010 09:51 pintser#8
type=password id="password" name="password" size=20

:facepalm:

just leave the defenition of maxlenght.
10/02/2010 21:11 peterpiper99#9
I think I have figured out the problem. It sets like a square at the end of my password, and that makes it so I can't login. But when I remove the square, I can login.

Look:
[Only registered and activated users can see links. Click Here To Register...]

How can I fix this?

-Edit-

I just noticed, If I make a password with 8 characters or over, there ain't any squares.
10/02/2010 23:32 _tao4229_#10
Passwords are capped at 16 characters anyways (conquer-wise).

edit: 15 characters* (15 + NULL terminator). Apparently I'm bad at maths.
10/02/2010 23:58 peterpiper99#11
Quote:
Originally Posted by _tao4229_ View Post
Passwords are capped at 16 characters anyways (conquer-wise).

edit: 15 characters* (15 + NULL terminator). Apparently I'm bad at maths.
So what can I change to fix it?