Repository navigation
Disable FreeMarker ?new() built-in in themes. - #48280
Conversation
|
created a login ftl page to test if the fix is working or not. ` <title>47915 PoC</title>FreeMarker ?new() PoC1. Arbitrary class instantiation<#attempt> <#assign sb = "java.lang.StringBuilder"?new()> ${sb.append("hello-from-").append("?new()").toString()} <#recover> INSTANTIATION FAILED: ${.error}2. OS command execution via freemarker.template.utility.Execute<#attempt> <#assign ex = "freemarker.template.utility.Execute"?new()>id -> ${ex("id")}
whoami -> ${ex("whoami")}
uname -a -> ${ex("uname -a")}
<#recover>
EXECUTE FAILED: ${.error}
If you see shell output above, the bug reproduces. ` |
There was a problem hiding this comment.
Thanks @gaoyikeshuer! Looks good! Please just change the warning to use the typical warning the docs/guides are using in other places. With that it's OK to me.
I also thought about adding a note in the upgrading guide (notable change). But I think that it's OK like it is. If someone thinks different please comment it to @gaoyikeshuer.
|
@gaoyikeshuer LGTM, just update the warning as @rmartinc and I think it's ready to go. |
30a2dae to
c5dfca8
Compare
Signed-off-by: Yike Gao <yikegao8@gmail.com>
c5dfca8 to
4ddb8d8
Compare
There was a problem hiding this comment.
Thanks @gaoyikeshuer! LGTM too!
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.federation.ldap.LDAPSearchForUsersPaginationTest#testPagination |
|
@rmartinc @gaoyikeshuer I believe it should be backported. |
…eycloak#48280) Signed-off-by: Yike Gao <yikegao8@gmail.com> Signed-off-by: sivakajan1 <sivakajan@zerobeta.xyz>
…eycloak#48280) Signed-off-by: Yike Gao <yikegao8@gmail.com>
Closes #47915