Skip to content

OlmEncryption.encryptMessage(): devices can be null #2372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ShadowJonathan opened this issue May 16, 2022 · 0 comments
Open

OlmEncryption.encryptMessage(): devices can be null #2372

ShadowJonathan opened this issue May 16, 2022 · 0 comments

Comments

@ShadowJonathan
Copy link
Contributor

This came up while iterating #2137;

In OlmEncryption.encryptMessage, when iterating over devices per user, the function calls getStoredDevicesForUser, which can return null.

This does not throw an error, as any comparison operation with undefined is false.

const devices = this.crypto.getStoredDevicesForUser(userId);

(Looking further into the code, I'm not sure if this is a real bug, or if this is (accidental) intended behavior.)

@github-actions github-actions bot added the Stale label Feb 7, 2025
@RiotRobot RiotRobot removed the Stale label Feb 8, 2025
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

No branches or pull requests

2 participants