Bug 333603 - ktp-auth-handler can't authenticate passwords with non-ascii characters.
Summary: ktp-auth-handler can't authenticate passwords with non-ascii characters.
Status: RESOLVED NOT A BUG
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: auth-handler (show other bugs)
Version: 0.8.0
Platform: Ubuntu Linux
: NOR major
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-19 00:12 UTC by JoseLuisT
Modified: 2014-04-22 20:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JoseLuisT 2014-04-19 00:12:41 UTC
I have a facebook account in which one of the letters of my password is an "Ñ".

When I try to connect with ktp-contacts list, it asks me for the password, I put it correct, then keeps asking me for the password.  

I changed the password to not contain that letter, and then ktp-auth-handler authenticates it succesfully and ktp-contacts connects, when I recover my old password  in my fb account, then the problem again. 

I found that in the debug verbose of ktp-auth-handler has problems with the ibus-daemon.

my keyboard layout is Spanish (Latin-American, include sun dead keys)

I tag this bug as Mayor, because I won't change my password of my Instant messaging services just because this program does not work properly, others do. 


Reproducible: Always

Steps to Reproduce:
1. Configure kde-telepathy with a facebook account, it may be reproducible with other accounts.
2. Use a password that contains Latin american characters; ñ,Ñ,á,é,í,ó,ú 
3. Try to connect. 
Actual Results:  
ktp-auth-handler prompts for a password in a loop, (you put the correct password again and again).

Expected Results:  
Connect to my chat account. 

the output of /usr/lib/kde4/libexec/ktp-auth-handler --debug --persist

Bus::open: Can not get ibus-daemon's address. 
IBusInputContext::createInputContext: no connection to ibus-daemon 
ktp-auth-handler(7415) XTelepathyPasswordAuthOperation::onSASLStatusChanged: Authentication failed and cannot try again 
ktp-auth-handler(7415) SaslHandler::onAuthFinished: Error in SASL auth: "org.freedesktop.Telepathy.Error.AuthenticationFailed" - "Error de autenticación"
Comment 1 Martin Klapetek 2014-04-22 08:18:20 UTC
Thanks for the report.

I see the ibus errors popping up with every app here; can you try installing "ibus" package and see if it goes away (and if authentication works)? I don't think this is actually related but who knows...

In case it won't work, please start the auth-handler, then run "bustle" (install first if needed), then connect and put in your password. Once you get the error, stop bustle and then look at the communication between the auth-handler and Telepathy, it should be passing your password in readable format, can you please check if the password is malformed anywhere along the way?
Comment 2 Martin Klapetek 2014-04-22 18:16:13 UTC
Please don't change the summary; "latin" characters in developers' world means "ascii" characters while this bug is actually about "non-ascii" characters --> "non-latin". It's confusing for us otherwise.

See http://www.thefreedictionary.com/Latin+characters for reference.
Comment 3 David Edmundson 2014-04-22 18:59:57 UTC
Just tested.

Set my password to baño.

From kwallet readPassword we get

@s "ba\241o"

startMechanismWithData has:
@s "X-TELEPATHY-PASSWORD"
@ay "ba\195\177o"

relevant line of code says:

        m_saslIface->StartMechanismWithData(QLatin1String("X-TELEPATHY-PASSWORD"),
                                            m_walletInterface->password(m_account).toUtf8());

Which looks right to me...
Comment 4 JoseLuisT 2014-04-22 19:12:45 UTC
If you say "non-latin" confuses me as well, so I've changed the title to a better one, to have a clear consensus of what we're talking about. 

regards.
Comment 5 David Edmundson 2014-04-22 19:26:03 UTC
In my test above everything actually logged in fine using my local jabber server (prosody).

At this point I'm wanting blaming Facebook's XMPP gateway. If that's the case there's nothing we can do.

Can someone test with PSI, Vacuum or Pidgin with Facebook and the special character?
Comment 6 JoseLuisT 2014-04-22 20:02:06 UTC
with ibus running, no change... and using this password "elAÑOentranTE"

I have on Kwallet's ReadPassword:

@s "elA\209OentranTE"

I have on org.freedesktop.Telepathy.Channel.Interface.SASLAuthentication.StartMechanismWithData

@s "X-TELEPATHY-PASSWORD"

and another StartMechanismWithData with a blank argument, suppose differnt than David in which he had his password as argument, I didn't...
Comment 7 JoseLuisT 2014-04-22 20:35:46 UTC
I tried with pigdin... I couldn't connect as well to facebook chat... so I believe the problem is with facebook chat, not KTelepathy... thank you for your help.
Comment 8 David Edmundson 2014-04-22 20:37:02 UTC
Thanks for testing.
I'll report it on the Facebook's XMPP dev group, but I doubt it will go anywhere.