diff --git a/lib/FeedItem.php b/lib/FeedItem.php index b0095be28d5..9a435730730 100644 --- a/lib/FeedItem.php +++ b/lib/FeedItem.php @@ -418,6 +418,9 @@ public function setUid($uid) { if(!is_string($uid)) { Debug::log('Unique id must be a string!'); + } elseif (preg_match('/^[a-f0-9]{40}$/', $uid)) { + // keep id if it already is a SHA-1 hash + $this->uid = $uid; } else { $this->uid = sha1($uid); }