MCPcopy
hub / github.com/django/django / decode

Method decode

django/contrib/sessions/backends/base.py:136–148  ·  view source on GitHub ↗
(self, session_data)

Source from the content-addressed store, hash-verified

134 )
135
136 def decode(self, session_data):
137 try:
138 return signing.loads(
139 session_data, salt=self.key_salt, serializer=self.serializer
140 )
141 except signing.BadSignature:
142 logger = logging.getLogger("django.security.SuspiciousSession")
143 logger.warning("Session data corrupted")
144 except Exception:
145 # ValueError, unpickling exceptions. If any of these happen, just
146 # return an empty dictionary (an empty session).
147 pass
148 return {}
149
150 def update(self, dict_):
151 self._session.update(dict_)

Callers 8

get_decodedMethod · 0.45
loadMethod · 0.45
aloadMethod · 0.45
loadMethod · 0.45
aloadMethod · 0.45
loadMethod · 0.45
_post_processMethod · 0.45
read_manifestMethod · 0.45

Calls 1

loadsMethod · 0.45

Tested by

no test coverage detected