Mercurial > hg-stable
changeset 5572:9c7f543405c1
hgweb: make web.name default to repo basename
Providing the full path to the repository by default
could be considered a security risk.
author | Steve Borho <steve@borho.org> |
---|---|
date | Thu, 29 Nov 2007 20:47:41 -0600 |
parents | f84bb2e1cc3a |
children | e2da5b340651 |
files | mercurial/hgweb/hgweb_mod.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py Tue Oct 23 10:39:24 2007 +0000 +++ b/mercurial/hgweb/hgweb_mod.py Thu Nov 29 20:47:41 2007 -0600 @@ -831,7 +831,8 @@ if not self.reponame: self.reponame = (self.config("web", "name") or req.env.get('REPO_NAME') - or req.url.strip('/') or self.repo.root) + or req.url.strip('/') + or os.path.basename(self.repo.root)) self.t = templater.templater(mapfile, templater.common_filters, defaults={"url": req.url,