aboutsummaryrefslogtreecommitdiff
path: root/app/Models/EntryDAO.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2020-11-23 23:04:06 +0100
committerGravatar GitHub <noreply@github.com> 2020-11-23 23:04:06 +0100
commit08a5cf594623879222d50568af36df053c1a6d82 (patch)
treef4d24ff728f83a081646a0a862edf659f2dec89c /app/Models/EntryDAO.php
parentfdf40c95b995934f991cf16e69f1615b9cbdfdd7 (diff)
Ensure maximum date int (#3259)
#fix https://github.com/FreshRSS/FreshRSS/issues/3258
Diffstat (limited to 'app/Models/EntryDAO.php')
-rw-r--r--app/Models/EntryDAO.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index a48cf7146..67ba84e75 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -109,6 +109,7 @@ SQL;
$valuesTmp['link'] = substr($valuesTmp['link'], 0, 1023);
$valuesTmp['link'] = safe_ascii($valuesTmp['link']);
$this->addEntryPrepared->bindParam(':link', $valuesTmp['link']);
+ $valuesTmp['date'] = min($valuesTmp['date'], 2147483647);
$this->addEntryPrepared->bindParam(':date', $valuesTmp['date'], PDO::PARAM_INT);
if (empty($valuesTmp['lastSeen'])) {
$valuesTmp['lastSeen'] = time();
@@ -203,6 +204,7 @@ SQL;
$valuesTmp['link'] = substr($valuesTmp['link'], 0, 1023);
$valuesTmp['link'] = safe_ascii($valuesTmp['link']);
$this->updateEntryPrepared->bindParam(':link', $valuesTmp['link']);
+ $valuesTmp['date'] = min($valuesTmp['date'], 2147483647);
$this->updateEntryPrepared->bindParam(':date', $valuesTmp['date'], PDO::PARAM_INT);
$valuesTmp['lastSeen'] = time();
$this->updateEntryPrepared->bindParam(':last_seen', $valuesTmp['lastSeen'], PDO::PARAM_INT);