diff --git a/ChangeLog b/ChangeLog index 9f7d6574..85768cb5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16702,3 +16702,6 @@ transition type set in rdadmin(1). 2018-10-05 Fred Gleason * Incremented the package version to 2.19.2int04. +2018-10-06 Fred Gleason + * Fixed a bug in 'RDTextValidator' that failed to catch banned + characters added to the interior of existing strings. diff --git a/lib/rdtextvalidator.cpp b/lib/rdtextvalidator.cpp index 22fe4e24..d2efe56f 100644 --- a/lib/rdtextvalidator.cpp +++ b/lib/rdtextvalidator.cpp @@ -37,10 +37,8 @@ QValidator::State RDTextValidator::validate(QString &input,int &pos) const if(input.length()==0) { return QValidator::Acceptable; } - int inspection_pos=std::max(0,std::min((int)input.length()-1,pos)); - char c=input.at(inspection_pos).latin1(); for(unsigned i=0;itext(0)); + (const char *)RDEscapeString(new_name), + (const char *)RDEscapeString(item->text(0))); q=new RDSqlQuery(sql); delete q; @@ -413,8 +413,8 @@ void ListClocks::renameData() // Rename Primary Key // sql=QString().sprintf("update CLOCKS set NAME=\"%s\" where NAME=\"%s\"", - (const char *)new_name, - (const char *)item->text(0)); + (const char *)RDEscapeString(new_name), + (const char *)RDEscapeString(item->text(0))); q=new RDSqlQuery(sql); delete q;