--- parser3/src/main/untaint.C 2015/10/26 01:21:59 1.170 +++ parser3/src/main/untaint.C 2026/10/01 11:46:20 1.181 @@ -1,11 +1,11 @@ /** @file Parser: String class part: untaint mechanizm. - Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) - Author: Alexandr Petrosian (http://paf.design.ru) + Copyright (c) 2001-2026 Art. Lebedev Studio (https://www.artlebedev.com) + Authors: Konstantin Morshnev , Alexandr Petrosian */ -volatile const char * IDENT_UNTAINT_C="$Id: untaint.C,v 1.170 2015/10/26 01:21:59 moko Exp $"; +volatile const char * IDENT_UNTAINT_C="$Id: untaint.C,v 1.181 2026/10/01 11:46:20 moko Exp $"; #include "pa_string.h" @@ -20,7 +20,7 @@ volatile const char * IDENT_UNTAINT_C="$ #include "pa_sapi.h" extern "C" { // author forgot to do that -#include "ec.h" +#include "../lib/cord/include/ec.h" } #include "pa_sql_connection.h" @@ -81,7 +81,7 @@ inline bool need_file_encode(unsigned ch return strchr( "*?\"<>|" #ifndef WIN32 - ":\\" + ":" // not allowed in windows file names; '\' is a path separator everywhere since #1300 #endif , c)!=0; } @@ -179,6 +179,25 @@ int append_fragment_nonoptimizing(char a return 0; // 0=continue } + +/** + appends to other String without language change +*/ + +String& String::append_to(String& dest) const { + if(is_empty()) + return dest; + + // first: fragment infos + dest.langs.appendHelper(dest.body, langs, body); + + // next: letters + dest.body<(to_lang)); // should never + SAPI::die("unknown untaint language #%d", static_cast(to_lang)); // should never break; // never }