mirror of
https://github.com/IT4Change/gradido.git
synced 2026-01-20 20:01:31 +00:00
remove skipping CheckEmailPage by some session states, because this don't work with current register process
This commit is contained in:
parent
81faa98f21
commit
48d53626c2
@ -111,9 +111,11 @@ Poco::Net::HTTPRequestHandler* PageRequestHandlerFactory::createRequestHandler(c
|
||||
|
||||
if (url_first_part == "/checkEmail") {
|
||||
//return new CheckEmailPage(s);
|
||||
if (!s || s->getSessionState() < SESSION_STATE_EMAIL_VERIFICATION_CODE_CHECKED) {
|
||||
//printf("url checkEmail\n");
|
||||
// if (!s) {
|
||||
return handleCheckEmail(s, uri, request, timeUsed);
|
||||
}
|
||||
// }
|
||||
//printf("skip handleCheckEmail\n");
|
||||
}
|
||||
/*if (url_first_part == "/register") {
|
||||
auto pageRequestHandler = new RegisterPage;
|
||||
@ -338,11 +340,12 @@ Poco::Net::HTTPRequestHandler* PageRequestHandlerFactory::handleCheckEmail(Sessi
|
||||
*/
|
||||
// update session, mark as verified
|
||||
int retUpdateEmailVerification = session->updateEmailVerification(verificationCode);
|
||||
|
||||
printf("[%s] return from update email verification: %d\n", __FUNCTION__, retUpdateEmailVerification);
|
||||
if (0 == retUpdateEmailVerification) {
|
||||
//printf("[PageRequestHandlerFactory::handleCheckEmail] timeUsed: %s\n", timeUsed.string().data());
|
||||
SessionHTTPRequestHandler* pageRequestHandler = nullptr;
|
||||
if (model::table::EMAIL_OPT_IN_REGISTER_DIRECT == session->getEmailVerificationType()) {
|
||||
printf("return check email page\n");
|
||||
pageRequestHandler = new CheckEmailPage(session);
|
||||
} else if(SESSION_STATE_RESET_PASSWORD_REQUEST == session->getSessionState()) {
|
||||
pageRequestHandler = new UpdateUserPasswordPage(session);
|
||||
|
||||
@ -914,7 +914,6 @@ MemoryBin* User::createCryptoKey(const std::string& password)
|
||||
//ObfusArray* key = new ObfusArray(crypto_box_SEEDBYTES);
|
||||
auto key = mm->getFreeMemory(crypto_box_SEEDBYTES);
|
||||
//Bin32Bytes* key = mm->get32Bytes();
|
||||
|
||||
if (crypto_pwhash(*key, key->size(), password.data(), password.size(), hash512_salt, 10U, 33554432, 2) != 0) {
|
||||
lock(funcName);
|
||||
addError(new ParamError(funcName, " error creating pwd hash, maybe to much memory requestet? error:", strerror(errno)));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user