Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Solved By
-
Affects Version/s: 11.10.4, 12.3
-
Fix Version/s: None
-
Component/s: Web - Templates & Resources
-
Labels:
-
Difficulty:Unknown
-
Documentation:N/A
-
Documentation in Release Notes:N/A
-
Similar issues:
Description
Reproduction step:
- Create a wiki macro with a parameter whom type is an enum
- Try to use that macro in a document
Expected result:
- a select is created when using the macro with the enum values
Obtained result:
- a select is created but without any value in it and the following warning appears:
2020-05-13 14:09:04,201 [http://localhost:8080/xwiki/bin/get/CKEditor/MacroService?outputSyntax=plain&language=en&data=descriptor¯oId=test1%2Fxwiki%2F2.1] WARN o.x.v.i.DefaultVelocityEngine - Cannot retrieve method getEnumConstants from object of class java.lang.Class due to security restrictions. 2020-05-13 14:09:04,202 [http://localhost:8080/xwiki/bin/get/CKEditor/MacroService?outputSyntax=plain&language=en&data=descriptor¯oId=test1%2Fxwiki%2F2.1] WARN o.x.v.i.DefaultVelocityEngine - Cannot retrieve method getEnumConstants from object of class java.lang.Class due to security restrictions.
Note: in order to ease the reproduction, you can directly import the attached XAR and try to use the macro "test1".
Attachments
Issue Links
- relates to
-
XCOMMONS-1944 Class#getEnumConstants() should be allowed to be called from Velocity
-
- Closed
-