From 36506ea1e8d17685451d613b1683f86dc5ef6ca4 Mon Sep 17 00:00:00 2001 From: csoler Date: Tue, 21 Apr 2015 19:03:46 +0000 Subject: [PATCH] added security 200 bytes limit on ID nicknames from getIdDetails git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8152 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/services/p3idservice.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libretroshare/src/services/p3idservice.cc b/libretroshare/src/services/p3idservice.cc index 575a11a77..15454e9dc 100644 --- a/libretroshare/src/services/p3idservice.cc +++ b/libretroshare/src/services/p3idservice.cc @@ -404,8 +404,11 @@ bool p3IdService:: getIdDetails(const RsGxsId &id, RsIdentityDetails &details) if (mPublicKeyCache.fetch(id, data)) { details = data.details; - details.mLastUsageTS = locked_getLastUsageTS(id) ; + + if(details.mNickname.length() > 200) + details.mNickname = "[too long a name]" ; + return true; }