From: Tim Otten Date: Tue, 9 Sep 2014 04:20:44 +0000 (-0700) Subject: CRM-15248 - footer.tpl - For front-end users, redact point-release. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=bc99f513fcaa812f68b72e4885d85e6ff522e053;p=civicrm-core.git 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. --- 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}