Home arrow Forum Latest posts of: Lycofron
  Welcome, Guest. Please login or register.
Did you miss your activation email?
December 01, 2008, 07:01:54 PM
Home New Posts Search Calendar


Login with username, password and session length
  Show Posts
Pages: [1]
1  Joomla Hacks / Joomla-SMF 2.0.x / CB login problems - quick'n'dirty hack to solve on: June 01, 2007, 08:37:17 AM
Hi,

I was facing problems with CB login, even with SMF CB plugin published. Tracing the code, I found out that, for some unknown reason (could be CB architecture?) users imported from SMF were could not login (wrong password).

So, I decided to try a quick'n'dirty hack to CB code, as follows:

In comprofiler.php, around line 1307:

Code:
} else {
      $resultError = "cb login"._LOGIN_INCORRECT;
}

I changed it into this:

Code:
} else {
        $jsmf =& new jsmfFrontend();
        if(!$jsmf->doLogin(TRUE))
        $resultError = "cb login"._LOGIN_INCORRECT;
}

What this piece of code does, is, if a joomla login fails, it tries to login via JSMF (which, in turn, will update password in Joomla!).

In my test environment, it works.

Well, this is a hack solution. Another possible solution I thought of (in order not to change CB code) would be to create a function in SMF CB plugin code which would perform _isValidUser function and would update Joomla! password accordingly.

Anyway, do you think that this is a "safe" hack?

Thank you.
2  Joomla Hacks / Joomla-SMF 2.0.x / Re: Need CB testers for JSMF 2.0.3 on: May 17, 2007, 05:40:18 AM
Hi, do you still need testers? I would like to test 2.0.3 as I have already set up a nice testing environment, quite demanding (nearly 800 users in utf-8).
3  Joomla Hacks / Joomla-SMF 2.0.x / Re: Password not syncing properly on: May 16, 2007, 07:31:00 AM
Hi, I have exactly the same problem while testing an SMF - Joomla! integration.

Some more details.

-The initial forum was in phpbb and was converted to SMF.
-Then, at a later time (already converted to SMF), it was converted from ISO-8859-7 to UTF-8. This caused users with greek usernames not being able to login. So far, most of the active users have already updated their passwords, so, this has not been a big problem for them.
-Right now, I have set up a testing environment and I am trying to migrate users from SMF to Joomla!. I followed the necessary steps (as I have done before without problems) and the following problems occured:
* There was no message at all informing about users imported.
UPDATE: Resolved - there were too many users whose data did not conform with Joomla! standards, so, this one is no longer a problem.
* When I try to login with an existing username, login fails in Joomla! but succeeds in SMF. So far, I could not verify whether this is a problem specific to usernames with greek characters.

As far as I have found out, SMF stores the password as a combined SHA1 of username and password, with salt on it. Could this mean that there can be no solution to this problem?

Thank you in advance.
4  Joomla Hacks / Joomla-SMF 2.0.x / Re: Forum Profile Edit Error + Discussbot issues on: November 12, 2006, 11:23:17 AM
Found a quick fix for bad url problem.

In file mos_smf_discussbot.php, edit line 278:

Code:
$message = "[url=".sefRelToAbs($url)."]".$linkback_title."[/url]\n".$message;

as follows:

Code:
$message = "[url=".sefRelToAbs("index.php?".$url)."]".$linkback_title."[/url]\n".$message;

Works great for me!
5  Joomla Hacks / Joomla-SMF 2.0.x / Re: JSMF 2.0 RC1 released on: October 25, 2006, 05:56:26 AM
There's a funny error in my forum I could not find any info about:

For some strange reason, duplicate user accounts are created on SMF. (By "duplicate" I mean, they match the same Joomla user, and, as I've seen on the DB, they have same username but somehow password happens to be stored on db unencrypted.

I contacted a user whose account was duplicated, he told me he didn't change anything on his profile.

Something that I suspects is important is that duplicated usernames are in greek characters (my site uses utf-8 everywhere).

Any ideas  Huh
6  Joomla Hacks / Joomla-SMF 2.0.x / Re: CB-SMF Plugins for JSMF 2.0 on: September 24, 2006, 06:46:25 AM
OK, after a thorough investigation Cool I found a fix.

At smf.class.php, on line 1909:

Code:
    return $jsmf->fixLink($jsmfConfig->url.'action=login2&hash_passwrd=0&user='.$param1.'&passwrd='.$param2.'&cookielength='.$param3);

replace with:

Code:
    return $jsmf->fixLink($jsmfConfig->url.'action=login2&hash_passwrd=0&user='.urlencode($param1).'&passwrd='.$param2.'&cookielength='.$param3);

Then, users with non-latin username, are able to login (at least with utf-8 everywhere)!

 Cheesy

EDIT: Because of my enthusiasm, I forgot to mention that this has to do with JSMF component, not the plugin.  Embarrassed
7  Joomla Hacks / Joomla-SMF 2.0.x / Re: CB-SMF Plugins for JSMF 2.0 on: September 23, 2006, 03:37:06 PM
I have a login problem with CB plugin.

When when I login using an account with latin-character username, everything works fine.

But, when I try to login using an account with greek characters, I am redirected to SMF with a "user does not exist" message. The url in the address field of my browser, I can see that user parameter is not correct:

Code:
user=%CE_%CF_%CE%BA%CF_%CF_%CF_%CF_%CE%BD

And, accordingly, the "username" field on login form is filled with

Code:
�_

As you can see, few characters are passed to the query string correctly, while the rest hold only the first byte.

(Yes, I have utf-8 encoding)

I looked the code a bit, I could not find where this "conversion" is happening...  Huh Can this behaviour change?
Pages: [1]


Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use
Joomla Hacks



Joomla Hacks
German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
Search Contact About Advertise Blogs Topsites Submit News Register Login