mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 16:09:35 -05:00
prevent RS from making friends with your own location
This commit is contained in:
parent
558bb9f760
commit
42b8eccfd2
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>969</width>
|
<width>978</width>
|
||||||
<height>778</height>
|
<height>778</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -279,7 +279,11 @@
|
|||||||
<string><html><head/><body><p>Add selected item to collection one by one.</p><p>Select parent dir to add this too.</p><p><span style=" font-style:italic; vertical-align:sub;">&lt;Enter&gt;</span></p></body></html></string>
|
<string><html><head/><body><p>Add selected item to collection one by one.</p><p>Select parent dir to add this too.</p><p><span style=" font-style:italic; vertical-align:sub;">&lt;Enter&gt;</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">></string>
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/feedback_arrow.png</normaloff>:/images/feedback_arrow.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -301,7 +305,11 @@
|
|||||||
<string><html><head/><body><p>Add selected item to collection.</p><p>If a directory is selected, all of his children will be added.</p><p><span style=" text-decoration: underline; vertical-align:sub;">&lt;Shift + Enter&gt;</span></p></body></html></string>
|
<string><html><head/><body><p>Add selected item to collection.</p><p>If a directory is selected, all of his children will be added.</p><p><span style=" text-decoration: underline; vertical-align:sub;">&lt;Shift + Enter&gt;</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>>></string>
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../../../plugins/FeedReader/gui/FeedReader_images.qrc">
|
||||||
|
<normaloff>:/images/Update.png</normaloff>:/images/Update.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -323,7 +331,11 @@
|
|||||||
<string><html><head/><body><p>Remove selected item from collection.</p><p><span style=" font-style:italic; vertical-align:sub;">&lt;Del&gt;</span></p></body></html></string>
|
<string><html><head/><body><p>Remove selected item from collection.</p><p><span style=" font-style:italic; vertical-align:sub;">&lt;Del&gt;</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true"><</string>
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/deletemail24.png</normaloff>:/images/deletemail24.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -345,7 +357,11 @@
|
|||||||
<string><html><head/><body><p>Make a new directory in the collection.</p><p><span style=" font-style:italic; vertical-align:sub;">&lt;+&gt;</span></p></body></html></string>
|
<string><html><head/><body><p>Make a new directory in the collection.</p><p><span style=" font-style:italic; vertical-align:sub;">&lt;+&gt;</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>+</string>
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/directoryadd_24x24_shadow.png</normaloff>:/images/directoryadd_24x24_shadow.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -501,6 +517,7 @@
|
|||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
|
<include location="../../../../plugins/FeedReader/gui/FeedReader_images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -293,6 +293,15 @@ void ConnectFriendWizard::setCertificate(const QString &certificate, bool friend
|
|||||||
#ifdef FRIEND_WIZARD_DEBUG
|
#ifdef FRIEND_WIZARD_DEBUG
|
||||||
std::cerr << "ConnectFriendWizard got id : " << peerDetails.id << "; gpg_id : " << peerDetails.gpg_id << std::endl;
|
std::cerr << "ConnectFriendWizard got id : " << peerDetails.id << "; gpg_id : " << peerDetails.gpg_id << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if(peerDetails.id == rsPeers->getOwnId())
|
||||||
|
{
|
||||||
|
setField("errorMessage", tr("This is your own certificate! You would not want to make friend with yourself. Wouldn't you?") ) ;
|
||||||
|
error = false;
|
||||||
|
setStartId(Page_ErrorMessage);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
mCertificate = certificate.toUtf8().constData();
|
mCertificate = certificate.toUtf8().constData();
|
||||||
|
|
||||||
// Cyril: I disabled this because it seems to be not used anymore.
|
// Cyril: I disabled this because it seems to be not used anymore.
|
||||||
@ -304,6 +313,7 @@ void ConnectFriendWizard::setCertificate(const QString &certificate, bool friend
|
|||||||
setTitleText(ui->ConclusionPage, tr("Friend request"));
|
setTitleText(ui->ConclusionPage, tr("Friend request"));
|
||||||
ui->ConclusionPage->setSubTitle(tr("Details about the request"));
|
ui->ConclusionPage->setSubTitle(tr("Details about the request"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// error message
|
// error message
|
||||||
setField("errorMessage", tr("Certificate Load Failed") + ": \n\n" + getErrorString(cert_load_error_code)) ;
|
setField("errorMessage", tr("Certificate Load Failed") + ": \n\n" + getErrorString(cert_load_error_code)) ;
|
||||||
@ -435,6 +445,10 @@ void ConnectFriendWizard::initializePage(int id)
|
|||||||
break;
|
break;
|
||||||
case Page_Conclusion:
|
case Page_Conclusion:
|
||||||
{
|
{
|
||||||
|
if(peerDetails.id == rsPeers->getOwnId())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
bool peerIsHiddenNode = peerDetails.isHiddenNode ;
|
bool peerIsHiddenNode = peerDetails.isHiddenNode ;
|
||||||
bool amIHiddenNode = rsPeers->isHiddenNode(rsPeers->getOwnId()) ;
|
bool amIHiddenNode = rsPeers->isHiddenNode(rsPeers->getOwnId()) ;
|
||||||
|
|
||||||
@ -702,6 +716,13 @@ bool ConnectFriendWizard::validateCurrentPage()
|
|||||||
#ifdef FRIEND_WIZARD_DEBUG
|
#ifdef FRIEND_WIZARD_DEBUG
|
||||||
std::cerr << "ConnectFriendWizard got id : " << peerDetails.id << "; gpg_id : " << peerDetails.gpg_id << std::endl;
|
std::cerr << "ConnectFriendWizard got id : " << peerDetails.id << "; gpg_id : " << peerDetails.gpg_id << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if(peerDetails.id == rsPeers->getOwnId())
|
||||||
|
{
|
||||||
|
setField("errorMessage", tr("This is your own certificate! You would not want to make friend with yourself. Wouldn't you?") ) ;
|
||||||
|
error = false;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// error message
|
// error message
|
||||||
@ -735,6 +756,12 @@ bool ConnectFriendWizard::validateCurrentPage()
|
|||||||
#ifdef FRIEND_WIZARD_DEBUG
|
#ifdef FRIEND_WIZARD_DEBUG
|
||||||
std::cerr << "ConnectFriendWizard got id : " << peerDetails.id << "; gpg_id : " << peerDetails.gpg_id << std::endl;
|
std::cerr << "ConnectFriendWizard got id : " << peerDetails.id << "; gpg_id : " << peerDetails.gpg_id << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if(peerDetails.id == rsPeers->getOwnId())
|
||||||
|
{
|
||||||
|
setField("errorMessage", tr("This is your own certificate! You would not want to make friend with yourself. Wouldn't you?") ) ;
|
||||||
|
error = false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
setField("errorMessage", QString(tr("Certificate Load Failed:something is wrong with %1")).arg(fn) + " : " + getErrorString(cert_error_code));
|
setField("errorMessage", QString(tr("Certificate Load Failed:something is wrong with %1")).arg(fn) + " : " + getErrorString(cert_error_code));
|
||||||
error = false;
|
error = false;
|
||||||
|
@ -1618,8 +1618,8 @@ resources.</string>
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../icons.qrc"/>
|
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
|
<include location="../icons.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
Reference in New Issue
Block a user