Opened 8 years ago

Closed 8 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 Tim Graham, 8 years ago

Wouldn't this cause backwards compatibility problems as the hash value of existing sessions would change?

comment:2 by Tim Graham, 8 years ago

Resolution: wontfix
Status: newclosed

Please correct me if comment 1 is incorrect.

Note: See TracTickets for help on using tickets.
Back to Top