From ab5caac6f74e0ac5e7b75afe2157429d9d31903b Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 31 Jan 2023 17:34:59 +0100 Subject: [PATCH] Remove webmail cookies on logout. --- core/admin/mailu/sso/views/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/admin/mailu/sso/views/base.py b/core/admin/mailu/sso/views/base.py index 67f2319a..aa0e9ea9 100644 --- a/core/admin/mailu/sso/views/base.py +++ b/core/admin/mailu/sso/views/base.py @@ -57,7 +57,10 @@ def login(): def logout(): flask_login.logout_user() flask.session.destroy() - return flask.redirect(flask.url_for('.login')) + response = flask.redirect(flask.url_for('.login')) + for cookie in ['roundcube_sessauth', 'roundcube_sessid', 'smsession']: + response.set_cookie(cookie, 'empty', expires=0) + return response @sso.route('/proxy', methods=['GET'])