fix: reset_password security issue (#18363)
This commit is contained in:
parent
775dc47abe
commit
4247a6b807
4 changed files with 50 additions and 7 deletions
|
|
@ -210,3 +210,16 @@ def enterprise_license_required(view):
|
|||
return view(*args, **kwargs)
|
||||
|
||||
return decorated
|
||||
|
||||
|
||||
def email_password_login_enabled(view):
|
||||
@wraps(view)
|
||||
def decorated(*args, **kwargs):
|
||||
features = FeatureService.get_system_features()
|
||||
if features.enable_email_password_login:
|
||||
return view(*args, **kwargs)
|
||||
|
||||
# otherwise, return 403
|
||||
abort(403)
|
||||
|
||||
return decorated
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue