smellyrat / drydock

Automatically exported from code.google.com/p/drydock
0 stars 0 forks source link

Login Not working. #81

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

 just did a fresh install and no matter what I set as user / pass for admin
it does not work. i know the passwords have been correct. i have tried it
multiple times. any ideas?

There was an error processing your request.
Possible causes:
Invalid username
Invalid password
Your account has not been approved
Your account has been disabled 

Original issue reported on code.google.com by robert.m...@gmail.com on 18 Aug 2009 at 4:48

GoogleCodeExporter commented 9 years ago
This appears to be a duplicate of
http://code.google.com/p/drydock/issues/detail?id=57

Original comment by all.sta...@gmail.com on 18 Aug 2009 at 4:56

GoogleCodeExporter commented 9 years ago
I have tried this but am still having issues. It will not login. Plus I used the
files from the trunk today for the install so it should have included this fix.

Original comment by robert.m...@gmail.com on 18 Aug 2009 at 5:13

GoogleCodeExporter commented 9 years ago
The md5 from my salt file matches that of the md5'd password from the config 
file.

Original comment by robert.m...@gmail.com on 18 Aug 2009 at 5:17

GoogleCodeExporter commented 9 years ago
Is the approved bit set to 1 for the user?

Original comment by all.sta...@gmail.com on 18 Aug 2009 at 5:20

GoogleCodeExporter commented 9 years ago
Yeah. I echoed the login query and then ran it in phpmyadmin and it works fine

Original comment by robert.m...@gmail.com on 18 Aug 2009 at 5:34

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Make sure you're using the same salt in the password generator thing (salt.php) 
that
you are using in your config file.  If you tried the suggestion from issue 57 
and you
already have a salt set, they'll probably end up being different.

Original comment by TaQS...@gmail.com on 18 Aug 2009 at 6:51

GoogleCodeExporter commented 9 years ago
They both generate the same md5. 

Original comment by robert.m...@gmail.com on 18 Aug 2009 at 6:54

GoogleCodeExporter commented 9 years ago
Meaning, if I run the configure.php again it inserts the same md5 sum as when I
generate it from salt.php. So I know it is correct.

Original comment by robert.m...@gmail.com on 18 Aug 2009 at 6:55

GoogleCodeExporter commented 9 years ago
Could you please package the latest code for me? I want to make sure I have
everything up to date. It seems my download is .3 not .3.1

Original comment by robert.m...@gmail.com on 18 Aug 2009 at 7:24

GoogleCodeExporter commented 9 years ago
Got it fixed. Thanks for the help anyway.

Original comment by robert.m...@gmail.com on 19 Aug 2009 at 12:37

GoogleCodeExporter commented 9 years ago
What did you do to fix the issue?  Did you make any code changes?  I've never 
had
this issue happen to me except once and it was fixed with the salt.php fix (but 
I've
been using 031 for so long that I don't even know)

Original comment by TaQS...@gmail.com on 19 Aug 2009 at 1:05

GoogleCodeExporter commented 9 years ago
Yeah, in dbi/MySQL.php: $db->myquery($query); then calling myassoc function 
which then
used the result of mysql_query on $query, via myquery, then attempted to do 
another
mysql_query on it. wtf was the point of that. it was the bad call to get the 
mysql
query results that was not allowing the login.

Original comment by robert.m...@gmail.com on 19 Aug 2009 at 1:16

GoogleCodeExporter commented 9 years ago
here you go:
--- drydock.orig/profiles.php   2008-03-18 02:10:33.000000000 -0400
+++ drydock/profiles.php        2009-08-18 21:15:17.000000000 -0400
@@ -41,8 +41,7 @@
               {
                       $query = "SELECT * FROM ".THusers_table." WHERE
username=\"".escape_string($_POST['name']).
                       "\" AND
password=\"".escape_string(md5(THsecret_salt.$_POST['password']))."\" AND 
approved=1";
-                       $userresult = $db->myquery($query);
-                       $userdata=$db-> myassoc($userresult);
+                       $userdata=$db-> myassoc($query);

                       if($userdata != NULL)
                       {

Original comment by robert.m...@gmail.com on 19 Aug 2009 at 1:17

GoogleCodeExporter commented 9 years ago
Okay, I've applied that change into trunk.  Thanks for your help.

Original comment by all.sta...@gmail.com on 19 Aug 2009 at 2:11