News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SMF 1.1 Beta 3 Public!

Started by [Unknown], June 26, 2005, 10:40:16 PM

Previous topic - Next topic

[Unknown]

SMF 1.1 now uses sha1 for its password encryption.  As we said - integrations that worked with 1.0 will most likely not with 1.1.

-[Unknown]

Juan Carlos

I will try. I see that with some password work and with others not.
I have this in my loginchat file:
<?php
function md5_hmac($data, $key)
{
   $key = str_pad(strlen($key) <= 64 ? $key : pack('H*', md5($key)), 64, chr(0x00));
   return md5(($key ^ str_repeat(chr(0x5c), 64)) . pack('H*', md5(($key ^ str_repeat(chr(0x36), 64)). $data)));
}

/**
* please modify the database configuration
*/
$dbhost = "****";
$dbuser = "****";
$dbpasswd = "****";
$dbname = "****";

$usertable = "****_members";
$username_field = "memberName";
$password_field = "passwd";

// dbms - database type
// support dbms: mysql , mysql4 , db2, msaccess, mssql-odbc, oracle, postgres7
$dbms = "mysql4";


$phpEx = "php";
$lib_path = ".";


/**
* Don't modify the code below unless you know what are you doing.
*/

// Define the output result
$LOGIN_SUCCESS = 0;
$LOGIN_PASSWD_ERROR = 1;
$LOGIN_NICK_EXIST = 2;
$LOGIN_ERROR = 3;
$LOGIN_ERROR_NOUSERID = 4;
$LOGIN_SUCCESS_ADMIN = 5;
$LOGIN_NOT_ALLOW_GUEST = 6;
$LOGIN_USER_BANED = 7;

switch($dbms)
{
   case 'mysql':
      include($lib_path . '/mysql.'.$phpEx);
      break;

   case 'mysql4':
      include($lib_path . '/mysql4.'.$phpEx);
      break;

   case 'postgres':
      include($lib_path . '/postgres7.'.$phpEx);
      break;

   case 'mssql':
      include($lib_path . '/mssql.'.$phpEx);
      break;

   case 'oracle':
      include($lib_path . '/oracle.'.$phpEx);
      break;

   case 'msaccess':
      include($lib_path . '/msaccess.'.$phpEx);
      break;

   case 'mssql-odbc':
      include($lib_path . '/mssql-odbc.'.$phpEx);
      break;
   default:
      echo $LOGIN_ERROR;
      exit;
}


// Make the database connection.
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false);
if(!$db->db_connect_id)
{
   echo $LOGIN_ERROR;
   exit;
}


$username = isset($HTTP_GET_VARS['username']) ? trim(htmlspecialchars($HTTP_GET_VARS['username'])) : '';
$username = substr(str_replace("\\'", "'", $username), 0, 25);
$username = str_replace("'", "\\'", $username);
$password = isset($HTTP_GET_VARS['password']) ? $HTTP_GET_VARS['password'] : '';
//$md5 = isset($HTTP_GET_VARS['md5']) ? $HTTP_GET_VARS['md5'] : '';

$sql = "SELECT " . $username_field ." , ". $password_field . "
    FROM " . $usertable . "
   WHERE ". $username_field . " = '" . str_replace("\\'", "''", $username) . "'";


if ( !($result = $db->sql_query($sql)) )
{
   echo $LOGIN_ERROR;
   exit;   
}

if( $row = $db->sql_fetchrow($result) )
{
   $db_user_password = $row[$password_field];
 
   if (($password == $db_user_password) || (md5_hmac($password,strtolower($username)) == $db_user_password))
   {
      echo $LOGIN_SUCCESS;
      exit;
   }
   else
   {   
      echo $LOGIN_PASSWD_ERROR;
      exit;
   }

}
else
{
   echo $LOGIN_ERROR_NOUSERID;
   exit;
}
?>


Juan Carlos

[Unknown]

I suggest using the smf_api.php instead.  Here is an updated one - please note that it is also beta.

