Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Authentication is not working properly with the new version of Openfire #16

Open
theoziran opened this issue Apr 30, 2015 · 4 comments
Open

Comments

@theoziran
Copy link

The auth() method is not working properly the success reponse doest not satisfy. In the Openfire 3.10 version the sucess response is a little different.

if (!$body->hasChildNodes() || $body->firstChild->nodeName !== 'success') {
            throw new Exception("Invalid login");
}
@ntimesc
Copy link

ntimesc commented Oct 18, 2015

i am facing the same issue are , are you able to resolve it ?

@theoziran
Copy link
Author

@ntimesc I have not my dev env anymore, but if I remember the success has not child anymore so this file https://github.com/candy-chat/xmpp-prebind-php/blob/master/lib/XmppPrebind.php#L218 should be something like

if ($body->firstChild->nodeName !== 'success') {
    throw new XmppPrebindException("Invalid login");
}

@andreabenini
Copy link

My suggestion could be:

~$ diff lib/XmppPrebind.php xmpp-prebind-php/lib/XmppPrebind.php 
219,220c218
< //        if (!$body->hasChildNodes() || $body->firstChild->nodeName !== 'success') {
<       if (!isset($body->firstChild->nodeName) || $body->firstChild->nodeName !== 'success') { // $body->firstChild->nodeName might not exists !
---
>       if (!$body->hasChildNodes() || $body->firstChild->nodeName !== 'success') {

$body might not be an object at all, it's better to check it. Even more: encryption doesn't work at all with OF ! I might be more specific or if you prefer I can open a new issue for it (or a pull request if you want it)

@ntimesc
Copy link

ntimesc commented Nov 20, 2015

yes can you post a new issue please

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

No branches or pull requests

3 participants