msyavuz commented on code in PR #37868:
URL: https://github.com/apache/superset/pull/37868#discussion_r2821616826
##########
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts:
##########
@@ -803,11 +807,26 @@ export default function transformProps(
focusedSeries = seriesName;
};
+ let customEchartOptions;
+ try {
+ // Parse custom EChart options safely using AST analysis
+ // This replaces the unsafe `new Function()` approach with a secure parser
+ // that only allows static data structures (no function callbacks)
+ customEchartOptions = safeParseEChartOptions(_echartOptions);
+ mergeCustomEChartOptions(echartOptions, customEchartOptions);
+ } catch (_) {
+ customEchartOptions = undefined;
+ }
Review Comment:
Tagging this as the same thing Michael mentioned on other comment
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]