TReKiE / msnp-sharp

Automatically exported from code.google.com/p/msnp-sharp
0 stars 0 forks source link

UrlDecode in MSNPSharp.MSNObject.ParseContext() resulting in mangled MSNObject SHA1D property #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Cause an MSNObject with a property containing a URL decodable character 
(such as a plus sign) to be sent to MSNPSharp.

What is the expected output? What do you see instead?

The expected output is an xml string correctly representing the received 
data. Instead, a seemingly unneeded UrlDecode is being performed on the xml 
string, resulting in xml containing decodable characters to become 
incorrectly converted.

What version of the product are you using? On what operating system?
Version 205 stable on Windows XP Pro.

Please provide any additional information below.
I finally narrowed this one down when I noticed that seemingly random 
MSNObject's weren't being recognized by other clients. In my case, the 
MSNObject that wasn't being recognized had a SHA1D containing a plus (+) 
character which was being converted to a space. On my local copy of the 
source, I have commented out the UrlDecode in 
MSNPSharp.MSNObject.ParseContext() such that:

            string xmlString = 
System.Web.HttpUtility.UrlDecode(context);            
            MatchCollection matches  = 
contextRe.Matches(xmlString);

becomes:

            //string xmlString = 
System.Web.HttpUtility.UrlDecode(context);            
            MatchCollection matches  = 
contextRe.Matches(context);

FYI, I'm not sure if there is some situation where the string is expected 
to come into the function encoded, but simply commenting the decode out 
seems to be working fine for me so far.

Original issue reported on code.google.com by its....@gmail.com on 31 Oct 2008 at 1:31

GoogleCodeExporter commented 9 years ago
Users who are using WLM14 will send such encoded msnobjects.
Fixed.

Original comment by freezing...@gmail.com on 31 Oct 2008 at 7:45

GoogleCodeExporter commented 9 years ago

Original comment by hepha...@gmail.com on 18 Nov 2008 at 9:17

GoogleCodeExporter commented 9 years ago

Original comment by hepha...@gmail.com on 23 Jan 2009 at 5:41