Opened 5 years ago
Last modified 4 years ago
#13103 closed enhancement
Use SHA1 for generating etag header — at Initial Version
Reported by: | Ryan J Ollos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 1.3.4 |
Component: | web frontend | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Use SHA1 rather than MD5. Fix proposed in gmessage:trac-users:0q-eseHuaoQ/g-nqO_8NBwAJ.
-
trac/web/api.py
diff --git a/trac/web/api.py b/trac/web/api.py index f98d1a93d..b93f4af36 100644
a b from BaseHTTPServer import BaseHTTPRequestHandler 19 19 from Cookie import CookieError, BaseCookie, SimpleCookie 20 20 import cgi 21 21 from datetime import datetime 22 from hashlib import md522 from hashlib import sha1 23 23 import new 24 24 import mimetypes 25 25 import os … … class Request(object): 636 636 so that consecutive requests can be cached. 637 637 """ 638 638 if isinstance(extra, list): 639 m = md5()639 m = sha1() 640 640 for elt in extra: 641 641 m.update(repr(elt)) 642 642 extra = m.hexdigest()
Note:
See TracTickets
for help on using tickets.