[pmwiki-devel] crypt problem on WAMP

Randy Brown randy at brownragfilms.com
Mon Jun 14 14:00:18 CDT 2010


I don't know if this is helpful, but I wrote a recipe I call Crypt2, based on Crypt. I'd be glad to share it. I haven't uploaded it to the Cookbook because testing it is beyond my current expertise. If someone else knows how to test it and wants to, I could send it along. Here's what it does:

+----------------------------------------------------------------------+
| Creates an encrypted password that matches a regex pattern
| - masks user keystrokes
| - allows customizable prompts and messages (e.g. call the result an "Authorization code")
| - gets confirmation by asking the user to re-enter the password
+----------------------------------------------------------------------+
| Optional parameters:
| $Crypt2InclusionPattern is the regex pattern that a good password must match. 
|   Defaults to length >= 8, with at least 1 upper case letter, 1 lower case letter, and 1 number or special character
| $Crypt2ExclusionPattern is the regex pattern that a good password must not match. 
|   Defaults to anything containing whitespace
| $Crypt2InclusionMessage, $Crypt2ExclusionMessage, and $Crypt2MismatchMessage are the texts shown for user errors
| $Crypt2GoodMessage is the message shown when a good password is entered and confirmed
| $Crypt2Label is the text shown before the encrypted password. Defaults to "Encrypted password: "
| $Crypt2Prompt and $Crypt2Prompt2 are the prompts shown to elicit the password and its confirmation
| $Crypt2IntroMessage and $Crypt2CloseMessage are text that serve as a little header and footer, regardless of what happens
+----------------------------------------------------------------------+
| Note: This recipe is an adaptation of PmWiki's crypt script. It hasn't been well tested. 
+----------------------------------------------------------------------+

On Jun 13, 2010, at 6:10 PM, Petko Yotov wrote:

> 
> I just realize that while the workaround should work in broken PHP 
> installations, once these installations are upgraded and fixed, the saved 
> passwords may stop working. So, we should probably look for a better solution, 
> like simply telling people to have passwords of 4 or more characters.




More information about the pmwiki-devel mailing list