From bc99f513fcaa812f68b72e4885d85e6ff522e053 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 8 Sep 2014 21:20:44 -0700 Subject: [PATCH] CRM-15248 - footer.tpl - For front-end users, redact point-release. On one hand, giving a precise version can help attackers match their targets with exploits. On the other hand, giving some kind of version indication is useful for support and marketing. This PR attempts to balance the interests by giving a precise version ("Powered by CiviCRM 4.4.6") to users with permission "access CiviCRM" while giving a coarse-version ("Powered by CiviCRM 4.4") to anyone else. --- .../Smarty/plugins/function.crmVersion.php | 60 +++++++++++++++++++ templates/CRM/common/footer.tpl | 2 +- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 CRM/Core/Smarty/plugins/function.crmVersion.php diff --git a/CRM/Core/Smarty/plugins/function.crmVersion.php b/CRM/Core/Smarty/plugins/function.crmVersion.php new file mode 100644 index 0000000000..ad8c0d4274 --- /dev/null +++ b/CRM/Core/Smarty/plugins/function.crmVersion.php @@ -0,0 +1,60 @@ +assign($params['assign'], $version); + } + else { + return $version; + } +} \ No newline at end of file diff --git a/templates/CRM/common/footer.tpl b/templates/CRM/common/footer.tpl index abb4bf6f0c..454eb01791 100644 --- a/templates/CRM/common/footer.tpl +++ b/templates/CRM/common/footer.tpl @@ -29,7 +29,7 @@ {/if}