View Issue Details

IDProjectCategoryView StatusLast Update
2231Composrcorepublic2016-03-01 20:33
ReporterPDStig Assigned ToChris Graham  
PrioritynormalSeverityminor 
Status resolvedResolutionfixed 
Summary2231: Composr 10b2: custom page modules do not render properly
DescriptionWhen making a custom modification of any modules found in site/pages/modules (perhaps other untested areas as well) and then saving to the site/pages/modules_custom folder, Composr does not properly render the module.

...in the case of warnings.php , it will render the form as HTML inside a string... so essentially instead of a form, you see bare HTML code.
Steps To Reproduce1. Modify site/pages/modules/warnings.php and save into site/pages/modules_custom/warnings.php (you can even just save an exact copy there).

2. Attempt to load warn/punish user screen.

3. You get bare HTML instead of a form.
Additional InformationI have confirmed it is indeed an issue with rendering custom modules and not an issue with my code.

Case 1: Original warnings.php with no modifications - form works.
Case 2: Original warnings.php exists, custom warnings.php also exists - form does NOT work.
Case 3: Original warnings.php deleted, custom warnings.php exists in the custom folder - form does NOT work.
Case 4: Original warnings.php exists, exact copy made as custom warnings.php - form does NOT work.
Case 5: Customized warnings.php exists in the original modules folder; no warnings.php in custom folder - form works!
TagsNo tags attached.
Attach Tags
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

Chris Graham

2016-03-01 19:59

administrator   ~3371

This is the new "kid gloves" XSS security feature. It auto-escapes output components if no skills declaration is made in the override code. I'll take a look at this case and see how we can tune it to make it a bit better.

Chris Graham

2016-03-01 20:33

administrator   ~3372

The issue specifically here was that the fields for the form get turned from Tempcode back to a string, prior to rendering, for performance reasons (carrying through Tempcode object structure for the whole form structure, used too much RAM). This made the system not know the form fields were part of the output assembly rather than based on some kind of possible user input, so they got auto-escaped.

I've now made it track the output of anything that gets internally evaluated, and know never to auto-escape that.

Issue History

Date Modified Username Field Change