[java-identity-provider] 01/02: IDP-1881 Failed TemplateAttribute should generate a runtime warning (or error)

Rod Widdowson rdw at steadingsoftware.com
Wed Dec 8 14:15:04 UTC 2021


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=7823541b5c47dd2a9a81a38099b12ad0444d1c6c

commit 7823541b5c47dd2a9a81a38099b12ad0444d1c6c
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Tue Dec 7 15:37:07 2021 +0000

    IDP-1881 Failed TemplateAttribute should generate a runtime warning (or error)
    
    https://shibboleth.atlassian.net/browse/IDP-1881
    
    Add property idp.velocity.runtime.strictmode to control behavior
---
 .../src/main/resources/net/shibboleth/idp/conf/global-system.xml       | 1 +
 idp-conf/src/main/resources/conf/idp.properties                        | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/global-system.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/global-system.xml
index 2f405b6e4..9d047d7de 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/global-system.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/global-system.xml
@@ -120,6 +120,7 @@
         <entry key="resource.loader.file.class" value="org.apache.velocity.runtime.resource.loader.FileResourceLoader" />
         <entry key="resource.loader.file.path" value="#{'%{idp.views:%{idp.home}/views}'.trim()}" />
         <entry key="resource.loader.file.cache" value="false" />
+        <entry key="runtime.strict_mode.enable" value="%{idp.velocity.runtime.strictmode:false}" />
     </util:map>
 
     <bean id="shibboleth.VelocityEngine" class="net.shibboleth.ext.spring.velocity.VelocityEngineFactoryBean"
diff --git a/idp-conf/src/main/resources/conf/idp.properties b/idp-conf/src/main/resources/conf/idp.properties
index 804cd8aa7..9ec6659d0 100644
--- a/idp-conf/src/main/resources/conf/idp.properties
+++ b/idp-conf/src/main/resources/conf/idp.properties
@@ -49,6 +49,9 @@ idp.csrf.enabled = true
 # Set the location of Velocity view templates
 #idp.views = %{idp.home}/views
 
+# Do we fail on velocity "syntax errors"
+#idp.velocity.runtime.strictmode=false
+
 # Settings for internal AES encryption key
 #idp.sealer.keyStrategy = shibboleth.DataSealerKeyStrategy
 #idp.sealer.storeType = JCEKS

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list