This is an automated email from the ASF dual-hosted git repository.

jdaugherty pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 9ce99cde3f23d8621b6a17e2b2745a933cf0f7fa
Author: James Daugherty <[email protected]>
AuthorDate: Fri Oct 16 12:54:17 2026 -0400

    Return the page's property keys from the layout Content adapter
    
    TokenizedHTMLPage2Content.getPropertyKeys() called itself instead of the
    wrapped page, so any caller asking a parsed layout Content for its property
    keys recursed until the stack overflowed. Delegate to the page like the 
other
    property accessors do, and assert the keys through the public Content API.
---
 .../groovy/org/apache/grails/web/layout/TokenizedHTMLPage2Content.java  | 2 +-
 .../groovy/org/apache/grails/web/layout/GrailsHTMLPageParserSpec.groovy | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/grails-gsp/grails-layout/src/main/groovy/org/apache/grails/web/layout/TokenizedHTMLPage2Content.java
 
b/grails-gsp/grails-layout/src/main/groovy/org/apache/grails/web/layout/TokenizedHTMLPage2Content.java
index 3f0deb3f9c..15d211fef3 100644
--- 
a/grails-gsp/grails-layout/src/main/groovy/org/apache/grails/web/layout/TokenizedHTMLPage2Content.java
+++ 
b/grails-gsp/grails-layout/src/main/groovy/org/apache/grails/web/layout/TokenizedHTMLPage2Content.java
@@ -59,7 +59,7 @@ final class TokenizedHTMLPage2Content implements Content {
 
     @Override
     public String[] getPropertyKeys() {
-        return getPropertyKeys();
+        return page.getPropertyKeys();
     }
 
     @Override
diff --git 
a/grails-gsp/grails-layout/src/test/groovy/org/apache/grails/web/layout/GrailsHTMLPageParserSpec.groovy
 
b/grails-gsp/grails-layout/src/test/groovy/org/apache/grails/web/layout/GrailsHTMLPageParserSpec.groovy
index c83e75e33b..38a772905d 100644
--- 
a/grails-gsp/grails-layout/src/test/groovy/org/apache/grails/web/layout/GrailsHTMLPageParserSpec.groovy
+++ 
b/grails-gsp/grails-layout/src/test/groovy/org/apache/grails/web/layout/GrailsHTMLPageParserSpec.groovy
@@ -76,6 +76,7 @@ class GrailsHTMLPageParserSpec extends Specification {
         body.toString() == 'Body'
         content.title == 'Title'
         content.getProperty('page.extra') == 'value'
+        content.propertyKeys.toList().containsAll(['title', 'meta.layout', 
'page.extra'])
         GSPGrailsLayoutPage.content2htmlPage(content).body == 'Body'
     }
 }

Reply via email to