-[Unknown]

JayBachatero

im lovin 1.1 Beta 3 Public.  been waitin for it for a while now.  Grest job so far.  SMF all the way.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

trenchteam

Thanks for all your hard work SMF!  I'll have a test forum and use it for now, just as that a test.  Do you think when the final version comes out, it will be fine to upgrade from 1.05  I've done so much to my live site, Im afraid to break it with BETA.  What do you suggest?

JayBachatero

ok i ran to my first error wen i have play Display image attachments as pictures under post: enabled the page shows up blank.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

dtm.exe

Quote from: trenchteam on June 29, 2005, 09:33:16 PM
Thanks for all your hard work SMF!  I'll have a test forum and use it for now, just as that a test.  Do you think when the final version comes out, it will be fine to upgrade from 1.05  I've done so much to my live site, Im afraid to break it with BETA.  What do you suggest?

You'll be fine if you just backup :P.

-Dan The Man

JRSofty

Ok I'm going to be running the upgrade on my test forum just to make sure I don't foo boo the upgrade for my live site. However when I look into the upgrade version (downloaded file smf_1-1-beta3p_upgrade.tar.bz2) I don't see an upgrade.php file nor do I see this file in my forum's directory? Do I need to download the upgrade script separately?
Rebooting the SMF AI Bot see Project link below for details

http://jrsofty1.stinkbugonline.com
http://www.galahtech.org

SMF Bot Project

[Unknown]

Are you sure?  There should indeed be an upgrade.php file in that archive.

-[Unknown]

andyl56

I don't mean to bug or anything but when will a working API be available for this version? The current one doesn't work. (the main reason I'm seeing is because of 2 new variables being added to the cookie array. I would greatly appreciate it.

[Unknown]

I posted one earlier in this topic.

-[Unknown]

andyl56

Thanks! This really helps me out!

JRSofty

Doh *slapps head*

Sorry [Unknown] I found it just needed to get the sleep out of my eyes I guess.
Rebooting the SMF AI Bot see Project link below for details

http://jrsofty1.stinkbugonline.com
http://www.galahtech.org

SMF Bot Project

Gandalf

Congratulations to the SMF TEAM, really great and awsome work
Siemens-mobiles.org Visit it and you won't regret it :D

TarantinoArchives

so what are the major template changes? i use the default template with some modifications... will the updater take them over as best as it goes or will it not?

rhizome

Hi

Some noob questions so I know what I'm doing. I'm using 1.05:

1. When you say do a back up, is doing it thru SMF ok, or thru cpanel better as I've modded/hacked some files

2. Will the upgrade replace all existing 1.05 files, so any mods or hacks won't work/get written over with new files?

3. Do I need to uninstall existing mods to do the upgrade?

4. When the final 1.1 is released, will this overwrite all the beta 1.1 files again, so any re-applied mods/hacks to the beta will have to be done again? So it may not be worth upgrading to the beta at this stage and just wait until final release?

thanks for the all the all the hard work u guys have been doing

Grudge

Backing up through SMF *should* be fine - it only does the database though. Can't hurt to do a cPanel backup once a while.

SMF 1.1 Beta 3 will remove all mods/hacks - yes.

You do not need to uninstall mods before installing 1.1 Beta 3

1.1 Final will also overwrite all mods. We only do package upgrades for small updates (For example 1.0.4 -> 1.0.5) - it's impractical to make them work properly with updates with thousands of lines of code changed.
I'm only a half geek really...

dave

Nice work love the simplified admin interface

Juan

[Unknown], thanks for the solution yesterday...

Now, I have another problem.. :P

"Fatal error: Call to undefined function: removetopics() in /home/guesswho/public_html/Sources/Subs-Boards.php on line 577" (this is when I try to delete a thread). :(

Anyway... SMF 1.1 Beta 3 rocks... congrats :D

Ben_S

Sounds like you havent uploaded all the files.
Liverpool FC Forum with 14 million+ posts.

Advertisement: