mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-08-09 16:41:19 +02:00
2018-10-06 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'RDTextValidator' that failed to catch banned characters added to the interior of existing strings.
This commit is contained in:
parent
1b932c7b65
commit
96ad6ab21f
@ -16702,3 +16702,6 @@
|
||||
transition type set in rdadmin(1).
|
||||
2018-10-05 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Incremented the package version to 2.19.2int04.
|
||||
2018-10-06 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in 'RDTextValidator' that failed to catch banned
|
||||
characters added to the interior of existing strings.
|
||||
|
@ -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;i<banned_chars.size();i++) {
|
||||
if(banned_chars[i]==c) {
|
||||
if(input.contains(banned_chars.at(i))) {
|
||||
return QValidator::Invalid;
|
||||
}
|
||||
}
|
||||
|
@ -388,12 +388,12 @@ void ListClocks::renameData()
|
||||
old_name_esc.replace(" ","_");
|
||||
QString new_name_esc=new_name;
|
||||
new_name_esc.replace(" ","_");
|
||||
sql=QString().sprintf("alter table %s_CLK rename to %s_CLK",
|
||||
sql=QString().sprintf("alter table `%s_CLK` rename to `%s_CLK`",
|
||||
(const char *)old_name_esc,
|
||||
(const char *)new_name_esc);
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
sql=QString().sprintf("alter table %s_RULES rename to %s_RULES",
|
||||
sql=QString().sprintf("alter table `%s_RULES` rename to `%s_RULES`",
|
||||
(const char *)old_name_esc,
|
||||
(const char *)new_name_esc);
|
||||
q=new RDSqlQuery(sql);
|
||||
@ -404,8 +404,8 @@ void ListClocks::renameData()
|
||||
//
|
||||
sql=QString().sprintf("update CLOCK_PERMS set CLOCK_NAME=\"%s\"\
|
||||
where CLOCK_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;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user