Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore password fails via SOAP. Fatal error "cannot connect to host" #16

Closed
Ansem opened this issue May 6, 2020 · 6 comments
Closed

Comments

@Ansem
Copy link

Ansem commented May 6, 2020

Restore password only works when said account actually has an email, regardless of SOAP enabled or not.
The mail gets sent but when the link is clicked the following error displays:

Fatal error: Uncaught SoapFault exception: [HTTP] Error Fetching http headers in /var/www/html/application/include/functions.php:164 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://127.0.0....', 'urn:MaNGOS#exec...', 1, 0) #1 /var/www/html/application/include/functions.php(164): SoapClient->__call('executeCommand', Array) #2 /var/www/html/application/include/user.php(454): RemoteCommandWithSOAP('account set pas...') #3 /var/www/html/application/include/user.php(19): user::restorepassword_setnewpw('', '...') #4 /var/www/html/index.php(34): user::post_handler() #5 {main} thrown in /var/www/html/application/include/functions.php on line 164

I have a very barebones SOAP registration script right now which works to create an account with user and password, I have even tried a newly made account as the SOAP user to test if it has proper access, it has.

OS: Centos 7
PHP: 7.3.13
PHP modules installed and enabled.

How to reproduce:
Enable SOAP. Restore a password. Click the link in the e-mail. The error shows up.

@masterking32
Copy link
Owner

masterking32 commented May 7, 2020

hmmm,
Are you sure create account work with soap?
Check the command of the set password, Is that work on your core?
What is your Core?

@Ansem
Copy link
Author

Ansem commented May 7, 2020

$config['soap_cp_command'] = 'account set password {USERNAME} {PASSWORD} {PASSWORD}';
Terminal output for "help account set password" is:
mangos>help account set password
Syntax: .account set password (#accountId|$accountName) $password $password

Set password for account.

So I don't know why it doesn't work.
Also I found out there is a change password feature in the console:
mangos>help account password
Syntax: .account password $old_password $new_password $new_password

Change your account password.
Meaning that if the old password is known a user could change it or it will get denied if the username/password don't match.

This is for the latest Cmangos.

@Ansem
Copy link
Author

Ansem commented May 9, 2020

Could it be the case that the script sends the SOAP input as a HTTP document instead of a SOAP command, which the server simply refuses?

@masterking32
Copy link
Owner

Contact me on Discord, Let me check it with remote.
MasterkinG32#9999

@amae-byte
Copy link

amae-byte commented Sep 21, 2020

same problem here :

Fatal error: Uncaught SoapFault exception: [HTTP] Error Fetching http headers in /var/www/hhhhh/application/include/functions.php:185 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://127.0.0....', 'urn:MaNGOS#exec...', 1, 0) #1 /var/www/hhhhhh/application/include/functions.php(185): SoapClient->__call('executeCommand', Array) #2 /var/www/hhhhhh/application/include/user.php(548): RemoteCommandWithSOAP('account set pas...') #3 /var/www/hhhhhh/application/include/user.php(19): user::restorepassword_setnewpw('amaetest', '3b2242aab4a1fc4...') #4 /var/www/hhhhh/index.php(34): user::post_handler() #5 {main} thrown in /var/www/xxxxxxxxx/application/include/functions.php on line 185

OS: Debian 10 uptodate
PHP-FPM: 7.3
PHP modules installed and enabled.

How to reproduce:
Enable SOAP. Restore a password. Click the link in the e-mail. The error shows up. Change passwd in cmd-line OK

Any solution ?

@masterking32
Copy link
Owner

masterking32 commented Sep 24, 2020

What is your core?
for TrinityCore you don't need SOAP for restore password!

Check the change password command!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants