Merge pull request #30896 from dhiashalabi/fix/reorder-setlang-initialization

fix: reorder session initialization in HTTPRequest to Fix Language Handling
This commit is contained in:
Akhil Narang 2025-01-29 11:49:35 +05:30 committed by GitHub
commit 60aa2f918a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -38,12 +38,12 @@ class HTTPRequest:
# load cookies
self.set_cookies()
# login and start/resume user session
self.set_session()
# set request language
self.set_lang()
# login and start/resume user session
self.set_session()
# match csrf token from current session
self.validate_csrf_token()
@ -639,7 +639,7 @@ def validate_oauth(authorization_header):
Authenticate request using OAuth and set session user
Args:
authorization_header (list of str): The 'Authorization' header containing the prefix and token
authorization_header (list of str): The 'Authorization' header containing the prefix and token
"""
from frappe.integrations.oauth2 import get_oauth_server
@ -679,7 +679,7 @@ def validate_auth_via_api_keys(authorization_header):
Authenticate request using API keys and set session user
Args:
authorization_header (list of str): The 'Authorization' header containing the prefix and token
authorization_header (list of str): The 'Authorization' header containing the prefix and token
"""
try: