List for cgit developers and users
 help / color / mirror / Atom feed
From: list at eworm.de (Christian Hesse)
Subject: [PATCH v2 1/1] print git version string in footer
Date: Tue,  5 Jun 2018 17:08:31 +0200	[thread overview]
Message-ID: <20180605150831.11946-1-list@eworm.de> (raw)
In-Reply-To: <20180605164622.145c5a17@leda>

From: Christian Hesse <mail at eworm.de>

This helps tracking what git version cgit uses. The security implications are
low as anybody can look up the version of our submodule anyway. The paranoid
can use a custom footer. :-p

On the other hand this brings potential security issues to the
administrators eyes...

Signed-off-by: Christian Hesse <mail at eworm.de>
---
 ui-shared.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ui-shared.c b/ui-shared.c
index 9d8f66b..8bd1d97 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -10,6 +10,7 @@
 #include "ui-shared.h"
 #include "cmd.h"
 #include "html.h"
+#include "version.h"
 
 static const char cgit_doctype[] =
 "<!DOCTYPE html>\n";
@@ -785,8 +786,9 @@ void cgit_print_docend(void)
 	if (ctx.cfg.footer)
 		html_include(ctx.cfg.footer);
 	else {
-		htmlf("<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit %s</a> at ",
+		htmlf("<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit %s</a> ",
 			cgit_version);
+		htmlf("(<a href='https://git-scm.com/'>git %s</a>) at ", git_version_string);
 		html_txt(show_date(time(NULL), 0, cgit_date_mode(DATE_ISO8601)));
 		html("</div>\n");
 	}


  reply	other threads:[~2018-06-05 15:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04 20:29 [PATCH " list
2018-06-04 20:51 ` Jason
2018-06-04 20:59   ` list
2018-06-04 21:02   ` konstantin
2018-06-05 14:46 ` list
2018-06-05 15:08   ` list [this message]
2018-06-06  6:24     ` [PATCH v3 " list
2018-06-06 12:34       ` Jason
2018-06-06 21:28         ` list

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180605150831.11946-1-list@eworm.de \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).