mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-16 15:41:13 +02:00
2023-06-09 Fred Gleason <fredg@paravelsystems.com>
* Removed the '#define RD_DEFAULT_MAX_POST_LENGTH' statement from 'lib/rd.h'. * Added a '#define RD_MAX_POST_LENGTH' statement in 'lib/rd.h'. * Removed the 'RDSystem::maxPostLength()' and 'RDSystem::setMaxPostLength()' methods. * Removed the 'Maximum Remote Post Length' control from the 'System-Wide Settings' dialog in rdadmin(1). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
2
lib/rd.h
2
lib/rd.h
@@ -264,7 +264,7 @@
|
||||
/*
|
||||
* Default Maximum POST Length (bytes)
|
||||
*/
|
||||
#define RD_DEFAULT_MAX_POST_LENGTH 10000000
|
||||
#define RD_MAX_POST_LENGTH 2147483648
|
||||
|
||||
/*
|
||||
* Pause Time for Starting Daemons (secs)
|
||||
|
@@ -33,8 +33,7 @@
|
||||
|
||||
#include <rdformpost.h>
|
||||
|
||||
RDFormPost::RDFormPost(RDFormPost::Encoding encoding,int64_t maxsize,
|
||||
bool auto_delete)
|
||||
RDFormPost::RDFormPost(RDFormPost::Encoding encoding,bool auto_delete)
|
||||
{
|
||||
bool ok=false;
|
||||
|
||||
@@ -76,7 +75,7 @@ RDFormPost::RDFormPost(RDFormPost::Encoding encoding,int64_t maxsize,
|
||||
post_error=RDFormPost::ErrorMalformedData;
|
||||
return;
|
||||
}
|
||||
if((maxsize>0)&&(post_content_length>maxsize)) {
|
||||
if(post_content_length>RD_MAX_POST_LENGTH) {
|
||||
post_error=RDFormPost::ErrorPostTooLarge;
|
||||
return;
|
||||
}
|
||||
|
@@ -37,8 +37,7 @@ class RDFormPost
|
||||
enum Encoding {UrlEncoded=0,MultipartEncoded=1,AutoEncoded=2};
|
||||
enum Error {ErrorOk=0,ErrorNotPost=1,ErrorNoTempDir=2,ErrorMalformedData=3,
|
||||
ErrorPostTooLarge=4,ErrorInternal=5,ErrorNotInitialized=6};
|
||||
RDFormPost(RDFormPost::Encoding encoding,int64_t maxsize=0,
|
||||
bool auto_delete=true);
|
||||
RDFormPost(RDFormPost::Encoding encoding,bool auto_delete);
|
||||
~RDFormPost();
|
||||
RDFormPost::Error error() const;
|
||||
QHostAddress clientAddress() const;
|
||||
|
@@ -106,31 +106,6 @@ void RDSystem::setFixDuplicateCartTitles(bool state) const
|
||||
}
|
||||
|
||||
|
||||
int64_t RDSystem::maxPostLength() const
|
||||
{
|
||||
int64_t ret;
|
||||
|
||||
QString sql="select `MAX_POST_LENGTH` from `SYSTEM`";
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
ret=q->value(0).toLongLong();
|
||||
}
|
||||
else {
|
||||
ret=RD_DEFAULT_MAX_POST_LENGTH;
|
||||
}
|
||||
delete q;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void RDSystem::setMaxPostLength(int64_t bytes) const
|
||||
{
|
||||
QString sql=
|
||||
QString::asprintf("update `SYSTEM` set `MAX_POST_LENGTH`=%ld",bytes);
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
|
||||
|
||||
QString RDSystem::isciXreferencePath() const
|
||||
{
|
||||
return GetValue("ISCI_XREFERENCE_PATH").toString();
|
||||
@@ -260,7 +235,6 @@ QString RDSystem::xml() const
|
||||
xml+=RDXmlField("sampleRate",sampleRate());
|
||||
xml+=RDXmlField("duplicateTitles",allowDuplicateCartTitles());
|
||||
xml+=RDXmlField("fixDuplicateTitles",fixDuplicateCartTitles());
|
||||
xml+=RDXmlField("maxPostLength",maxPostLength());
|
||||
xml+=RDXmlField("isciXreferencePath",isciXreferencePath());
|
||||
xml+=RDXmlField("tempCartGroup",tempCartGroup());
|
||||
xml+=RDXmlField("longDateFormat",longDateFormat());
|
||||
|
@@ -36,8 +36,6 @@ class RDSystem
|
||||
void setAllowDuplicateCartTitles(bool state) const;
|
||||
bool fixDuplicateCartTitles() const;
|
||||
void setFixDuplicateCartTitles(bool state) const;
|
||||
int64_t maxPostLength() const;
|
||||
void setMaxPostLength(int64_t bytes) const;
|
||||
QString isciXreferencePath() const;
|
||||
void setIsciXreferencePath(const QString &str) const;
|
||||
QString originEmailAddress() const;
|
||||
|
Reference in New Issue
Block a user