Roundcube Community Forum

 

Resolved - Password plugins

Started by remrem, June 26, 2009, 07:44:01 AM

Previous topic - Next topic

tmsam

Hi every body, I have install :
1. windows xp
2. wampserver 2.0
3. Hmail 5.3.2
4. Roucube mail 0.3.1

Now can send/Reicv with webmail, pop.. but cannot change password. I have try password

plugin but now success. I think infomation data of user in hmail\database

folder\hmailserver.sdf not in mysql (mysql.initial.sql) . Pls help me.

LMSSML

Hi there,

I'm using postfix*postfixadmin+roundcube(4) but I have got one problem I've tried what you have been posted for my case that I think its a general case as indented here.

But got one problem made log on level 4 of roundcube.

When I try to change the password I saw this .

"Parse error: syntax error, unexpected '*' in /var/www/rc3/plugins/password/drivers/sql.php  on line 51"

This appears after pressing button to save password it's almost imediatley.


Any help would be appreciated.

LMSSML


rosali

Did you configure the following section properly?


// SQL Driver options
// ------------------
// PEAR database DSN for performing the query. By default
// Roundcube DB settings are used.
$rcmail_config['password_db_dsn'] = '';

// The SQL query used to change the password.
// The query can contain the following macros that will be expanded as follows:
//      %p is replaced with the plaintext new password
//      %c is replaced with the crypt version of the new password, MD5 if available
//         otherwise DES.
//      %D is replaced with the dovecotpw-crypted version of the new password
//      %o is replaced with the password before the change
//      %n is replaced with the hashed version of the new password
//      %q is replaced with the hashed password before the change
//      %h is replaced with the imap host (from the session info)
//      %u is replaced with the username (from the session info)
//      %l is replaced with the local part of the username
//         (in case the username is an email address)
//      %d is replaced with the domain part of the username
//         (in case the username is an email address)
// Escaping of macros is handled by this module.
// Default: "SELECT update_passwd(%c, %u)"
$rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)';


The query should be something like:

UPDATE mailbox SET password=%c  WHERE username=%u
Regards,
Rosali

LMSSML

Hi there,


I use like this:

$rcmail_config['password_query'] = "UPDATE mailbox SELECT password = %c WHERE username = %u";

And I got the following error:

Parse error: syntax error, unexpected '*' in /var/www/rc3/plugins/password/drivers/sql.php on line 51

rosali

#35
Try without spaces and SELECT is wrong in this context.

$rcmail_config['password_query'] = "UPDATE mailbox SET password=%c WHERE username=%u";
Regards,
Rosali

LMSSML

#36
Hi,
Thanks
for the awnser


But it happends the same :

Parse error: syntax error, unexpected '*' in /var/www/rc3/plugins/password/drivers/sql.php  on line 51


in sql.php line 51

I found this :

*  $sql = str_replace('%c',  $db->quote(crypt($passwd, CRYPT_MD5 ? '$1$'.$salt.'$' : $salt)), $sql);

I removed the asterisk and I've got this:

DB Error in /var/www/rc3/program/include/rcube_mdb2.php (627): MDB2 Error: syntax error Query: _doQuery: [Error message: Could not execute statement] [Last executed query: UPDATE mailbox SET password='$1$50SZH$ec36cegLTG2MSqm7jZ3X11' WHERE username=''[email protected]''] [Native code: 1064] [Native message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[email protected],''' at line 1]


It worked some problems on '%u' removed and it worked


Thanks a lot.

rosali

@tmsam ... meanwhile there is a driver for hmailserver. Check out recent svn trunk version.
Regards,
Rosali

LMSSML

HI there

Everything works fine with rc4 and it's marvelous when I try to change languages to portuguese I get a blank screen when trying to execute the plugin from the interface.

Is it any bug or something that I make wrong ?

In english works
In portuguese (blank screen)

Thanks in advanced.

LMSSML

Anyone with same problem ?

rosali

Works for me with portugues. Please post your pt_PT language file and check error logs.
Regards,
Rosali

LMSSML

#41
This is labels.inc

And I added the following but if i remove the problem is the same:

Quote$labels['changepasswd']  = 'Alterar password';
$labels['curpasswd']  = 'Password atual:';
$labels['newpasswd']  = 'Nova password:';
$labels['confpasswd']  = 'Confirmar password:';

And I had the same like labesl.inc and add this:

Quote$messages['nopassword'] = 'Introduza a nova password.';
$messages['nocurpassword'] = 'Introduza a password actual.';
$messages['passwordincorrect'] = 'Password actual errada.';
$messages['passwordinconsistency'] = 'Password\'s nao combinam, tente novamente..';
$messages['crypterror'] = 'Nao foi possivel gravar a nova password. Funcao de criptografica inexistente.';
$messages['connecterror'] = 'Nao foi possivel gravar a nova password. Erro de ligacao';
$messages['internalerror'] = 'Nao foi possivel gravar a nova password.';


In logs there are no reported errors

rosali

Why did you alter the program localization? The plugin has it's own localization in ./plugins/password/localization.

You should not have to alter anything!
Regards,
Rosali

LMSSML

Hi there,

I didn't alter any path of files I just add inside each file what I've quoted before

the path still the same

rosali

I meant you need not to add plugin localization to the default localization.
Regards,
Rosali