Diff for /parser3/src/classes/string.C between versions 1.241 and 1.243

version 1.241, 2019/11/13 22:05:48 version 1.243, 2019/11/20 20:48:25
Line 701  static void _base64(Request& r, MethodPa Line 701  static void _base64(Request& r, MethodPa
                 Base64Options options = base64_decode_options(r, params.count() > 1 ? params.as_hash(1) : NULL);                  Base64Options options = base64_decode_options(r, params.count() > 1 ? params.as_hash(1) : NULL);
   
                 char* decoded=0;                  char* decoded=0;
                 size_t length=0;                  size_t length=pa_base64_decode(cstr, strlen(cstr), decoded, options);
   
                 pa_base64_decode(cstr, strlen(cstr), decoded, length, options);  
   
                 if(decoded && length){                  if(decoded && length){
                         if(memchr((const char*)decoded, 0, length))                          if(memchr(decoded, 0, length))
                                 throw Exception(PARSER_RUNTIME, 0, "Invalid \\x00 character found while decode to string. Decode it to file instead.");                                  throw Exception(PARSER_RUNTIME, 0, "Invalid \\x00 character found while decoding to string. Decode to file instead.");
   
                         fix_line_breaks(decoded, length);                          fix_line_breaks(decoded, length);
   
                         if(length)                          if(length)
                                 r.write(*new String(decoded, String::L_TAINTED));                                  r.write(*new String(decoded, String::L_TAINTED));
                 }                  }

Removed from v.1.241  
changed lines
  Added in v.1.243


E-mail: