assaf / zombie

Insanely fast, full-stack, headless browser testing using node.js
http://zombie.js.org/
MIT License
5.65k stars 520 forks source link

Node.uuid cannot find window.crypto #1011

Open xbill82 opened 8 years ago

xbill82 commented 8 years ago

Hello Zombie guys :) First of all, thanks for the awesome work. We are using Zombie to test our application, and we have an SDK front-side to abstract the server API. This SDK uses a browserified version of node-uuid, which looks for window.crypto to generate unique IDs. Everything works fine on everyday life browsers, but in Zombie we get the following error

node-uuid: crypto not usable, falling back to insecure Math.random()

which seems to happen when node-uuid can't access window.crypto. This is not a major issue, but we just wanted to check on your side if you can confirm that the Crypto API is not available in Zombie.

az-ericso commented 8 years ago

I am seeing a similar issue in another library:

[09:48:05] [SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()
/Users/kklh716/az/kancho/web/rubix-3.0/node_modules/passport-saml/node_modules/xml-encryption/node_modules/node-forge/js/util.js:1320
          _queryVariables = parse(window.location.search.substring(1));
                                                 ^

TypeError: Cannot read property 'search' of undefined
    at Object.util.getQueryVariables (/Users/kklh716/az/kancho/web/rubix-3.0/node_modules/passport-saml/node_modules/xml-encryption/node_modules/node-forge/js/util.js:1320:50)
    at Array.initModule (/Users/kklh716/az/kancho/web/rubix-3.0/node_modules/passport-saml/node_modules/xml-encryption/node_modules/node-forge/js/log.js:306:26)
    at Array.module.exports (/Users/kklh716/az/kancho/web/rubix-3.0/node_modules/passport-saml/node_modules/xml-encryption/node_modules/node-forge/js/log.js:359:14)
    at Module.module.exports (/Users/kklh716/az/kancho/web/rubix-3.0/node_modules/passport-saml/node_modules/xml-encryption/node_modules/node-forge/js/forge.js:42:14)
    at defineFunc (/Users/kklh716/az/kancho/web/rubix-3.0/node_modules/passport-saml/node_modules/xml-encryption/node_modules/node-forge/js/forge.js:48:10)
    at /Users/kklh716/az/kancho/web/rubix-3.0/node_modules/passport-saml/node_modules/xml-encryption/node_modules/node-forge/js/forge.js:86:14
    at define (/Users/kklh716/az/kancho/web/rubix-3.0/node_modules/passport-saml/node_modules/xml-encryption/node_modules/node-forge/js/forge.js:15:7)
    at define (/Users/kklh716/az/kancho/web/rubix-3.0/node_modules/passport-saml/node_modules/xml-encryption/node_modules/node-forge/js/forge.js:55:22)
    at /Users/kklh716/az/kancho/web/rubix-3.0/node_modules/passport-saml/node_modules/xml-encryption/node_modules/node-forge/js/forge.js:60:1
    at Object.<anonymous> (/Users/kklh716/az/kancho/web/rubix-3.0/node_modules/passport-saml/node_modules/xml-encryption/node_modules/node-forge/js/forge.js:88:3)