CSP error: Functions.js - Uncaught EvalError

3 replies · opened Feb 18, 2022

SsoftdevFeb 18, 2022

The function.js file includes a function: jsLinking that causes the file to throw Uncaught EvalError with a csp in place. I can not place unsafe-eval in my csp for security reasons and a nonce doesn't seem to work in this instance. The theme also does not appear to work without this file. How can I update the file to replace the error causing function? What files is it linking to?

SSemicolon WebSTAFFFeb 19, 2022

Hello,

We Understand. Please consider trying the updated file attached to this reply and let us know if this works for you.

Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

SsoftdevFeb 19, 2022

Much appreciated! This works. There was one error that it produced at line 231: I needed to change this -> if( typeof parent === 'object') to -> if( typeof parent === 'object' && parent.find && parent.find()) because there was a parent object with no find function.

Thanks!

SSemicolon WebSTAFFFeb 20, 2022

Hello,

Glad your issues were resolved.

We will definitely look into the Codes you have provided as when we tested the codes (before providing them to you), we did not get any console errors. So we will double check this and release updates accordingly. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard