Server side :

* Add $ADMIN_MODE to enable create users
	* Add protocol version (1 for now)
	* Give priority to letters in password generator

Client side :
	* Don't still use global variable to get document after loading
	* Add email type in possible values for username (used by gmail)
This commit is contained in:
Gregory Soutade
2013-10-16 18:40:06 +02:00
parent 6099b39329
commit a994074db0
4 changed files with 47 additions and 32 deletions

View File

@@ -37,13 +37,12 @@ function generate_password()
// numbers 48 - 57
// upper 65 - 90
// lower 97 - 122
var symbols = new Array(40, 47, 48, 57, 65, 90, 97, 122, 123, 126);
// var symbols = new Array(32, 47, 58, 64, 91, 96, 123, 126, 48, 57, 65, 90, 97, 122);
// Give priority to letters (65 - 122 duplicated in front and end of array)
var symbols = new Array(65, 90, 97, 122, 40, 47, 48, 57, 65, 90, 97, 122, 123, 126, 65, 90, 97, 122);
field = document.getElementById("new_password");
var res = "";
//for(i=0; i<16; i++)
while (res.length < 16)
{
a = Math.round(Math.random() * (symbols.length/2) * 2);