[deps] Updated flask requirement

This commit is contained in:
Ferdinand Thiessen 2021-11-16 14:06:31 +01:00
parent 45ed9219a4
commit f1d973b446
2 changed files with 4 additions and 6 deletions

View File

@ -6,8 +6,7 @@ from typing import Optional
from flask_ldapconn import LDAPConn from flask_ldapconn import LDAPConn
from flask import current_app as app from flask import current_app as app
from ldap3.core.exceptions import LDAPPasswordIsMandatoryError, LDAPBindError from ldap3.core.exceptions import LDAPPasswordIsMandatoryError, LDAPBindError
from ldap3 import SUBTREE, MODIFY_REPLACE, MODIFY_ADD, MODIFY_DELETE, HASHED_SALTED_SHA from ldap3 import SUBTREE, MODIFY_REPLACE, MODIFY_ADD, MODIFY_DELETE
from ldap3.utils.hashed import hashed
from werkzeug.exceptions import BadRequest, InternalServerError, NotFound from werkzeug.exceptions import BadRequest, InternalServerError, NotFound
from flaschengeist import logger from flaschengeist import logger
@ -30,7 +29,6 @@ class AuthLDAP(AuthPlugin):
LDAP_TLS_VERSION=ssl.PROTOCOL_TLS, LDAP_TLS_VERSION=ssl.PROTOCOL_TLS,
FORCE_ATTRIBUTE_VALUE_AS_LIST=True, FORCE_ATTRIBUTE_VALUE_AS_LIST=True,
) )
logger.warning(app.config.get("LDAP_USE_SSL"))
if "ca_cert" in config: if "ca_cert" in config:
app.config["LDAP_CA_CERTS_FILE"] = config["ca_cert"] app.config["LDAP_CA_CERTS_FILE"] = config["ca_cert"]
else: else:
@ -242,7 +240,7 @@ class AuthLDAP(AuthPlugin):
password_hash = base64.b64encode(pbkdf2_hmac("sha512", password.encode("utf-8"), salt, rounds)).decode() password_hash = base64.b64encode(pbkdf2_hmac("sha512", password.encode("utf-8"), salt, rounds)).decode()
return f"{{PBKDF2-SHA512}}{rounds}${base64.b64encode(salt).decode()}${password_hash}" return f"{{PBKDF2-SHA512}}{rounds}${base64.b64encode(salt).decode()}${password_hash}"
else: else:
return hashed(HASHED_SALTED_SHA, password) return f"{{SSHA}}{base64.b64encode(sha1(password.encode() + salt).digest() + salt)}"
def _get_groups(self, uid): def _get_groups(self, uid):
groups = [] groups = []

View File

@ -33,9 +33,9 @@ setup(
scripts=["run_flaschengeist"], scripts=["run_flaschengeist"],
python_requires=">=3.7", python_requires=">=3.7",
install_requires=[ install_requires=[
"Flask >= 1.1", "Flask >= 2.0",
"toml", "toml",
"sqlalchemy>=1.4", "sqlalchemy>=1.4.26",
"flask_sqlalchemy>=2.5", "flask_sqlalchemy>=2.5",
"flask_cors", "flask_cors",
"Pillow>=8.4.0", "Pillow>=8.4.0",