mirror of
https://github.com/optim-enterprises-bv/Mailu-OIDC.git
synced 2025-10-30 17:47:54 +00:00
Update all dependencies.
All changes were recreated due to deprecated functionalities introduced by updating the dependencies
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,6 +5,7 @@ pip-selfcheck.json
|
|||||||
/core/admin/lib*
|
/core/admin/lib*
|
||||||
/core/admin/bin
|
/core/admin/bin
|
||||||
/core/admin/include
|
/core/admin/include
|
||||||
|
/core/base/.venv
|
||||||
/docs/lib*
|
/docs/lib*
|
||||||
/docs/bin
|
/docs/bin
|
||||||
/docs/include
|
/docs/include
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ def create_app_from_config(config):
|
|||||||
models.db.init_app(app)
|
models.db.init_app(app)
|
||||||
utils.session.init_app(app)
|
utils.session.init_app(app)
|
||||||
utils.limiter.init_app(app)
|
utils.limiter.init_app(app)
|
||||||
utils.babel.init_app(app)
|
utils.babel.init_app(app, locale_selector=utils.get_locale)
|
||||||
utils.login.init_app(app)
|
utils.login.init_app(app)
|
||||||
utils.login.user_loader(models.User.get)
|
utils.login.user_loader(models.User.get)
|
||||||
utils.proxy.init_app(app)
|
utils.proxy.init_app(app)
|
||||||
@@ -52,13 +52,14 @@ def create_app_from_config(config):
|
|||||||
app.truncated_pw_key = hmac.new(bytearray(app.secret_key, 'utf-8'), bytearray('TRUNCATED_PW_KEY', 'utf-8'), 'sha256').digest()
|
app.truncated_pw_key = hmac.new(bytearray(app.secret_key, 'utf-8'), bytearray('TRUNCATED_PW_KEY', 'utf-8'), 'sha256').digest()
|
||||||
|
|
||||||
# Initialize list of translations
|
# Initialize list of translations
|
||||||
app.config.translations = {
|
with app.app_context():
|
||||||
str(locale): locale
|
app.config.translations = {
|
||||||
for locale in sorted(
|
str(locale): locale
|
||||||
utils.babel.list_translations(),
|
for locale in sorted(
|
||||||
key=lambda l: l.get_language_name().title()
|
utils.babel.list_translations(),
|
||||||
)
|
key=lambda l: l.get_language_name().title()
|
||||||
}
|
)
|
||||||
|
}
|
||||||
|
|
||||||
# Initialize debugging tools
|
# Initialize debugging tools
|
||||||
if app.config.get("DEBUG"):
|
if app.config.get("DEBUG"):
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import flask_debugtoolbar
|
#Note: Currently flask_debugtoolbar is not compatible with flask.
|
||||||
|
#import flask_debugtoolbar
|
||||||
|
|
||||||
from werkzeug.middleware.profiler import ProfilerMiddleware
|
from werkzeug.middleware.profiler import ProfilerMiddleware
|
||||||
|
|
||||||
|
|
||||||
# Debugging toolbar
|
# Debugging toolbar
|
||||||
toolbar = flask_debugtoolbar.DebugToolbarExtension()
|
#toolbar = flask_debugtoolbar.DebugToolbarExtension()
|
||||||
|
|
||||||
|
|
||||||
# Profiler
|
# Profiler
|
||||||
|
|||||||
@@ -100,7 +100,6 @@ def is_ip_in_subnet(ip, subnets=[]):
|
|||||||
# Application translation
|
# Application translation
|
||||||
babel = flask_babel.Babel()
|
babel = flask_babel.Babel()
|
||||||
|
|
||||||
@babel.localeselector
|
|
||||||
def get_locale():
|
def get_locale():
|
||||||
""" selects locale for translation """
|
""" selects locale for translation """
|
||||||
if not app.config['SESSION_COOKIE_NAME'] in flask.request.cookies:
|
if not app.config['SESSION_COOKIE_NAME'] in flask.request.cookies:
|
||||||
@@ -310,7 +309,7 @@ class MailuSessionConfig:
|
|||||||
# default size of session key parts
|
# default size of session key parts
|
||||||
uid_bits = 64 # default if SESSION_KEY_BITS is not set in config
|
uid_bits = 64 # default if SESSION_KEY_BITS is not set in config
|
||||||
sid_bits = 128 # for now. must be multiple of 8!
|
sid_bits = 128 # for now. must be multiple of 8!
|
||||||
time_bits = 32 # for now. must be multiple of 8!
|
time_bits = 32 # for now. must be multiple of 8!
|
||||||
|
|
||||||
def __init__(self, app=None):
|
def __init__(self, app=None):
|
||||||
|
|
||||||
@@ -400,7 +399,7 @@ class MailuSessionInterface(SessionInterface):
|
|||||||
if session.modified:
|
if session.modified:
|
||||||
session.delete()
|
session.delete()
|
||||||
response.delete_cookie(
|
response.delete_cookie(
|
||||||
app.session_cookie_name,
|
app.config['SESSION_COOKIE_NAME'],
|
||||||
domain=self.get_cookie_domain(app),
|
domain=self.get_cookie_domain(app),
|
||||||
path=self.get_cookie_path(app),
|
path=self.get_cookie_path(app),
|
||||||
)
|
)
|
||||||
@@ -413,7 +412,7 @@ class MailuSessionInterface(SessionInterface):
|
|||||||
# save session and update cookie if necessary
|
# save session and update cookie if necessary
|
||||||
if session.save():
|
if session.save():
|
||||||
response.set_cookie(
|
response.set_cookie(
|
||||||
app.session_cookie_name,
|
app.config['SESSION_COOKIE_NAME'],
|
||||||
session.sid,
|
session.sid,
|
||||||
expires=datetime.now()+timedelta(seconds=app.config['PERMANENT_SESSION_LIFETIME']),
|
expires=datetime.now()+timedelta(seconds=app.config['PERMANENT_SESSION_LIFETIME']),
|
||||||
httponly=self.get_cookie_httponly(app),
|
httponly=self.get_cookie_httponly(app),
|
||||||
@@ -473,29 +472,30 @@ class MailuSessionExtension:
|
|||||||
def init_app(self, app):
|
def init_app(self, app):
|
||||||
""" Replace session management of application. """
|
""" Replace session management of application. """
|
||||||
|
|
||||||
|
redis_session = False
|
||||||
|
|
||||||
if app.config.get('MEMORY_SESSIONS'):
|
if app.config.get('MEMORY_SESSIONS'):
|
||||||
# in-memory session store for use in development
|
# in-memory session store for use in development
|
||||||
app.session_store = DictStore()
|
app.session_store = DictStore()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# redis-based session store for use in production
|
# redis-based session store for use in production
|
||||||
|
redis_session = True
|
||||||
app.session_store = RedisStore(
|
app.session_store = RedisStore(
|
||||||
redis.StrictRedis().from_url(app.config['SESSION_STORAGE_URL'])
|
redis.StrictRedis().from_url(app.config['SESSION_STORAGE_URL'])
|
||||||
)
|
)
|
||||||
|
|
||||||
|
app.session_config = MailuSessionConfig(app)
|
||||||
|
app.session_interface = MailuSessionInterface()
|
||||||
|
if redis_session:
|
||||||
# clean expired sessions once on first use in case lifetime was changed
|
# clean expired sessions once on first use in case lifetime was changed
|
||||||
def cleaner():
|
with app.app_context():
|
||||||
with cleaned.get_lock():
|
with cleaned.get_lock():
|
||||||
if not cleaned.value:
|
if not cleaned.value:
|
||||||
cleaned.value = True
|
cleaned.value = True
|
||||||
app.logger.info('cleaning session store')
|
app.logger.info('cleaning session store')
|
||||||
MailuSessionExtension.cleanup_sessions(app)
|
MailuSessionExtension.cleanup_sessions(app)
|
||||||
|
|
||||||
app.before_first_request(cleaner)
|
|
||||||
|
|
||||||
app.session_config = MailuSessionConfig(app)
|
|
||||||
app.session_interface = MailuSessionInterface()
|
|
||||||
|
|
||||||
cleaned = Value('i', False)
|
cleaned = Value('i', False)
|
||||||
session = MailuSessionExtension()
|
session = MailuSessionExtension()
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
pip==22.3.1
|
pip==23.3.1
|
||||||
setuptools==65.6.3
|
setuptools==68.2.2
|
||||||
wheel==0.38.4
|
wheel==0.41.3
|
||||||
|
|||||||
@@ -1,86 +1,93 @@
|
|||||||
aiodns==3.0.0
|
aiodns==3.1.1
|
||||||
aiohttp==3.8.5
|
aiohttp==3.8.6
|
||||||
aiosignal==1.2.0
|
aiosignal==1.3.1
|
||||||
alembic==1.8.1
|
alembic==1.12.1
|
||||||
async-timeout==4.0.2
|
aniso8601==9.0.1
|
||||||
attrs==22.1.0
|
async-timeout==4.0.3
|
||||||
Babel==2.11.0
|
attrs==23.1.0
|
||||||
|
Babel==2.13.1
|
||||||
bcrypt==4.0.1
|
bcrypt==4.0.1
|
||||||
blinker==1.5
|
blinker==1.6.3
|
||||||
certifi==2023.7.22
|
certifi==2023.7.22
|
||||||
cffi==1.15.1
|
cffi==1.16.0
|
||||||
charset-normalizer==2.1.1
|
charset-normalizer==3.3.1
|
||||||
click==8.1.3
|
click==8.1.7
|
||||||
colorclass==2.2.2
|
colorclass==2.2.2
|
||||||
cryptography==41.0.3
|
cryptography==41.0.5
|
||||||
decorator==5.1.1
|
|
||||||
defusedxml==0.7.1
|
defusedxml==0.7.1
|
||||||
Deprecated==1.2.13
|
Deprecated==1.2.14
|
||||||
dnspython==2.2.1
|
dnspython==2.4.2
|
||||||
dominate==2.7.0
|
dominate==2.8.0
|
||||||
easygui==0.98.3
|
easygui==0.98.3
|
||||||
email-validator==1.3.0
|
email-validator==2.1.0.post1
|
||||||
Flask==2.2.5
|
Flask==2.3.3
|
||||||
Flask-Babel==2.0.0
|
flask-babel==4.0.0
|
||||||
Flask-Bootstrap==3.3.7.1
|
Flask-Bootstrap==3.3.7.1
|
||||||
Flask-DebugToolbar==0.13.1
|
#Flask-DebugToolbar is not compatible with Flask 2.3.3+
|
||||||
Flask-Login==0.6.2
|
#Flask-DebugToolbar==0.13.1
|
||||||
flask-marshmallow==0.14.0
|
Flask-Login==0.6.3
|
||||||
Flask-Migrate==3.1.0
|
flask-marshmallow==0.15.0
|
||||||
Flask-RESTX==1.0.5
|
Flask-Migrate==4.0.5
|
||||||
|
flask-restx==1.1.0
|
||||||
Flask-SQLAlchemy==2.5.1
|
Flask-SQLAlchemy==2.5.1
|
||||||
Flask-WTF==1.0.1
|
# >2.5.1 bug with parsing models.py. Could otherwise be 3.0.5
|
||||||
frozenlist==1.3.1
|
Flask-WTF==1.2.1
|
||||||
greenlet==2.0.0
|
frozenlist==1.4.0
|
||||||
gunicorn==20.1.0
|
greenlet==3.0.1
|
||||||
|
gunicorn==21.2.0
|
||||||
idna==3.4
|
idna==3.4
|
||||||
|
importlib-resources==6.1.0
|
||||||
infinity==1.5
|
infinity==1.5
|
||||||
intervals==0.9.2
|
intervals==0.9.2
|
||||||
itsdangerous==2.1.2
|
itsdangerous==2.1.2
|
||||||
Jinja2==3.1.2
|
Jinja2==3.1.2
|
||||||
limits==2.7.1
|
jsonschema==4.19.2
|
||||||
Mako==1.2.3
|
jsonschema-specifications==2023.7.1
|
||||||
MarkupSafe==2.1.1
|
limits==3.6.0
|
||||||
marshmallow==3.18.0
|
Mako==1.2.4
|
||||||
marshmallow-sqlalchemy==0.28.1
|
MarkupSafe==2.1.3
|
||||||
|
marshmallow==3.20.1
|
||||||
|
marshmallow-sqlalchemy==0.29
|
||||||
msoffcrypto-tool==5.1.1
|
msoffcrypto-tool==5.1.1
|
||||||
multidict==6.0.2
|
multidict==6.0.4
|
||||||
mysql-connector-python==8.0.32
|
mysql-connector-python==8.2.0
|
||||||
olefile==0.46
|
olefile==0.46
|
||||||
oletools==0.60.1
|
oletools==0.60.1
|
||||||
packaging==21.3
|
packaging==23.2
|
||||||
passlib==1.7.4
|
passlib==1.7.4
|
||||||
pcodedmp==1.2.6
|
pcodedmp==1.2.6
|
||||||
podop @ file:///app/libs/podop
|
podop @ file:///app/libs/podop
|
||||||
postfix-mta-sts-resolver==1.1.4
|
postfix-mta-sts-resolver==1.4.0
|
||||||
protobuf==3.20.2
|
protobuf==4.21.12
|
||||||
psycopg2-binary==2.9.5
|
psycopg2-binary==2.9.9
|
||||||
pycares==4.2.2
|
pycares==4.4.0
|
||||||
pycparser==2.21
|
pycparser==2.21
|
||||||
Pygments==2.15.0
|
Pygments==2.16.1
|
||||||
pyparsing==2.4.7
|
pyparsing==2.4.7
|
||||||
python-dateutil==2.8.2
|
python-dateutil==2.8.2
|
||||||
python-magic==0.4.27
|
python-magic==0.4.27
|
||||||
pytz==2022.6
|
pytz==2023.3.post1
|
||||||
PyYAML==6.0.1
|
PyYAML==6.0.1
|
||||||
Radicale==3.1.8
|
Radicale==3.1.8
|
||||||
redis==4.4.4
|
redis==5.0.1
|
||||||
|
referencing==0.30.2
|
||||||
requests==2.31.0
|
requests==2.31.0
|
||||||
|
rpds-py==0.10.6
|
||||||
six==1.16.0
|
six==1.16.0
|
||||||
socrate @ file:///app/libs/socrate
|
socrate @ file:///app/libs/socrate
|
||||||
SQLAlchemy==1.4.42
|
SQLAlchemy==1.4.50
|
||||||
srslib==0.1.4
|
srslib==0.1.4
|
||||||
tabulate==0.9.0
|
tabulate==0.9.0
|
||||||
tenacity==8.1.0
|
tenacity==8.2.3
|
||||||
typing_extensions==4.4.0
|
typing_extensions==4.8.0
|
||||||
urllib3==1.26.12
|
urllib3==2.0.7
|
||||||
validators==0.20.0
|
validators==0.22.0
|
||||||
visitor==0.1.3
|
visitor==0.1.3
|
||||||
vobject==0.9.6.1
|
vobject==0.9.6.1
|
||||||
watchdog==2.1.9
|
watchdog==3.0.0
|
||||||
Werkzeug==2.2.3
|
Werkzeug===2.3.7
|
||||||
wrapt==1.14.1
|
wrapt==1.15.0
|
||||||
WTForms==3.0.1
|
WTForms==3.1.0
|
||||||
WTForms-Components==0.10.5
|
WTForms-Components==0.10.5
|
||||||
xmltodict==0.13.0
|
xmltodict==0.13.0
|
||||||
yarl==1.8.1
|
yarl==1.9.2
|
||||||
|
|||||||
Reference in New Issue
Block a user