dee0
dee0
Might be seeing the same thing. However in my case it is just the user_id that I am not seeing. ``` ai=# select * from easyaudit_requestevent where url like '%score%'...
Fwiw, in the debugsqlshell I made calls to get_user_model and session.get_decoded().get('_auth_user_id'). They seemed to work fine for user 18 ( the user I mentioned above )
Just a comment, couldn't the code use get_user_model().objects.filter( id = 18 ).exists() instead of the combo of get_user_model().objects.get(id=user_id) and user_id=getattr(user, 'id', None) ? You have the id already so there...
I instrumented request_signals.py like so ``` if session_cookie_name in cookie: session_id = cookie[session_cookie_name].value try: session = Session.objects.get(session_key=session_id) except Session.DoesNotExist: session = None if session: user_id = session.get_decoded().get('_auth_user_id') try: user =...
I updated my adhoc logging to dump the environment dictionary that easy audit receives. I can see there is a sessionid in the cookie value in the env however despite...
Looks like for some reason SimpleCookie is choking on a cookie value that happens to have a space in it. Something like this ```csrftoken=J7xbB0mM3EOI8UvHLK9L6CmQjbmhTdTYNaYAikNHWlBw6aK4bk2hPeTgoIcQdihk; sessionid=0s59ohck56habw7dqn6dynomoikt0h50; ThingReg=Joe Bloe|[email protected]; mpthing=mpencodedvalue``` The space...
It looks like if you were to use parse_cookie from django.http.cookie then this problem goes away. Btw I see here https://developer.mozilla.org/fr/docs/Web/HTTP/Headers/Set-Cookie that the cookie value shouldn't contain a space. However...
Oh, and it looks like why my colleague is able to authenticate even though SimpleCookie is having a problem is that - The session middleware is getting sessionid from the...
Sure, I can try and summarize. If SimpleCookie encounters a cookie value with a space ignores all cookies in the request. The fix is to just use parse_cookie. Fwiw, the...
Nice find @Skarlso Can something similar be done when the new value of orig1 is an object instead of a multiline string? I ask because when I stumbled on this...