Skip to content

Commit

Permalink
Apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasFella committed Sep 10, 2023
1 parent 7cc5954 commit 2a6b6a7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 609 deletions.
5 changes: 2 additions & 3 deletions Quotient/connectionencryptiondata_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,9 +590,8 @@ void ConnectionEncryptionData::handleQueryKeys(const QHash<QString, QHash<QStrin
// events so a small corner-cutting should be fine.
std::erase_if(pendingEncryptedEvents,
[this](const event_ptr_tt<EncryptedEvent>& pendingEvent) {
if (!isKnownCurveKey(
pendingEvent->fullJson()[SenderKey].toString(),
pendingEvent->contentPart<QString>(SenderKey)))
if (!isKnownCurveKey(pendingEvent->senderId(),
pendingEvent->senderKey()))
return false;
handleEncryptedToDeviceEvent(*pendingEvent);
return true;
Expand Down
4 changes: 2 additions & 2 deletions Quotient/keyverificationsession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ KeyVerificationSession::KeyVerificationSession(
, m_remoteSupportedMethods(event.methods())
{
if (connection->hasConflictingDeviceIdsAndCrossSigningKeys(m_remoteUserId)) {
qWarning() << "Remote user has conflicting device ids and cross signing keys and device ids; refusing to verify.";
qWarning() << "Remote user has conflicting device ids and cross signing keys; refusing to verify.";
return;
}
const auto& currentTime = QDateTime::currentDateTime();
Expand All @@ -78,7 +78,7 @@ KeyVerificationSession::KeyVerificationSession(QString userId, QString deviceId,
, m_encrypted(false)
{
if (connection->hasConflictingDeviceIdsAndCrossSigningKeys(m_remoteUserId)) {
qWarning() << "Remote user has conflicting device ids and cross signing keys and device ids; refusing to verify.";
qWarning() << "Remote user has conflicting device ids and cross signing keys; refusing to verify.";
return;
}
setupTimeout(600s);
Expand Down
Loading

0 comments on commit 2a6b6a7

Please sign in to comment.