Updates seedrandom dependency to avoid triggering content security policy#7
Updates seedrandom dependency to avoid triggering content security policy#7mklilley wants to merge 3 commits into
Conversation
|
Hi there, I was just going through my github repos and doing a little tidy up and found a fork that linked to this PR I made some time ago. Just out of curiosity, was there anything wrong with my PR? |
|
Hi @mklilley, Unless I am missing something, this change would disallow the package to be used in a web environment since there won't be support for require. I appreciate the effort to update the problems associated with outdated packaged, but this does not seem to be a complete solution 🙂 |
|
Hi @JeffreyArts. Thanks for taking the time to look at my PR. Tbh, it's been so long since I did this PR that I can't recall all the details. However, when I look at your comment, I'm not sure I agree. Let me explain, and please do correct me if I've misunderstood you. Before I made my changes, there was already a |
Could you please pinpoint me to this reference? Cause looking at shuffle-seed.js I can't find a require statement. Also, I agree with @louisremi's comment. His snippet works splendidly. Current version could be updated with that (compiled) snippet, but @webcaetano would need to update the NPM package for it as well. |
|
Click on files changed tab in this PR and you'll see the old |
|
hi @JeffreyArts. what is your username on npm? So i can invite you as maintainer. |
Old version of
seedrandomusedevalwhich is not considered safe against XSS attacks (see https://infosec.mozilla.org/guidelines/web_security#content-security-policy). Seedrandom version 3.0.5 fixed this. However, starting in version 3,global Math.seedrandomis no longer available when usingrequire('seedrandom')and so I needed to refactor the code a little.I also found that
gulp buildwould not work unless I updated thegulp-gitdependency.