diff --git a/src/server/AuthorizationManager.cpp b/src/server/AuthorizationManager.cpp index 34882b0..63918bd 100644 --- a/src/server/AuthorizationManager.cpp +++ b/src/server/AuthorizationManager.cpp @@ -29,7 +29,9 @@ // -- token management #define TIMEOUTSECS 900 // (15 minutes) time before a token becomes invalid #define AUTHCHARS QString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") -#define TOKENLENGTH 20 +#define TOKENLENGTH 128 + +#define DEBUG 1 // -- Connection failure limitations //#define AUTHFAILLIMIT 5 //number of sequential failures before IP is blocked for a time @@ -206,6 +208,7 @@ QString AuthorizationManager::GenerateEncCheckString(){ //insert this new key into the hash for later HASH.insert("SSL_CHECK_STRING/"+key, QDateTime::currentDateTime().addSecs(30) ); //only keep a key "alive" for 30 seconds } + if(DEBUG){ qDebug() << "SSL Check String Generated:" << key; } return key; } @@ -228,17 +231,16 @@ QString AuthorizationManager::LoginUC(QHostAddress host, QString encstring){ //Now re-use the "pubkeys" variable for the public SSL keys QString user; pubkeys = CONFIG->allKeys().filter("RegisteredCerts/"); //Format: "RegisteredCerts//" + QStringList kkeys = HASH.keys().filter("SSL_CHECK_STRING/"); //qDebug() << " - Check pubkeys";// << pubkeys; for(int i=0; i