Opened 8 years ago
Last modified 8 years ago
#12451 closed defect
Error reports are not directed to trac-hacks.org if home_page or url attribute starts with https — at Initial Version
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 0.12.8 |
Component: | general | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
The issue is due to use of startswith
to compare against the string http://trac-hacks.org
: tags/trac-0.12.7/trac/web/main.py@:586,612#L578.
Proposed change:
-
trac/web/main.py
diff --git a/trac/web/main.py b/trac/web/main.py index ee7b0bb..9808ecf 100644
a b from pprint import pformat, pprint 31 31 import re 32 32 import sys 33 33 import traceback 34 from urlparse import urlparse 34 35 35 36 from genshi.builder import tag 36 37 from genshi.output import DocType … … def send_internal_error(env, req, exc_info): 670 671 faulty_plugins.sort(key=lambda p: p['frame_idx']) 671 672 if faulty_plugins: 672 673 info = faulty_plugins[0]['info'] 674 home_page = info.get('home_page', '') 673 675 if 'trac' in info: 674 676 tracker = info['trac'] 675 elif info.get('home_page', '').startswith(th):677 elif urlparse(home_page).netloc == urlparse(th).netloc: 676 678 tracker = th 677 679 plugin_name = info.get('home_page', '').rstrip('/') \ 678 680 .split('/')[-1]
Patch was created against the trunk. I will need to test it for 1.0-stable and 0.12-stable.
Note:
See TracTickets
for help on using tickets.