The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
md5 password + salt
Alright, I have a website with a user system, all the user passwords are stored in a mysql database and md5 encrypted. I am attempting to re-encrypt all those passwords with a salt so the same password will be used on my website, as the forum. I have come up with this..
http://www.teenagezone.org I'm using functions straight from vBulletin to do it, and when I get it working right, changing it so it will loop through all the users in my database and update their password to work with a salt. Now.. it dosn't seem to be working right. The script works, but when I update that in the database for vbulletin, and try logging in, it will not work. Here is the scripts.. index.php PHP Code:
PHP Code:
|
#2
|
||||
|
||||
pwfunction.php, function 'hash_password'.
PHP Code:
PHP Code:
|
#3
|
|||
|
|||
Wow, thanks! I would have never thought to do that and would be sitting there for days attempting to make it work.
Sorry for double posting, but I have something to add to this post. I currently have the script grabbing users from my website testing database, and it works! But.. it only does some, then errors. The reason being is to much work for the server doing this in a while loop for 4000 members (re encrypting plus producing a slat). Does anyone know how to limit how many it will do in a second/minute, or offer a idea for a different solution for doing this which will work? Thanks. |
#4
|
|||
|
|||
Quote:
|
#5
|
||||
|
||||
Add a variable. Increase it every time a user goes by.
|
#6
|
|||
|
|||
How so?
|
#7
|
|||
|
|||
What kind of errors do you get?
|
#8
|
|||
|
|||
It just says you have a error with your sql syntax, but I think its because a) it is loading all random characters, right? So it is interfering with the sql update query and/or b) it is trying to load all 4000 at the same time, causing it to stop.
It only does about 10-20 then errors.... the highest its ever gotten was to 75, but then I have to drop the table and upload the backup to try again. The only thing I can think of doing is adding check boxes to the script with the usernames, check off 10, click submit, and it will update those one, then in the while loop it will only grab rows where there is noting in the salt field. But that would take a long time... |
#9
|
|||
|
|||
What exactly is the error with your SQL syntax?
|
#10
|
|||
|
|||
It varies with each run. For example:
First run: Quote:
Quote:
Quote:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|