Opened 9 years ago
Closed 9 years ago
#26076 closed Cleanup/optimization (wontfix)
SessionBase's _hash method's variable key_salt need add a dot to be a complete class path
Reported by: | LI Yong | Owned by: | nobody |
---|---|---|---|
Component: | contrib.sessions | Version: | 1.9 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Maybe it's more elegant to add a dot in the key_salt (variable of django.contrib.sessions.backends.base.SessionBase._hash method in file django/contrib/sessions/backends/base.py)
def _hash(self, value): key_salt = "django.contrib.sessions" + self.__class__.__name__ return salted_hmac(key_salt, value).hexdigest()
Now the module and class name is not separated by a dot (like django.contrib.sessionsSessionStore
rather than django.contrib.sessions.SessionStore
)
Change History (2)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Please correct me if comment 1 is incorrect.
Note:
See TracTickets
for help on using tickets.
Wouldn't this cause backwards compatibility problems as the hash value of existing sessions would change?