diff --git a/ChangeLog b/ChangeLog index c6aba459..f40bd487 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19847,3 +19847,6 @@ * Added a 'cmdline_parser_test' test harness. * Fixed a bug in 'RDCmdSwitch' that caused value-only arguments containing '=' characters to be incorrectly parsed. +2020-05-23 Fred Gleason + * Fixed a bug in 'RDFormPost' that caused an error when processing + multipart-mime submissions containing '=' characters. diff --git a/lib/rdformpost.cpp b/lib/rdformpost.cpp index 63553bfd..94013265 100644 --- a/lib/rdformpost.cpp +++ b/lib/rdformpost.cpp @@ -489,7 +489,13 @@ void RDFormPost::LoadUrlEncoding(char first) post_data[post_content_length]=0; lines=QString(post_data).split("&"); for(int i=0;i2) { + line.removeLast(); + } switch(line.size()) { case 1: post_values[line[0]]=""; @@ -572,14 +578,19 @@ bool RDFormPost::GetMimePart(QString *name,QString *value,bool *is_file) // Headers // do { - // line=post_text_reader->readLine(); line=QString::fromUtf8(GetLine()); QStringList f0=line.split(":"); if(f0.size()==2) { if(f0[0].lower()=="content-disposition") { QStringList f1=f0[1].split(";"); for(int i=0;i2) { + f2.removeLast(); + } if(f2.size()==2) { if(f2[0]=="name") { *name=f2[1].replace("\"","");