[issue2551295] Modify link to Roundup docs in sidebar for all templates
John Rouillard <[email protected]> Tue, 24 Oct 2023 02:26:32 +0000
| Newsgroups | gmane.comp.bug-tracking.roundup.devel |
|---|---|
| Message-ID | <[email protected]> |
New submission from John Rouillard:
All of the templates include a link to the Roundup docs.
I am watching the stats for that including the referer header. I see
entries from private ip address space with port 8080, 8917 etc. This is obviously
clicking on the link on a tracker.
I would like to not see the referer but get info on the version of Roundup being run.
A change to the Roundup docs link like:
<a
tal:attributes="href python:'https://www.roundup-tracker.org?ref=from_roundup-' +
utils.roundup_version()"
referrerpolicy="no-referrer" i18n:translate="">Roundup docs</a>
where utils.roundup_version is a new TemplatingUtils method. Add to cgi/templating.py and it
returns a string like "2.3.0". This should be done on all templates.
My implementation of roundup_version was added as templating util extension. The code is:
from roundup import __version__ as roundup_version_str
def roundup_version():
return roundup_version_str
def init(tracker):
tracker.registerUtil('roundup_version', roundup_version)
when added to templating.py, probably only need the first three lines.
In addition to code change, add two sections to doc/upgrading.txt. Make adding
the referrerpolicy recommended and changing to a new url with the ref optional.
Hopefully this will get some info on what versions are in the wild and stop
internal url's from escaping to the logs.
----------
components: Documentation, Web interface
keywords: Effort-Low, StarterTicket
messages: 7847
nosy: rouilj
priority: normal
severity: minor
status: new
title: Modify link to Roundup docs in sidebar for all templates
type: security
_________________________________________________
Roundup tracker <[email protected]>
<https://issues.roundup-tracker.org/issue2551295>
_________________________________________________