diff options
Diffstat (limited to 'share/www/script/test/cookie_auth.js')
-rw-r--r-- | share/www/script/test/cookie_auth.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/share/www/script/test/cookie_auth.js b/share/www/script/test/cookie_auth.js index d029e851..d82d302a 100644 --- a/share/www/script/test/cookie_auth.js +++ b/share/www/script/test/cookie_auth.js @@ -20,12 +20,14 @@ couchTests.cookie_auth = function(debug) { // Simple secret key generator function generateSecret(length) { + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var secret = ''; for (var i=0; i<length; i++) { - secret += String.fromCharCode(Math.floor(Math.random() * 256)); + secret += tab.charAt(Math.floor(Math.random() * 64)); } return secret; } + // this function will be called on the modified server var testFun = function () { try { |