Skip to content
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

groups: don't crash during "can read" on-peek #3349

Merged
merged 1 commit into from
Mar 19, 2024
Merged

Conversation

Fang-
Copy link
Member

@Fang- Fang- commented Mar 18, 2024

The scry endpoints for a group's channels' permission checks would crash if the channel did not exist in that group. In cases where the channel was deleted, other agents might still know about the channel, and so still try to ask the group about relevant permissions, but the scry handling would crash.

Here we update the scry logic to not crash, and instead produce a "not allowed to read" flag in cases where the asked-about channel doesn't exist in the group.

We suspect this will ameliorate at least some of the problems seen around role modifications and permission rechecks, as this crashing scry was causing group fact handling to crash, causing locally-originating kicks, causing resubscribes. Don't get your hopes up.

The scry endpoints for a group's channels' permission checks would crash
if the channel did not exist in that group. In cases where the channel
was deleted, other agents might still know about the channel, and so
still try to ask the group about relevant permissions, but the scry
handling would crash.

Here we update the scry logic to not crash, and instead produce a "not
allowed to read" flag in cases where the asked-about channel doesn't
exist in the group.

We suspect this will ameliorate at least some of the problems seen
around role modifications and permission rechecks, as this crashing scry
was causing group fact handling to crash, causing locally-originating
kicks, causing resubscribes.
@Fang- Fang- added the groups label Mar 18, 2024
@Fang- Fang- requested a review from arthyn March 18, 2024 21:11
Copy link
Member

@arthyn arthyn left a comment

Choose a reason for hiding this comment

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

lgtm

@arthyn arthyn merged commit 579af89 into develop Mar 19, 2024
1 check passed
@arthyn arthyn deleted the m/cannot-read-missing branch March 19, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants