Third Party Contributions > Old Style Plug-Ins
RoundCube Webmail 0.1-beta changepassword patch
123123:
can someone tell how to install the patch ;/
when i press download i get this :
--- Quote ---diff -ruN roundcubemail-0.1beta.orig/ext/change_password_function.inc roundcubemail-0.1beta/ext/change_password_function.inc
--- roundcubemail-0.1beta.orig/ext/change_password_function.inc 1970-01-01 01:00:00.000000000 +0100
+++ roundcubemail-0.1beta/ext/change_password_function.inc 2006-05-21 05:19:43.000000000 +0200
@@ -0,0 +1,74 @@
+
diff -ruN roundcubemail-0.1beta.orig/program/steps/settings/change_password.inc roundcubemail-0.1beta/program/steps/settings/change_password.inc
--- roundcubemail-0.1beta.orig/program/steps/settings/change_password.inc 1970-01-01 01:00:00.000000000 +0100
+++ roundcubemail-0.1beta/program/steps/settings/change_password.inc 2006-05-21 14:46:33.000000000 +0200
@@ -0,0 +1,103 @@
+
\ No newline at end of file
diff -ruN roundcubemail-0.1beta.orig/skins/default/includes/settingstabs.html roundcubemail-0.1beta/skins/default/includes/settingstabs.html
--- roundcubemail-0.1beta.orig/skins/default/includes/settingstabs.html 2005-09-25 16:18:58.000000000 +0200
+++ roundcubemail-0.1beta/skins/default/includes/settingstabs.html 2006-05-17 20:12:34.000000000 +0200
@@ -1,3 +1,4 @@
+
diff -ruN roundcubemail-0.1beta.orig/skins/default/templates/changepassword.html roundcubemail-0.1beta/skins/default/templates/changepassword.html
--- roundcubemail-0.1beta.orig/skins/default/templates/changepassword.html 1970-01-01 01:00:00.000000000 +0100
+++ roundcubemail-0.1beta/skins/default/templates/changepassword.html 2006-05-21 03:33:05.000000000 +0200
@@ -0,0 +1,27 @@
+http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+http://www.w3.org/1999/xhtml">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- End quote ---
what i have to do next??
ric:
Installed this patch with beta2, works well.
--- Quote ---123123,
what i have to do next??
--- End quote ---
123123, you can either using a patching program to apply the patch or edit the files by hand, what mailserver are you using?
123123:
i have no idea what program to use. i use cpanel. maybe someone have seperate files of this plugin and know what changes must be done in other files?
mike413:
--- Quote from: Hunteru ---I made a few changes in the original file to work with vpopmail (mysql).
--- Code: ---<?php
/*
+-----------------------------------------------------------------------+
| program/steps/settings/change_password.inc |
| |
| This file is part of the RoundCube Webmail client |
| Copyright (C) 2005, RoundCube Dev. - Switzerland |
| Licensed under the GNU GPL |
| |
| PURPOSE: |
| Show edit form for a identity record or to add a new one |
| |
+-----------------------------------------------------------------------+
| Author: Nicolas Van Eenaeme <nicolas@poison.be> |
+-----------------------------------------------------------------------+
$Id: edit_identity.inc,v 1.1 2006/05/21 05:19:43 roundcube Exp $
*/
// The host of the database
define ('RCUBE_EXT_CHANGE_PASS_HOST', 'localhost');
// The username to connect to the database
define ('RCUBE_EXT_CHANGE_PASS_USER', 'user');
// The password to connect to the database
define ('RCUBE_EXT_CHANGE_PASS_PASS', 'password');
// The name of the database
define ('RCUBE_EXT_CHANGE_PASS_NAME', 'vpopmail');
// The update query. You can use '%clear%' for the clear password,
// '%md5%' for the md5 encrypted password,
// '%user%' for the username,
// '%old%' for the old password and
// '%oldmd5%' for the old md5 encrypted password.
define ('RCUBE_EXT_CHANGE_PASS_UPDATEQUERY', 'UPDATE vpopmail SET pw_clear_passwd = "%clear%", pw_passwd = "%md5%" WHERE pw_name = "%user%" AND pw_passwd = "%oldmd5%" AND pw_domain = "%domain%"');
// The select query (needed to verify the md5.
define ('RCUBE_EXT_CHANGE_PASS_SELECTQUERY', 'SELECT pw_passwd FROM vpopmail WHERE pw_name = "%user%" AND pw_domain = "%domain%"');
function split_user ($user)
{
list($s_user, $s_domain) = split('[@]', $user);
return array($s_user,$s_domain);
}
function change_password_function ($s_user, $currentpass, $newpass)
{
list ($user, $domain) = split_user ($s_user);
$dbh =& mysql_connect (RCUBE_EXT_CHANGE_PASS_HOST, RCUBE_EXT_CHANGE_PASS_USER, RCUBE_EXT_CHANGE_PASS_PASS);
if (!is_resource ($dbh))
return FALSE;
if (!mysql_select_db (RCUBE_EXT_CHANGE_PASS_NAME, $dbh))
return FALSE;
$q = str_replace (array ('%user%', '%domain%'), array ($user, $domain), RCUBE_EXT_CHANGE_PASS_SELECTQUERY);
$dbr =& mysql_query ($q, $dbh);
if (!is_resource ($dbr))
return FALSE;
$data = mysql_fetch_row ($dbr);
mysql_free_result ($dbr);
$newpassmd5 = crypt ($newpass, $data[0]);
$currentpassmd5 = crypt ($currentpass, $data[0]);
$q = str_replace (array ('%user%', '%domain%', '%clear%', '%md5%', '%old%', '%oldmd5%'), array ($user, $domain, $newpass, $newpassmd5, $currentpass, $currentpassmd5), RCUBE_EXT_CHANGE_PASS_UPDATEQUERY);
$dbr =& mysql_query ($q, $dbh);
if (!$dbr || mysql_affected_rows ($dbh) != 1)
return FALSE;
mysql_close ($dbh);
return TRUE;
}
?>
--- End code ---
Thx for the original tool. 8)
--- End quote ---
Thanks you so mush for your PATCH, that work fine for me with the beta2.
But just one problem found:
when i have applied the patch, i found one error in the result with the file program/include/main.inc.rej
--- Code: ---***************
*** 1072,1078 ****
'identityform' => 'rcube_identity_form',
'foldersubscription' => 'rcube_subscription_form',
'createfolder' => 'rcube_create_folder_form',
- 'composebody' => 'rcmail_compose_body'
);
--- 1072,1079 ----
'identityform' => 'rcube_identity_form',
'foldersubscription' => 'rcube_subscription_form',
'createfolder' => 'rcube_create_folder_form',
+ 'composebody' => 'rcmail_compose_body',
+ 'changepassform' => 'rcmail_change_pass_form'
);
--- End code ---
So, i have edited the main.inc and i have added
--- Code: ---'changepassform' => 'rcmail_change_pass_form'
--- End code ---
at the line 1236 (// USER SETTINGS) like this:
--- Code: --- // USER SETTINGS
'userprefs' => 'rcmail_user_prefs_form',
'itentitieslist' => 'rcmail_identities_list',
'identityframe' => 'rcmail_identity_frame',
'identityform' => 'rcube_identity_form',
'foldersubscription' => 'rcube_subscription_form',
'createfolder' => 'rcube_create_folder_form',
'renamefolder' => 'rcube_rename_folder_form',
'composebody' => 'rcmail_compose_body',
'changepassform' => 'rcmail_change_pass_form'
--- End code ---
And now, that work.
Thanks you.
123123:
how to apply the patch? HELP please :(
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version