In my movie i have included a simple check to the Security variable (lng),
to be sure that it is a number, using the isNaN() function, and it is
between 0-150.
Here is the final code
on (release) { if (isNaN(lng)) { lng = 50; } if (lng>150 or lng<1) { lng = 50; }
m = 0; password = ""; if (upp=="on") { alf1 = "ABCDEFGHKJILMNOPQRSTUVWXYZ"; } else { alf1 = ""; } if (low=="on") { alf2 = "abcdefghkjilmnopqrstuvwxyz"; } else { alf2 = ""; } if (num=="on") { alf3 = "1234567890"; } else { alf3 = ""; } if (symb=="on") { alf4 = "|!£$%&/()=?^'ìè+òàù-.,<é*ç°§;:_>[]@#{}"; } else { alf4 = ""; } alphabet = alf1+alf2+alf3+alf4; alphL = alphabet.length; for (m=0; m rn = Math.floor(Math.Random()*(alphL-1)); password = password+alphabet.charAt(rn); }