EionRobb / purple-pulsesms

GNU General Public License v3.0
21 stars 2 forks source link

Crash on Adding Account #4

Closed flintparrell closed 5 years ago

flintparrell commented 5 years ago

There seems to be a problem on my end using this plugin whenever I try to add my pulse account. I am currently using version 2.12.0 on Ubuntu 18.04.1 LTS, 64 bit Here's what I found using -d (only the portion after I input my credentials)(username changed to username):

(21:53:48) util: Writing file accounts.xml to directory /home/username/.purple
(21:53:48) util: Writing file /home/<username>/.purple/accounts.xml
(21:53:48) account: Connecting to account username.
(21:53:48) connection: Connecting. gc = 0x55d2a1fc9e00
(21:53:48) http: Performing new request 0x55d2a1eea880 to api.messenger.klinkerapps.com.
(21:53:48) dnsquery: Performing DNS lookup for api.messenger.klinkerapps.com
(21:53:48) dns: Successfully sent DNS request to child 6612
(21:53:48) dns: Got response for 'api.messenger.klinkerapps.com'
(21:53:48) dnsquery: IP resolved for api.messenger.klinkerapps.com
(21:53:48) proxy: Attempting connection to 52.203.102.189
(21:53:48) proxy: Connecting to api.messenger.klinkerapps.com:443 with no proxy
(21:53:48) proxy: Connection in progress
(21:53:48) proxy: Connecting to api.messenger.klinkerapps.com:443.
(21:53:48) proxy: Connected to api.messenger.klinkerapps.com:443.
(21:53:48) nss: SSL version 3.3 using 128-bit AES-GCM with 128-bit AEAD MAC
Server Auth: 2048-bit RSA, Key Exchange: 256-bit ECDHE, Compression: NULL
Cipher Suite Name: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
(21:53:48) nss: subject=CN=api.messenger.klinkerapps.com issuer=CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US
(21:53:48) nss: subject=CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US issuer=CN=DST Root CA X3,O=Digital Signature Trust Co.
(21:53:48) nss: partial certificate chain
(21:53:48) certificate/x509/tls_cached: Starting verify for api.messenger.klinkerapps.com
(21:53:48) certificate/x509/tls_cached: Checking for cached cert...
(21:53:48) certificate/x509/tls_cached: ...Found cached cert
(21:53:48) nss/x509: Loading certificate from /home/username/.purple/certificates/x509/tls_peers/api.messenger.klinkerapps.com
(21:53:48) certificate/x509/tls_cached: Peer cert matched cached
(21:53:48) nss/x509: Exporting certificate to /home/username/.purple/certificates/x509/tls_peers/api.messenger.klinkerapps.com
(21:53:48) util: Writing file /home/username/.purple/certificates/x509/tls_peers/api.messenger.klinkerapps.com
(21:53:48) nss: Trusting CN=api.messenger.klinkerapps.com
(21:53:48) certificate: Successfully verified certificate for api.messenger.klinkerapps.com
(21:53:48) http: Request 0x55d2a1eea880 performed without success.

>(Pidgin:6606):

 >Json-CRITICAL **: 21:53:48.946: json_object_get_string_member: assertion 'node != NULL' failed

>(Pidgin:6606): Json-CRITICAL **: 21:53:48.946: json_object_get_string_member: assertion 'node != NULL' failed

>(Pidgin:6606): Json-CRITICAL **: 21:53:48.946: json_object_get_string_member: assertion 'node != NULL' failed
dns[6612]: Oops, father has gone, wait for me, wait...!
Segmentation fault (core dumped)

Backtrace (password changed to password):

#0  0x00007ffff49815a1 in __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:62
#1  0x00007fffdd2d6c59 in pulsesms_got_login (http_conn=<optimized out>, response=<optimized out>, user_data=0x55555655a6f0) at libpulsesms.c:564
        psa = 0x55555655a6f0
        len = 42
        data = <optimized out>
        info = <optimized out>
        password = 0x5555563f41b0 "password"
        salt2 = 0x0
        DK = "\000\000\000\000\000\000\000\000\335\357Q\365\377\177\000\000\000\277IVUU\000\000\001\000\000\000\000\000\000"
        hash = <optimized out>
#2  0x00007fffdd2d989b in purple_http_connection_terminate (hc=0x5555563fc840) at purple2compat/http.c:1725
#3  0x00007fffdd2dbcb0 in _purple_http_recv_loopbody (hc=hc@entry=0x5555563fc840, fd=<optimized out>)
    at purple2compat/http.c:1293
        len = <optimized out>
        buf = "0\r\n\r\n\226\237a\022*\000\000\000\r\n-N-\312K\314MU\310/R(H,..\317/JQ\310\314K\316/*JM.Q\252\005\000\000\000\377\377\r\n28 Jan 2019 06:12:17 GMT\r\nConnection: keep-alive\r\nContent-Type: application/json; charset=utf-8\r\nVary: Accept-Encoding, Origin\r\nContent-Encoding: "...
        got_anything = <optimized out>
#4  0x00007fffdd2dc0b0 in _purple_http_recv (_hc=0x5555563fc840, fd=<optimized out>, cond=<optimized out>)
    at purple2compat/http.c:1304
        hc = 0x5555563fc840
#5  0x00005555555c955e in  ()
#6  0x00007ffff551e1f5 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ffff551e5c0 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007ffff551e8d2 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007ffff67d4a37 in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#10 0x000055555558f8a3 in main ()

Any help would be greatly appreciated, and if needed I will follow up with anything else that may be required to diagnose the problem.

EionRobb commented 5 years ago

Whoops, looks like I'm not correctly handling the case of when the username or password is incorrect.

I'll add some extra error-checking, but if you could double check your username and password and try again

flintparrell commented 5 years ago

And of course knowing my luck the problem was an incorrect login, but it's working now! Sorry to take up your time! Thank you for your help!

EionRobb commented 5 years ago

No problem at all, we should add in a check for bad username/password, rather than crashing :)

EionRobb commented 5 years ago

Thanks for reporting the crash. Hopefully the commit helps other people in the future :)