Password reset

41 views
Skip to first unread message

Joe Schwinger

unread,
Nov 1, 2012, 5:00:10 PM11/1/12
to blo...@googlegroups.com
Long story short we lost the password to the blog...tried to update via the database but nothing is working...Anyone have an tips on how to set a new password and get into the system?

Raymond Camden

unread,
Nov 1, 2012, 5:10:52 PM11/1/12
to blo...@googlegroups.com
When users are stored, they are stored hashed with a salt. You would need to generate a hash in the same way and store that in the db.

A quicker hack would be to edit the authenticate method in blog.cfc:

<cfif 1 OR  (q.recordCount eq 1) AND (q.password is hash(q.salt & arguments.password, instance.hashalgorithm))>
<cfset authenticated = true>
</cfif>

I added "1 OR" to make it always work. Do this, refresh BlogCFC's cache by hitting it with ?reinit=1, log in, update your password, remove the hack, and refresh BlogCFC's cache again.


On Thu, Nov 1, 2012 at 4:00 PM, Joe Schwinger <jas...@gmail.com> wrote:
Long story short we lost the password to the blog...tried to update via the database but nothing is working...Anyone have an tips on how to set a new password and get into the system?



--
===========================================================================
Raymond Camden, Adobe Developer Evangelist

Email : raymon...@gmail.com
Blog : www.raymondcamden.com
Twitter: cfjedimaster

Joe Schwinger

unread,
Nov 1, 2012, 7:16:09 PM11/1/12
to blo...@googlegroups.com
Thanks - Worked....

Farzana Rashid

unread,
Jun 3, 2013, 1:27:41 PM6/3/13
to blo...@googlegroups.com
Hi,

I have the same problem...I tried this fix but its not working....

1- I added the "1 OR" in blog.cfc
2- I refreshed...blognew/admin/index.cfm?reinit=1
3-I went to admin home and tried the uname/pswd...admin/admin...but it stays on same page...

what am I doing wrong?...any help will be greatly appreciated...

Thanks!


On Thursday, November 1, 2012 5:10:53 PM UTC-4, Raymond Camden wrote:

Raymond Camden

unread,
Jun 3, 2013, 2:17:21 PM6/3/13
to blo...@googlegroups.com
No idea. Best I can suggest is to try adding some debugging to the code. See if authenticated was set right, etc.


--
You received this message because you are subscribed to the Google Groups "BlogCFC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blogcfc+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages