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

Return a 404 when deleting unknown room alias #3889

Merged
merged 3 commits into from Sep 18, 2018

Conversation

Projects
None yet
2 participants
@richvdh
Member

richvdh commented Sep 17, 2018

richvdh added some commits 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 matrix-org/synapse-core Sep 17, 2018

@erikjohnston

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:

This comment has been minimized.

@erikjohnston

erikjohnston Sep 17, 2018

Member

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 matrix-org/synapse-core Sep 18, 2018

@richvdh richvdh assigned erikjohnston and unassigned richvdh Sep 18, 2018

@richvdh richvdh merged commit 1e09a1d into develop Sep 18, 2018

14 checks passed

Synapse Sytest Postgres (Commit) Build #7059 origin/rav/404_on_remove_unknown_alias succeeded in 6 min 13 sec
Details
Synapse Sytest Postgres (Merged PR) Build finished.
Details
Synapse Sytest SQLite (Commit) Build #7272 origin/rav/404_on_remove_unknown_alias succeeded in 3 min 47 sec
Details
Synapse Sytest SQLite (Merged PR) Build finished.
Details
ci/circleci: sytestpy2 Your tests passed on CircleCI!
Details
ci/circleci: sytestpy2merged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy2postgres Your tests passed on CircleCI!
Details
ci/circleci: sytestpy2postgresmerged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy3 Your tests passed on CircleCI!
Details
ci/circleci: sytestpy3merged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy3postgres Your tests passed on CircleCI!
Details
ci/circleci: sytestpy3postgresmerged Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@richvdh richvdh deleted the rav/404_on_remove_unknown_alias branch Sep 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment