Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2120 (closed defect: duplicate)

Opened 10 years ago

Last modified 10 years ago

TG 2.0 b1 quickstarted project does not work on Python 2.4

Reported by: alevinsn Owned by: faide
Priority: high Milestone: 2.0b2
Component: TurboGears Version: trunk
Severity: major Keywords:
Cc:

Description

A quickstarted project created with Turbogears 2.0 Beta 1 does not work without changes on Python 2.4. The problem stems from the use of the hashlib python module in <project>/model/auth.py:

from hashlib import sha1

hashlib only exists starting in Python 2.5. The "fix" is to comment out this line. hashlib.sha1 is only used for the "salted_sha1" password encryption method, which is also the default. Instead, the "sha1" password encryption method can be used with Python 2.4. To change the default, it is also necessary to modify <project>/config/app_cfg.py:

base_config.sa_auth.password_encryption_method = "salted_sha1"

becomes

base_config.sa_auth.password_encryption_method = "sha1"

Change History

comment:1 Changed 10 years ago by lszyba1

If the salted sha1 provides better security then maybe we should do an try except statement and notify the user to install hashlib.

comment:2 Changed 10 years ago by lszyba1

Duplicate tickiet: #2109

comment:3 Changed 10 years ago by mramm

  • Status changed from new to closed
  • Resolution set to duplicate
Note: See TracTickets for help on using tickets.