added explicit options to including IP history and removed iP history from RS Links as it leaks information without users consent

This commit is contained in:
csoler 2018-10-20 17:48:36 +02:00
parent 259264897e
commit 7d21e74b29
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
6 changed files with 27 additions and 14 deletions

View File

@ -236,7 +236,7 @@ void GetStartedDialog::inviteFriends()
{
RsAutoUpdatePage::lockAllEvents();
cert = rsPeers->GetRetroshareInvite();
cert = rsPeers->GetRetroshareInvite(RsPeerId(),false,false);
RsAutoUpdatePage::unlockAllEvents() ;
}

View File

@ -562,7 +562,7 @@ RetroShareLink RetroShareLink::createCertificate(const RsPeerId& ssl_id)
} else {
link._type = TYPE_CERTIFICATE;
link._radix = QString::fromUtf8(rsPeers->GetRetroshareInvite(ssl_id,false).c_str());
link._radix = QString::fromUtf8(rsPeers->GetRetroshareInvite(ssl_id,false,false).c_str());
link._name = QString::fromUtf8(detail.name.c_str());
link._location = QString::fromUtf8(detail.location.c_str());
link._radix.replace("\n","");

View File

@ -1903,7 +1903,7 @@ bool FriendList::exportFriendlist(QString &fileName)
if (!rsPeers->getPeerDetails(*list_iter, detailSSL))
continue;
std::string certificate = rsPeers->GetRetroshareInvite(detailSSL.id, true);
std::string certificate = rsPeers->GetRetroshareInvite(detailSSL.id, true,true);
// remove \n from certificate
certificate.erase(std::remove(certificate.begin(), certificate.end(), '\n'), certificate.end());

View File

@ -94,6 +94,7 @@ ConfCertDialog::ConfCertDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidge
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(applyDialog()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
connect(ui._shouldAddSignatures_CB, SIGNAL(toggled(bool)), this, SLOT(loadInvitePage()));
connect(ui._includeIPHistory_CB, SIGNAL(toggled(bool)), this, SLOT(loadInvitePage()));
ui.avatar->setFrameType(AvatarWidget::NORMAL_FRAME);
@ -270,9 +271,14 @@ void ConfCertDialog::loadInvitePage()
// ui.userCertificateText_2->setFont(font);
// ui.userCertificateText_2->setText(QString::fromUtf8(pgp_key.c_str()));
std::string invite = rsPeers->GetRetroshareInvite(detail.id,ui._shouldAddSignatures_CB->isChecked()) ; // this needs to be a SSL id
std::string invite = rsPeers->GetRetroshareInvite(detail.id,
ui._shouldAddSignatures_CB->isChecked(),
ui._includeIPHistory_CB->isChecked()
) ;
QString infotext = getCertificateDescription(detail,ui._shouldAddSignatures_CB->isChecked(),true); // true, because default parameter in GetRetroshareInvite is true
QString infotext = getCertificateDescription(detail,ui._shouldAddSignatures_CB->isChecked(),
ui._includeIPHistory_CB->isChecked()
);
ui.userCertificateText->setToolTip(infotext) ;

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>1104</width>
<height>1086</height>
<height>1120</height>
</rect>
</property>
<property name="windowTitle">
@ -69,7 +69,7 @@
<item row="0" column="0">
<widget class="QTabWidget" name="stabWidget">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="icon">
@ -389,6 +389,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="_includeIPHistory_CB">
<property name="text">
<string>Include IP history</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
@ -414,12 +421,6 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>HeaderFrame</class>
<extends>QFrame</extends>
<header>gui/common/HeaderFrame.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>RSTextBrowser</class>
<extends>QTextBrowser</extends>
@ -431,6 +432,12 @@
<header>gui/common/AvatarWidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>HeaderFrame</class>
<extends>QFrame</extends>
<header>gui/common/HeaderFrame.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="../images.qrc"/>

View File

@ -92,7 +92,7 @@ void ProfileWidget::statusmessagedlg()
void ProfileWidget::copyCert()
{
std::string cert = rsPeers->GetRetroshareInvite();
std::string cert = rsPeers->GetRetroshareInvite(RsPeerId(),false,false);
if (cert.empty()) {
QMessageBox::information(this, tr("RetroShare"),
tr("Sorry, create certificate failed"),