set max GxsId nickname size to some arbitrary value to avoid crazy long nicknames crafted to break the GUI. This should also be checked when de-serialising groups at a wider scale for group names in general

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8125 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-04-09 19:53:01 +00:00
parent f4cd4dbdb0
commit 2f2d01dc41
4 changed files with 19 additions and 7 deletions

View file

@ -390,7 +390,7 @@ bool IdDialog::fillIdListItem(const RsGxsIdGroup& data, QTreeWidgetItem *&item,
if (!item)
item = new QTreeWidgetItem();
item->setText(RSID_COL_NICKNAME, QString::fromUtf8(data.mMeta.mGroupName.c_str()));
item->setText(RSID_COL_NICKNAME, QString::fromUtf8(data.mMeta.mGroupName.c_str()).left(RSID_MAXIMUM_NICKNAME_SIZE));
item->setText(RSID_COL_KEYID, QString::fromStdString(data.mMeta.mGroupId.toStdString()));
item->setData(RSID_COL_KEYID, Qt::UserRole,QVariant(item_flags)) ;