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

MSC2181: Add an Error Code for Signaling a Deactivated User #2181

Merged
merged 12 commits into from
Jul 31, 2019
15 changes: 8 additions & 7 deletions proposals/2181-user-deactivated-errcode.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,25 @@ requests.

This proposal asks to create a new errcode, `M_USER_DEACTIVATED`, that can be
anoadragon453 marked this conversation as resolved.
Show resolved Hide resolved
returned whenever an action is attempted that requires an activited user, but
anoadragon453 marked this conversation as resolved.
Show resolved Hide resolved
the authenticating user is deactivated. The recommended HTTP code to return
alongside is `403`.
the authenticating user is deactivated. The HTTP code to return alongside is
`403`.
Half-Shot marked this conversation as resolved.
Show resolved Hide resolved

## Tradeoffs
anoadragon453 marked this conversation as resolved.
Show resolved Hide resolved

The alternative is to continue returning an `M_FORBIDDEN`, but send back a
different errmsg. This is undesirable as it requires clients to pattern match
on a long phrase that could be minutely changed at any time, breaking
everything.
different errmsg. This is undesirable as clients are supposed to treat the
anoadragon453 marked this conversation as resolved.
Show resolved Hide resolved
message as an opaque string, and should not be performing any
pattern-matching on it.

## Potential issues

None

## Security considerations
turt2live marked this conversation as resolved.
Show resolved Hide resolved

This would allow users to be able to detect if their account had been
deactivated. This is probably something we'd like to allow though.
While the existence of a user was already public knowledge (one can check if
the User ID is available through `/register`, this proposal would allow any
anoadragon453 marked this conversation as resolved.
Show resolved Hide resolved
user to be able to detect if a registered account has been deactivated.

## Conclusion

Expand Down