-
Notifications
You must be signed in to change notification settings - Fork 121
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
Base64 authentication calculation doesn't work with Cisco IM&P #85
Comments
After some googling, I see many code examples with the encoding I used (jid, username, password) for other Jabber servers, too, not just CIMP. Is it possible that the way JAXL is handling it is simply wrong? At least wrong for PLAIN? |
I just noticed the same solution is presented in the BOSH problem thread. The solution there is more elegant: $stanza->t(base64_encode($user."\x00".substr($user,0,strpos($user,'@'))."\x00".$pass)); |
Library implements auth mechanism described in XMPP RFCs. However,
different servers can define their own auth mechanism. Eg see Google/FB
auth examples from the past. It should be easy to override default auth
mechanism by introducing a custom auth type.
…On Thu, May 18, 2017 at 8:06 AM npetreley ***@***.***> wrote:
I just noticed the same solution is presented in the BOSH problem thread.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#85 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAHscZOM54GV_kzl1nbJVOqWGE7KO1qWks5r7F6JgaJpZM4NeY2i>
.
|
Can you point me to the XMPP RFC on that? I can't find it. |
In xmpp_stream.php
This doesn't work:
$stanza->t(base64_encode("\x00".$user."\x00".$pass));
This does work:
$usernamepos = strpos($user,"@");
$username = substr($user,0,$usernamepos);
$stanza->t(base64_encode($user."\x00".$username."\x00".$pass));
CIMP is expecting an encoded combination of jid, username, and password. I cobbled my solution together. I didn't bother to look to see if I could access the username directly, so I just substringed it.
The text was updated successfully, but these errors were encountered: