Skip to content

Commit

Permalink
Generate a random hash
Browse files Browse the repository at this point in the history
  • Loading branch information
chriso committed Mar 19, 2012
1 parent 4072552 commit 9ede38f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/xss.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ function remove_invisible_characters(str) {
}

function xss_hash() {
//TODO: Create a random hash
return '!*$^#(@*#&';
var str = '', num = 10;
while (num--) str += String.fromCharCode(Math.random() * 25 | 97);
return str;
}

function convert_attribute(str) {
Expand Down

0 comments on commit 9ede38f

Please sign in to comment.