I am trying to get a Javascript speex library to run within a CSP protected environment. It runs great without CSP and I already fixed most "eval" problems. However - this one is giving me a headache:
this.interpolate = Function("buffer", toCompile);
See: https://github.com/grantgalitz/XAudioJS/blob/master/resampler.js
I tried something like
this.interpolate = function buffer () { return toCompile };
but that didn't work. Though I understand the .. well, basics of "Function" versus "function", I can't find working fix.
Any help is appreciated.
Michaela