charford/CINS548-Alpha — comment on commit 6677cb6c221ee489fbed882fa4005704534c769e
File:  line 0
By charford:

The flaw is that you are storing the value of user in a hidden value. I fixed it.

Casey

On Oct 7, 2011, at 7:34 PM, serenabhayani wrote:

> hey casey can pls not display the username in the view post cause i found a
> flaw in the resetpw i can reset the password of any one even thoug m not a
> registered user getting the username from the view post
>
> On Tue, Oct 4, 2011 at 1:27 PM, charford <
> reply@reply.github.com>wrote:
>
>> Begin forwarded message:
>>
>>> From: Heinz Grimm
>>> Date: October 4, 2011 12:40:42 PM PDT
>>> To: Casey Harford
>>> Subject: regular expressions
>>>
>>
>>> The additional code starts from the 'elseif' statement:
>>>
>>> if($password!=$confirm_password) {
>>> echo "

passwords don't match

";
>>> $errors=1;
>>> }
>>> elseif
>> (!preg_match("/^(?=^.{7,}$)((?=.*[A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z]))^.*$/",
>> $password)) {
>>> echo "

password must be at least 7 chars long with one
>> lower-case, one upper-case char, and one digit

";
>>> $errors=1;
>>> }
>>>
>>> if($email=='') {
>>> echo "

email can't be blank

";
>>> $errors=1;
>>> }
>>> elseif (!preg_match("/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}/i", $email))
>> {
>>> echo "

email address format is invalid: x@y.z

";
>>> $errors=1;
>>> }
>>
>> --
>> Reply to this email directly or view it on GitHub:
>>
>> https://github.com/charford/CINS548-Alpha/commit/6677cb6c221ee489fbed882fa4005704534c769e#commitcomment-630271
>>
>
> --
> Reply to this email directly or view it on GitHub:
> https://github.com/charford/CINS548-Alpha/commit/6677cb6c221ee489fbed882fa4005704534c769e#commitcomment-638618