open-formulieren / open-forms-sdk

A Javascript SDK for Open Forms
https://open-forms.readthedocs.io/en/stable/developers/sdk/index.html
Other
2 stars 6 forks source link

:arrow_up: Upgrade Formiojs #657

Closed SilviaAmAm closed 5 months ago

SilviaAmAm commented 5 months ago

Forms with telephone number components fail because of a CSP error:

Error while processing template EvalError: call to Function() blocked by CSP

This happens in the Evaluator: https://github.com/formio/formio.js/blob/v4.13.13/src/utils/Evaluator.js#L28 when it calls lodash template function. This makes a call to Function(), which is why it gets blocked by CSP. (https://github.com/lodash/lodash/issues/832) So then this function returns nothing.

When calling getFormattedTooltip, which calls interpolate, this function is undefined and gives an error.

I need to investigate further, because I don't understand why this only happens for telefone components. This component also shows a visual regression, so probably something related. But I don't know yet

This seems to be a problem since 4.13.13-rc.1

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 75.53%. Comparing base (16ace7e) to head (375187f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #657 +/- ## ========================================== + Coverage 75.20% 75.53% +0.33% ========================================== Files 225 225 Lines 4517 4517 Branches 1208 1208 ========================================== + Hits 3397 3412 +15 + Misses 1081 1066 -15 Partials 39 39 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sergei-maertens commented 5 months ago

that's weird since we also use https://github.com/formio/protected-eval to circumvent CSP challenges :thinking:

sergei-maertens commented 5 months ago

Closing this because I don't think this is going anywhere? Feel free to reopen if I'm wrong!