Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Comparing user's existing password
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
rahajiyev  
View profile  
 More options May 18 2012, 8:49 am
From: rahajiyev <rahaji...@bankofbaku.com>
Date: Fri, 18 May 2012 05:49:43 -0700 (PDT)
Local: Fri, May 18 2012 8:49 am
Subject: Comparing user's existing password
When user enters his current password for verification it compares
unequal to his real password.

Here's my custom validation rule function:

        public function check_current_password($current_password) {
                $user = $this->find('first', array('id' => $this-

>id));

                debug(AuthComponent::password($current_password));
debug($user[$this->alias]['password']); exit;
                return AuthComponent::password($current_password) ==
$user[$this->alias]['password'];
        }

after I click submit:
/app/Model/Milli.php (line 40)

'6cff21416995c69a93338d57f969665dc2bb2e00'

/app/Model/Milli.php (line 40)

'fc33ed920738abf172f2b56f6afbda65e86525de'

The latter is correct, as stored in the database. What's going on?! I
stored the password using same AuthComponent::password() call.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Gaiser  
View profile   Translate to Translated (View Original)
 More options May 18 2012, 9:32 am
From: Michael Gaiser <mjgai...@gmail.com>
Date: Fri, 18 May 2012 09:32:23 -0400
Local: Fri, May 18 2012 9:32 am
Subject: Re: Comparing user's existing password
Have you changed your security salt setting since you first entered in
original password? If so your passwords hash will not match.

Sent from my iPhone

On 2012-05-18, at 8:49 AM, rahajiyev <rahaji...@bankofbaku.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rihad  
View profile  
 More options May 18 2012, 11:58 am
From: rihad <ri...@mail.ru>
Date: Fri, 18 May 2012 08:58:56 -0700 (PDT)
Local: Fri, May 18 2012 11:58 am
Subject: Re: Comparing user's existing password
No, of course I didn't. Only one thing changed, don't know if it's
related: I entered the users and their hashed passwords in one
controller, then logged in as them and attempted hashing their own
password in the other. This shouldn't matter, unless Cake further
salts the hash using controller's name or something.

On May 18, 6:32 pm, Michael Gaiser <mjgai...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rihad  
View profile  
 More options May 18 2012, 12:04 pm
From: rihad <ri...@mail.ru>
Date: Fri, 18 May 2012 09:04:15 -0700 (PDT)
Local: Fri, May 18 2012 12:04 pm
Subject: Re: Comparing user's existing password
I should note that users are able to log in by entering their user/
pass, thus hashing works. It's just that I'm unable to generate the
same hash using AuthComponent::password('my-cleartext-pass')

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jimit Kapadya  
View profile  
 More options May 19 2012, 4:56 am
From: Jimit Kapadya <ji...@entourage.in>
Date: Sat, 19 May 2012 14:26:21 +0530
Local: Sat, May 19 2012 4:56 am
Subject: Re: Comparing user's existing password

Hello All,

how to delete Multiple tables fields values in cakephp 2.0


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rahajiyev  
View profile  
 More options May 21 2012, 12:38 am
From: rahajiyev <rahaji...@bankofbaku.com>
Date: Sun, 20 May 2012 21:38:33 -0700 (PDT)
Local: Mon, May 21 2012 12:38 am
Subject: Re: Comparing user's existing password

On May 18, 5:49 pm, rahajiyev <rahaji...@bankofbaku.com> wrote:

> Here's my custom validation rule function:

>         public function check_current_password($current_password) {
>                 $user = $this->find('first', array('id' => $this->id));

>                 debug(AuthComponent::password($current_password));
> debug($user[$this->alias]['password']); exit;
>                 return AuthComponent::password($current_password) ==
> $user[$this->alias]['password'];
>         }

I've figured it out. The callback receives data as array, so it should
have been
return AuthComponent::password($current_password['current_password'])
== $user[$this->alias]['password'];

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rahajiyev  
View profile  
 More options May 21 2012, 12:43 am
From: rahajiyev <rahaji...@bankofbaku.com>
Date: Sun, 20 May 2012 21:43:15 -0700 (PDT)
Local: Mon, May 21 2012 12:43 am
Subject: Re: Comparing user's existing password
PHP sucks... a good language would have told me that I'm sending it
array while it's expecting a string. I spent a couple of hours late
Friday to find where I got it wrong, to no avail.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tonu Tusk  
View profile  
 More options May 22 2012, 4:14 am
From: Tonu Tusk <lvot...@googlemail.com>
Date: Tue, 22 May 2012 01:14:11 -0700 (PDT)
Local: Tues, May 22 2012 4:14 am
Subject: Re: Comparing user's existing password
Maybe - PHP has its pros and cons, however people whose understanding
of a language (or will to learn a language or use other peoples
codebases written in that language) amount to picking out a function
name and wanting to throw whatever parameters at it until there are no
errors spat out,  or just happen to work by chance, lead to extremely
incompetent coders who usually, in one way or another, still make it
into the "profession" and give others a bad name.

On May 21, 12:43 am, rahajiyev <rahaji...@bankofbaku.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »