From bdad0036f51eedadb791dd26f9ea2098ddab06c4 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Thu, 26 Sep 2019 00:00:22 +0200 Subject: [PATCH] sendMail check if from is own identity --- libretroshare/src/services/p3msgservice.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libretroshare/src/services/p3msgservice.cc b/libretroshare/src/services/p3msgservice.cc index 1d7ee8739..80081b160 100644 --- a/libretroshare/src/services/p3msgservice.cc +++ b/libretroshare/src/services/p3msgservice.cc @@ -1240,6 +1240,8 @@ uint32_t p3MsgService::sendMail( }; if(!pCheck(!from.isNull(), "from can't be null")) return false; + if(!pCheck( rsIdentity->isOwnId(from), + "from must be own identity") ) return false; if(!pCheck(!(to.empty() && cc.empty() && bcc.empty()), "You must specify at least one recipient" )) return false;