]> git.cameronkatri.com Git - cgit.git/commitdiff
print git version string in footer
authorChristian Hesse <mail@eworm.de>
Mon, 4 Jun 2018 20:27:46 +0000 (22:27 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 27 Jun 2018 16:01:29 +0000 (18:01 +0200)
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>
ui-shared.c

index ce806f6f4acefbeadf829d18cafe54d527122029..0c6ca60cd88af6aaf2c6176af7ae0359b37ce025 100644 (file)
@@ -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");
        }