Menu

#2 Double Base64 encoding

open
nobody
None
5
2004-02-13
2004-02-13
No

The method AddItemBase64Str is converting its input
with MimeEncodeStringNoCRLF before passing it to
InternalAddItem.AsBase64Str. But it seems that
AsBase64Str involves already a mime encode operation
so that the original string is converted twice...

Anyway, AddItemBase64Str(s) and AddItemBase64Raw
(MimeEncodeStringNoCRLF(s)) are not equivalent.
Shouldn't they?

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Yes, this bug still live in version 2.0.

    detail:

    In unit "XmlRpcTypes.pas "
    1) Lines 731 : In "AddItembase64str" procedure ,suggest
    delete MimeEncodeString function
    2) Lines 490: In"SetAsBase64Str" ,suggest do
    MimeEncodeString function here .

    Any question please mailto me : hbliao@hotmail.com (MSN)

     
  • Nobody/Anonymous

    Logged In: NO

    This seems to fix it (probably it was just a typo on the author's part):

    procedure TRpcCustomArray.AddItemBase64Str(const Value: string);
    begin
    // InternalAddItem.AsBase64Str := MimeEncodeStringNoCRLF(Value); // double encoding -- bad!!!
    InternalAddItem.AsBase64Raw := MimeEncodeStringNoCRLF(Value);
    end;

    alfredNOSPAMPLEASEATsoftsciDOTcom.com

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.