This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Added possibilty to disable local password authentication#3485
Closed
smhaller wants to merge 4 commits into
Closed
Added possibilty to disable local password authentication#3485smhaller wants to merge 4 commits into
smhaller wants to merge 4 commits into
Conversation
Member
|
Can one of the admins verify this patch? |
1 similar comment
Member
|
Can one of the admins verify this patch? |
Member
|
@matrixbot: test this please |
richvdh
suggested changes
Jul 19, 2018
| if login_type == LoginType.PASSWORD: | ||
| known_login_type = True | ||
| if not self.hs.config.password_localdb: | ||
| raise LoginError(403, "Local DB Authentication Disabled", |
Member
There was a problem hiding this comment.
I'd let this fall through to the "unknown login type"/"Invalid password" code below. I don't think "Local DB Authentication Disabled" is a helpful message for users.
In other words, just change line 681 to be:
if login_type == LoginType.PASSWORD and self.hs.config.password_localdb:
| def read_config(self, config): | ||
| password_config = config.get("password_config", {}) | ||
| self.password_enabled = password_config.get("enabled", True) | ||
| self.password_localdb = password_config.get("localdb", True) |
Member
There was a problem hiding this comment.
can we call this password_localdb_enabled or something slightly more intuitive?
Member
|
(oh and please can you update your branch from latest |
Member
|
closing this pending requested changes |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dear all,
this is a small patch which provides the possibility to
this is useful for e.g.: If someone uses a password_provider (e.g. ldap) and does not want: