Edgewall Software
Modify

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#13103 closed enhancement (fixed)

Use SHA1 for generating etag header

Reported by: Ryan J Ollos Owned by: Jun Omae
Priority: normal Milestone: 1.3.4
Component: web frontend Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Use sha1 rather than md5 for generating ETag header.

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  
    1919from Cookie import CookieError, BaseCookie, SimpleCookie
    2020import cgi
    2121from datetime import datetime
    22 from hashlib import md5
     22from hashlib import sha1
    2323import new
    2424import mimetypes
    2525import os
    class Request(object):  
    636636        so that consecutive requests can be cached.
    637637        """
    638638        if isinstance(extra, list):
    639             m = md5()
     639            m = sha1()
    640640            for elt in extra:
    641641                m.update(repr(elt))
    642642            extra = m.hexdigest()

Attachments (0)

Change History (3)

comment:1 by Ryan J Ollos, 6 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: newclosed

Committed to trunk in r16827.

comment:2 by Ryan J Ollos, 6 years ago

Owner: set to Jun Omae

comment:3 by Ryan J Ollos, 5 years ago

Internal Changes: modified (diff)
Release Notes: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.