TC incorrectly decodes XXE with trailing spaces in lines

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

TC incorrectly decodes XXE with trailing spaces in lines

Post by *MVV »

Just copy text from forum page to text files and try to decode. First and second ones TC will successfully decode, but not third one! Now delete trailing spaces at the end of lines from third file and try to decode - TC will decode it correctly!
Base64 wrote:MIME-Version: 1.0
Content-Type: application/octet-stream; name="TestFile.7z"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="TestFile.7z"

N3q8ryccAAOOpj6zJwAAAAAAAABaAAAAAAAAAMDWZUAAJBlJmG8WAoyLktVrywEc3aGe27pL8HOv
h2SJAXpq8Nvdt8wQDAABBAYAAQknAAcLAQABIwMBAQVdAAABAAwjAAgKAS1jB54AAAUBER0AVABl
AHMAdAAgAEYAaQBsAGUALgB0AHgAdAAAABQKAQAS9NJL+jbLARUGAQAgKAAAAAA=
UUE wrote:begin 644 TestFile.7z
M-WJ\KR<<``..ICZS)P````````!:`````````,#694``)!E)F&\6`HR+DM5K
MRP$<W:&>V[I+\'.OAV2)`7IJ\-O=M\P0#``!!`8``0DG``<+`0`!(P,!`05=
M```!``PC``@*`2UC!YX```4!$1T`5`!E`',`=``@`$8`:0!L`&4`+@!T`'@`
:=````!0*`0`2]-)+^C;+`14&`0`@*```````
`
end
sum -r/size 58539/161
XXE wrote:begin 644 TestFile.7z
hBrewfmQQ++CCdXun7k++++++++-O+++++++++A1KNI++7-Z7a4wK+cm9YhJf
hmk2QrO4Sqvd9w5CjVqG7+LdewBjRhwkE1++--+M++EYb++Q9+E+-6kA-+EJR
h+++-++kX++U8+GpX-ts+++I-2Fo+J+-Z+5A+R++U+2M+OE-g+4I+9U-o+5U+
OR++++-E8+E+GxB79yXP9+FI4+E+U8+++++++
+
end
sum -r/size 58539/161
I think if TC skips trailing spaces from two encodings of three, it should process third also in same way. :)

PS. Spaces are appended to lines by forum or browser, source text has no trailing spaces - you can see it in post source if you quote it.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed only UUE and MIME are currently supported with trailing spaces, sorry. I will try to add XXE too.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Thanks:)
User avatar
white
Power Member
Power Member
Posts: 4617
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: TC incorrectly decodes XXE with trailing spaces in lines

Post by *white »

MVV wrote: Now delete trailing spaces at the end of lines from third file and try to decode - TC will decode it correctly!
You only have to delete the trailing spaces at the first encoded line. If the first encoded line is OK, then trailing spaces or other trailing characters on the remaining lines won't matter.
MVV wrote:PS. Spaces are appended to lines by forum or browser
Looks like a browser issue. When I copy from IE 8 trailing spaces are included. However when I copy from Firefox 3.6 trailing spaces are not included.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: TC incorrectly decodes XXE with trailing spaces in lines

Post by *MVV »

white wrote:Looks like a browser issue. When I copy from IE 8 trailing spaces are included. However when I copy from Firefox 3.6 trailing spaces are not included.
It seems to be so. I tried to open same page in Opera and FF and copy same block of text - text from Opera has trailing spaces while text from FF has no trailing spaces. Anyway, TC may remove trailing spaces to keep user from such troubles. :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This fix was confirmed in the beta forum, thanks!
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Thank you for fix :)
Post Reply