mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-11 09:03:40 +02:00
2017-02-21 Fred Gleason <fredg@paravelsystems.com>
* Modified 'lib/rdformpost.cpp' to use read-only accessors for std::map values. * Added a check for valid event IDs for the 'SaveLog' method in 'web/rdxport/logs.cpp'.
This commit is contained in:
@@ -266,9 +266,14 @@ void Xport::SaveLog()
|
||||
QDateTime datetime;
|
||||
QTime time;
|
||||
bool state;
|
||||
if(!xport_post->getValue(line+"_ID",&integer1)) {
|
||||
bool ok=false;
|
||||
|
||||
if(!xport_post->getValue(line+"_ID",&integer1,&ok)) {
|
||||
XmlExit("Missing "+line+"_ID",400);
|
||||
}
|
||||
if(!ok) {
|
||||
XmlExit("Invalid "+line+"_ID",400);
|
||||
}
|
||||
ll->setId(integer1);
|
||||
|
||||
if(!xport_post->getValue(line+"_TYPE",&integer1)) {
|
||||
@@ -452,5 +457,5 @@ void Xport::SaveLog()
|
||||
|
||||
logevt->save();
|
||||
|
||||
XmlExit("OK",200);
|
||||
XmlExit(QString().sprintf("OK Saved %d events",logevt->size()),200);
|
||||
}
|
||||
|
Reference in New Issue
Block a user