Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 14th March 2012, 18:39
desanidesigns desanidesigns is offline
Junior Member
 
Join Date: Mar 2012
Posts: 10
Thanks: 2
Thanked 1 Time in 1 Post
Default client_change_password bug fix

While trying to use the client_change_password remoting function, I noticed it was not taking the parameters I was giving it and it was not changing the user's password.

These modifications are required for the function to actually work, and hopefully we can get this fixed in the next release.

/usr/local/ispconfig/interface/lib/classes/remoting.inc.php
Line 2524 Reads:
Code:
 $sql = "UPDATE client SET password = md5('".($new_password)."')   WHERE client_id = ".$client_id;
Should read:
Code:
$sql = "UPDATE client SET password = md5('".$new_password."') WHERE client_id = ".$client_id;
Line 2527 Reads:
Code:
$sql = "UPDATE sys_user SET passwort = md5('".($new_password)."')         WHERE client_id = ".$client_id;
Should read:
Code:
$sql = "UPDATE sys_user SET passwort = md5('".$new_password."') WHERE client_id = ".$client_id;
If you're banging your head against the wall trying to get a user's password changed using the remote framework, make those edits and it will work. The parenthesis in the query are what's throwing it off.
Reply With Quote
Sponsored Links
  #2  
Old 15th March 2012, 08:43
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,182
Thanks: 829
Thanked 5,414 Times in 4,257 Posts
Default

Thanks for your fix. The client_change_password function that you used gets marked as deprecated as of 3.0.5 as its functionality is included in the client_update function.

Better use this code to update a password:

$params = $soapclient->client_get($session_id, $client_id);
$params['password'] = 'myNewPassword';
$soapclient->client_update($session_id, $client_id, $params['parent_client_id'], $params);
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 25th March 2012, 10:18
Matt43 Matt43 is offline
Junior Member
 
Join Date: Mar 2012
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Is this the actual fix to the issue? I don't see why the brackets would cause a problem. From the looks of it, the password field in table 'client' is NOT md5() but a crypt'ed password..

I'm having this same problem, also having a problem with the client_update function not updating the password also.

I'm assuming a similar problem to my other thread here
Reply With Quote
  #4  
Old 25th March 2012, 17:22
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,182
Thanks: 829
Thanked 5,414 Times in 4,257 Posts
Default

The default password encryption is crypt, but md5 is supported as well. Which ispconfig version do you use?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 25th March 2012, 23:52
Matt43 Matt43 is offline
Junior Member
 
Join Date: Mar 2012
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default

Currently using 3.0.4.3
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrade 3.0.3 -> 3.0.4.1 (bug fix release) failed Snowman Installation/Configuration 7 13th December 2011 16:55
Fix WebDAV with PHP (files execute instead of GET) Steveorevo Developers' Forum 2 26th August 2011 09:56
error: File /root/rpm/SOURCES/postfix-2.3.3-vda.patch: No such file or directory mxtdn Installation/Configuration 1 25th July 2009 09:20
Help needed error rpmbuild -ba postfix.spec mr_bo Installation/Configuration 2 15th May 2009 09:47
Step 11 Error:rpmbuild -ba postfix.spec tgxg00 Installation/Configuration 7 22nd April 2009 15:16


All times are GMT +2. The time now is 11:02.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.