Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][FIX] auth_session_timeout: Not expiring sessions #729

Open
wants to merge 1 commit into
base: 15.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[FIX] auth_session_timeout: problem whereby page is refreshed with F5…
…, but /web is a public route, so it does not trigger the session check but it does trigger session save, so the file mtime is updated before the second HTTP call makes the check takes place, and session is not expired
thomaspaulb authored and fkantelberg committed Nov 15, 2024
commit 313dc31535b3d08448650b9c1641bb66fb868002
8 changes: 6 additions & 2 deletions auth_session_timeout/models/ir_http.py
Original file line number Diff line number Diff line change
@@ -10,7 +10,11 @@ class IrHttp(models.AbstractModel):
@classmethod
def _authenticate(cls, endpoint):
res = super(IrHttp, cls)._authenticate(endpoint=endpoint)
auth_method = endpoint.routing["auth"]
if auth_method == "user" and request and request.env and request.env.user:
if (
request
and request.session
and request.session.uid
and not request.env["res.users"].browse(request.session.uid)._is_public()
):
request.env.user._auth_timeout_check()
return res