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

Disable registration by default. Add script to register new users. #109

Merged
merged 13 commits into from
Mar 18, 2015

Conversation

erikjohnston
Copy link
Member

Also implements a non-standard registration type that uses shared secret.

})
else:
raise SynapseError(
400, "HMAC incorrect",
Copy link
Member

Choose a reason for hiding this comment

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

This seems like it should be a 403 to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ooh, good spot.

def _do_shared_secret(self, request, register_json, session):
yield run_on_reactor()

if "mac" not in register_json:
Copy link
Member

Choose a reason for hiding this comment

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

Given register_json is just a dict from JSON, users may not be setting the right types of these keys. We should be type checking here, which we can actually do in one fell swoop with checking for the existence of keys by doing isinstance(register_json.get("mac"), basestring)

@kegsay
Copy link
Member

kegsay commented Mar 16, 2015

LGTM other than in-line comments.

@kegsay
Copy link
Member

kegsay commented Mar 18, 2015

LGTM

erikjohnston added a commit that referenced this pull request Mar 18, 2015
Disable registration by default. Add script to register new users.
@erikjohnston erikjohnston merged commit ed4d44d into develop Mar 18, 2015
@erikjohnston erikjohnston deleted the default_registration branch April 27, 2015 14:22
babolivier added a commit that referenced this pull request Nov 8, 2021
This was due to dh-virtualenv builds being broken due to Shpinx removing
deprecated APIs.

Co-authored-by: Erik Johnston <erik@matrix.org>
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