Announcement

Collapse
No announcement yet.

Salt

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Salt

    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

  • #2
    Salt adds extra encryption to MD5 so when a users use the same password on different forums, the encrypted password will always be different

    Comment


    • #3
      Originally posted by assassingod
      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?

      Comment


      • #4
        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?

        Comment


        • #5
          Originally posted by merk
          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

          Comment


          • #6
            Originally posted by SpeedStreet
            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?

            Comment


            • #7
              Here is my mySQL error...any ideas?

              Invalid SQL: SELECT moderatorid, permissions FROM moderator WHERE userid =

              Comment


              • #8
                It hasn't got anything set for userid, that would cause an error.

                Comment


                • #9
                  This is NUTS!!!

                  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:

                  PHP Code:
                    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 

                  Comment


                  • #10
                    Originally posted by SpeedStreet
                    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:

                    PHP Code:
                    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.

                    Code:
                    SUM(IF(lastpost>= AND open<>10,1,0)) AS newthread
                    It should be

                    Code:
                    SUM(IF(lastpost >= 10 AND open <> 10 ,1,0)) AS newthread

                    Comment


                    • #11
                      That probably just happened when he posted it, I doubt his code looks like that.

                      Comment


                      • #12
                        Originally posted by TiLaser
                        That probably just happened when he posted it, I doubt his code looks like that.
                        Notice the bold bit? I didnt say the &gt; or &lt; was a problem, as long as he converted them back.

                        Comment


                        • #13
                          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

                          Comment


                          • #14
                            Originally posted by SpeedStreet
                            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.

                            PHP Code:
                            $DB_site->query("INSERT INTO `user` VALUES (blah)");
                            $newusers_id $DB_site->insert_id(); 

                            Comment

                            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                            Working...
                            X