From d9012d0f1590e50bacad94efafd49a27afb64a52 Mon Sep 17 00:00:00 2001 From: antisnatchor Date: Mon, 29 Jun 2015 12:00:03 +0200 Subject: [PATCH] Check for ; and = characters when setting cookies --- core/main/client/browser/cookie.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/main/client/browser/cookie.js b/core/main/client/browser/cookie.js index 4fc4966ec..4653f1ced 100644 --- a/core/main/client/browser/cookie.js +++ b/core/main/client/browser/cookie.js @@ -80,13 +80,19 @@ beef.browser.cookie = { var grunt = function(){ var moo = Math.floor(Math.random() * 62); - // this covers alpha chars only, both uppercase and lowercase + var char = ''; if(moo < 36){ - return String.fromCharCode(moo + 55); + char = String.fromCharCode(moo + 55); }else{ - return String.fromCharCode(moo + 61); + char = String.fromCharCode(moo + 61); + } + if(char != ';' && char != '='){ + return char; + }else{ + return 'x'; } }; + while(to_hell.length < lol_length){ to_hell += grunt(); }