prakash78456 / gtalksms

Automatically exported from code.google.com/p/gtalksms
0 stars 0 forks source link

Invalid checking of notification address when from address is a bare JID #300

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Setup GTalkSMS
2. Set a notification address
3. Try to send commands from the notification address

What is the expected output?
The commands get processed 

What do you see instead?
Nothing

Additional informations:
Phone model: HTC Desire Z ICS CM9

At the bottom of the attached log file are three lines that indicate whats 
going wrong

Original issue reported on code.google.com by freund.p...@googlemail.com on 14 Oct 2012 at 9:31

GoogleCodeExporter commented 8 years ago
The log file was not submittetd correctly, sorry

Original comment by freund.p...@googlemail.com on 14 Oct 2012 at 9:32

Attachments:

GoogleCodeExporter commented 8 years ago
Hello

Do you still have the issue?
By checking logs you have a lot of issue at startup of the application. It 
might be related.

Original comment by Florent....@gmail.com on 26 Jan 2013 at 3:43

GoogleCodeExporter commented 8 years ago
Hello,

i just installed the new version, and unfortunately it didn't resolve the 
error. But there are no other errors in the log file. 

I looked at the code and I'm not a java programmer but in file 
xmpp/ChatPacketListener.java there is a function call to 
mSettings.startWithNotifiedAddress(from) in SettingsManager.java. The function 
automatically appends a '/' at the end of the notification address to compare 
and it seems it assumes that the from attribute of the package is a full JID. 
In RFC6120 section 8.1.2.1 number 1 it states that the server can set the from 
attribute to the full JID or the bare JID.

I don't know if this causes the issue but I think it could help.

Thanks for looking at this :)

Original comment by freund.p...@googlemail.com on 26 Jan 2013 at 4:47

Attachments:

GoogleCodeExporter commented 8 years ago
Looking at it again, this should be the issue in my case, in 
xmpp/ChatPacketListener.java - processPacket the output is from.toLowerCase() 
for the packet address and TextUtils.join("|", 
mSettings.getNotifiedAddresses()) for the settings address. The from JID that 
is supplied to mSettings.startWithNotifiedAddress and the from address that is 
supplied to the log function match (except the toLowerCase()). 

The Log file states: 

XMPP packet received - but from address "bigwookie@lvl3.org" does not match 
notification address "bigwookie@lvl3.org

So none of both addresses have a '/' at the end, neither the one from the 
settings nor the one from the package. but in 
mSettings.startWithNotifiedAddress there is a '/' appended to the address from 
the settings, and so it does not match

Original comment by freund.p...@googlemail.com on 26 Jan 2013 at 5:11

GoogleCodeExporter commented 8 years ago

Original comment by fschm...@gmail.com on 26 Jan 2013 at 6:14

GoogleCodeExporter commented 8 years ago

Original comment by fschm...@gmail.com on 26 Jan 2013 at 6:43

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 3e103c65b4c3.

Original comment by fschm...@gmail.com on 26 Jan 2013 at 6:56

GoogleCodeExporter commented 8 years ago
New version 4.4 Beta 1 is available in the download section

Original comment by Florent....@gmail.com on 16 Feb 2013 at 9:47

GoogleCodeExporter commented 8 years ago
Thanks, had already compiled it myself ;) You did a nice job overall :)

Original comment by freund.p...@googlemail.com on 16 Feb 2013 at 9:49

GoogleCodeExporter commented 8 years ago
Fixed in 4.4

Original comment by Florent....@gmail.com on 15 Sep 2013 at 3:27