Skip to content

Refactor/endpoint encryptors and decryptors#433

Merged
imaTik0 merged 9 commits into
develfrom
refactor/endpoint_encryptors_and_decryptors
May 21, 2026
Merged

Refactor/endpoint encryptors and decryptors#433
imaTik0 merged 9 commits into
develfrom
refactor/endpoint_encryptors_and_decryptors

Conversation

@Uriagat

@Uriagat Uriagat commented May 20, 2026

Copy link
Copy Markdown
Member

No description provided.

@Uriagat Uriagat self-assigned this May 20, 2026
@Uriagat Uriagat marked this pull request as draft May 20, 2026 09:07
@Uriagat Uriagat marked this pull request as ready for review May 20, 2026 12:15
@Uriagat Uriagat requested a review from imaTik0 May 20, 2026 12:16

@imaTik0 imaTik0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In every mapper (ThreadDataSchemaMapper.cpp, StoreDataSchemaMapper.cpp, InboxDataSchemaMapper.cpp, KvdbDataSchemaMapper.cpp, MessageDataSchemaMapper.cpp, StreamRoomDataSchemaMapper.cpp) the decrypt + deduplication loop catches only core::Exception:

} catch (const core::Exception& e) {
result[i] = toLibThread(thread, {}, {}, e.getCode(), ThreadDataSchema::Version::UNKNOWN);
}
The previous code had three levels (core::Exception, privmx::utils::PrivmxException, (...)). If keyMapIt->second.at(keyId) throws std::out_of_range (a single missing keyId inside the batch), or anything from a lower-level library throws something other than core::Exception, the whole batch blows up instead of marking just that one record as failed.

Comment thread endpoint/thread/src/encryptors/thread/ThreadDataSchemaStrategyV5.cpp Outdated
Comment thread endpoint/inbox/src/encryptors/inbox/InboxDataSchemaMapper.cpp
Comment thread endpoint/thread/src/encryptors/thread/ThreadDataSchemaMapper.cpp Outdated
@imaTik0 imaTik0 merged commit 0137dc3 into devel May 21, 2026
1 of 2 checks passed
@Uriagat Uriagat deleted the refactor/endpoint_encryptors_and_decryptors branch May 29, 2026 10:57
djenczewski pushed a commit that referenced this pull request Jun 11, 2026
* feat: IDecryptStrategy

* refactor: added DataStrategy for thread module and removed unused V1, V2, V3 formats

* refactor: added DataStrategy for store module and removed unused V1, V2, V3 formats

* refactor: added DataStrategy for inbox module

* refactor: added DataStrategy for kvdb module

* refactor: added DataStrategy for event module and removed unused V1

* refactor: added DataStrategy for stream module

* refactor: formating

* fix: post review changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants