summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2018-06-04 22:27:46 +0200
committerChristian Hesse <mail@eworm.de>2018-06-06 08:25:34 +0200
commit2f353dec0fda800490992d438e9d5f2c1cd3452f (patch)
tree0cf7d520d307ccb5353d3d238bae08d856e1f5fa
parent202c42171e8dd5ff59f8d6f8b7586422c80538fe (diff)
downloadcgit-2f353dec0fda800490992d438e9d5f2c1cd3452f.tar.gz
print git version string in footer
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@eworm.de>
-rw-r--r--ui-shared.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui-shared.c b/ui-shared.c
index ce806f6..0c6ca60 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,8 @@ 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 ",
- cgit_version);
+ htmlf("<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit %s</a> "
+ "(<a href='https://git-scm.com/'>git %s</a>) at ", cgit_version, git_version_string);
html_txt(show_date(time(NULL), 0, cgit_date_mode(DATE_ISO8601)));
html("</div>\n");
}