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

Already on GitHub? Sign in to your account

Add an admin option to shared secret registration (breaks backwards compat) #909

Merged
merged 6 commits into from Jul 6, 2016

Conversation

Projects
None yet
2 participants
Owner

erikjohnston commented Jul 5, 2016

No description provided.

erikjohnston added some commits Jul 5, 2016

erikjohnston added some commits Jul 5, 2016

@NegativeMjark NegativeMjark and 1 other commented on an outdated diff Jul 6, 2016

synapse/rest/client/v1/register.py
digestmod=sha1,
- ).hexdigest()
-
- password = register_json["password"].encode("utf-8")
+ )
+ want_mac.update(user)
+ want_mac.update(password)
+ want_mac.update("admin" if admin else "notadmin")
@NegativeMjark

NegativeMjark Jul 6, 2016

Contributor

What happens if someone creates a user with password = "password" and admin=False and then someone nicks their mac and registers a user with password = "passwordnot" and admin=True?

@NegativeMjark

NegativeMjark Jul 6, 2016

Contributor

Similar thoughts on shifting characters between the "user" and "password" fields.

@erikjohnston

erikjohnston Jul 6, 2016

Owner

Yeah, leo just brought that up in the sytest PR. I've added null separators, which I think makes it fine?

@erikjohnston erikjohnston referenced this pull request in matrix-org/sytest Jul 6, 2016

Merged

Test registering via shared secret #259

Contributor

NegativeMjark commented Jul 6, 2016

Looks like it might work.

@erikjohnston erikjohnston merged commit f0c06ac into develop Jul 6, 2016

10 checks passed

Flake8 + Packaging (Commit) Build #1109 origin/erikj/shared_secret succeeded in 34 sec
Details
Flake8 + Packaging (Merged PR) Build finished.
Details
Sytest Dendron (Commit) Build #224 origin/erikj/shared_secret succeeded in 6 min 14 sec
Details
Sytest Dendron (Merged PR) Build finished.
Details
Sytest Postgres (Commit) Build #1064 origin/erikj/shared_secret succeeded in 5 min 38 sec
Details
Sytest Postgres (Merged PR) Build finished.
Details
Sytest SQLite (Commit) Build #1082 origin/erikj/shared_secret succeeded in 5 min 41 sec
Details
Sytest SQLite (Merged PR) Build finished.
Details
Unit Tests (Commit) Build #1148 origin/erikj/shared_secret succeeded in 1 min 31 sec
Details
Unit Tests (Merged PR) Build finished.
Details

@richvdh richvdh deleted the erikj/shared_secret branch Dec 1, 2016

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