View Full Version : Salt
SpeedStreet
Mon 3rd Nov '03, 6:07pm
I'm trying to write a registration page for a website project I may get the greenlight on. The registration will tie into vBulletin quite nicely, if I have my way.
Now, I was going through, and in vB2, it was nice and easy to simply throw in an MD5 and be done with it...user registrations could be done from anywhere. NOW...we have SALT.
What exactly is SALT? How do I cal lthe function or writeup a simple function that will provide the vB database an adequate SALT value? Are exterior registrations now a thing of the past thanks to SALT? Exactly how much SALT should I consume to maintain a healthy, balanced diet?
Awaiting many a snide response :)
assassingod
Mon 3rd Nov '03, 6:11pm
Salt adds extra encryption to MD5 so when a users use the same password on different forums, the encrypted password will always be different
SpeedStreet
Mon 3rd Nov '03, 7:14pm
Salt adds extra encryption to MD5 so when a users use the same password on different forums, the encrypted password will always be different
Is there a way to incorporate this procedure into an external INSERT?
merk
Mon 3rd Nov '03, 10:38pm
Have you tried looking through includes/functions_register.php for a function that might create the salt?
I dont know how it is done. Why dont you just point them at vBulletin's register page?
SpeedStreet
Mon 3rd Nov '03, 11:44pm
Have you tried looking through includes/functions_register.php for a function that might create the salt?
I dont know how it is done. Why dont you just point them at vBulletin's register page?
I'm attempting to show proof of concept to an organization that is considering vBulletin for its educational website. They want to have everything integrate together, so I want to have their class registration process automatically create a vBulletin account at the same time.
The best way to go about this is to insert it all at once, and I can't think of a better way to do it than what I have come up with :)
SpeedStreet
Tue 4th Nov '03, 12:04am
I'm attempting to show proof of concept to an organization that is considering vBulletin for its educational website. They want to have everything integrate together, so I want to have their class registration process automatically create a vBulletin account at the same time.
The best way to go about this is to insert it all at once, and I can't think of a better way to do it than what I have come up with :)
OK, through a bit of smoke and mirrors, I now have salts propogating my database. But whenever a new user tries to login to the forum, it is successful, then crashes.
My belief is that thishas something to do with the session.
What type of info is kept in the idhash, and how is this related to my salty salt?
SpeedStreet
Tue 4th Nov '03, 12:12am
Here is my mySQL error...any ideas?
Invalid SQL: SELECT moderatorid, permissions FROM moderator WHERE userid =
Matty Bwoy
Tue 4th Nov '03, 3:29am
It hasn't got anything set for userid, that would cause an error.
SpeedStreet
Tue 4th Nov '03, 5:29pm
Ok, I've managed to get past that error.
Now, here is the kicker....
When the user successfully completes the login, the login box still appears....TO THE LEFT?!?! Actually, everything appears bass ackwards. I've attached a pic to show you.
Does anyone have any clue? I've verified all the settings, and they are all being inserted properly into tbl.User. Is there something I am missing?
Also, the session data does appear to be propogating on login...but when I try to enter a forum, I get this error:
SELECT COUNT(*) AS threads,
SUM(IF(lastpost>= AND open<>10,1,0)) AS newthread
FROM forums_thread AS thread
LEFT JOIN forums_deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
WHERE forumid = 2
AND sticky = 0
AND visible = 1
AND lastpost >= 1065389424
AND deletionlog.primaryid IS NULL
merk
Tue 4th Nov '03, 7:54pm
Ok, I've managed to get past that error.
Now, here is the kicker....
When the user successfully completes the login, the login box still appears....TO THE LEFT?!?! Actually, everything appears bass ackwards. I've attached a pic to show you.
Does anyone have any clue? I've verified all the settings, and they are all being inserted properly into tbl.User. Is there something I am missing?
Also, the session data does appear to be propogating on login...but when I try to enter a forum, I get this error:
SELECT COUNT(*) AS threads,
SUM(IF(lastpost>= AND open<>10,1,0)) AS newthread
FROM forums_thread AS thread
LEFT JOIN forums_deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
WHERE forumid = 2
AND sticky = 0
AND visible = 1
AND lastpost >= 1065389424
AND deletionlog.primaryid IS NULL
It seems your error revolves around the following line.
SUM(IF(lastpost>= AND open<>10,1,0)) AS newthread
It should be
SUM(IF(lastpost >= 10 AND open <> 10 ,1,0)) AS newthread
TiLaser
Tue 4th Nov '03, 9:53pm
That probably just happened when he posted it, I doubt his code looks like that.
merk
Wed 5th Nov '03, 1:09am
That probably just happened when he posted it, I doubt his code looks like that.
Notice the bold bit? I didnt say the > or < was a problem, as long as he converted them back.
SpeedStreet
Wed 5th Nov '03, 1:18am
checked into it, and everything looks fine.
The problem I seem to be encountering has to do with inserting the newly created userid into several other tables, such as userfield and usertextfield.
Now, I have managed to track down what appears to be the insert_id() function in db_mysql.php, which seems like it is designed to return what the future userID will be for this registrant. Can anyone confirm this functionality or at least tell me how I am supposed to grab a user id that I am about to create and apply it to multiple fields across tables simultaneously?
I promise I will post this mess once its done :)
merk
Wed 5th Nov '03, 4:57am
checked into it, and everything looks fine.
The problem I seem to be encountering has to do with inserting the newly created userid into several other tables, such as userfield and usertextfield.
Now, I have managed to track down what appears to be the insert_id() function in db_mysql.php, which seems like it is designed to return what the future userID will be for this registrant. Can anyone confirm this functionality or at least tell me how I am supposed to grab a user id that I am about to create and apply it to multiple fields across tables simultaneously?
I promise I will post this mess once its done :)
You are correct.
$DB_site->query("INSERT INTO `user` VALUES (blah)");
$newusers_id = $DB_site->insert_id();
vBulletin® v3.8.0 Beta 3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.