Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Return a 404 when deleting unknown room alias #3889

Merged
merged 3 commits into from
Sep 18, 2018

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Sep 17, 2018

richvdh added a commit to matrix-org/sytest that referenced this pull request Sep 17, 2018
@richvdh richvdh requested a review from a team September 17, 2018 12:23
Copy link
Member

@erikjohnston erikjohnston left a comment

Choose a reason for hiding this comment

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

otherwise lgtm

@@ -320,7 +333,7 @@ def can_modify_alias(self, alias, user_id=None):
def _user_can_delete_alias(self, alias, user_id):
creator = yield self.store.get_room_alias_creator(alias.to_string())

if creator and creator == user_id:
if creator == user_id:
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this null check can be removed as the creator column was added at a later date, so there is not guarantee it'll exist.

@richvdh richvdh requested a review from a team September 18, 2018 08:49
@richvdh richvdh assigned erikjohnston and unassigned richvdh Sep 18, 2018
@richvdh richvdh merged commit 1e09a1d into develop Sep 18, 2018
@richvdh richvdh deleted the rav/404_on_remove_unknown_alias branch September 18, 2018 11:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants