diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0fd7801b8..b99c71fff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,9 +8,11 @@ include_directories(
"dependencies"
"dependencies/tinf/src/"
"dependencies/iroha-ed25519/include"
+ "dependencies/mariadb-connector-c/include"
+ "dependencies/mariadb-connector-c/build/include"
#"dependencies/mariadb-connector-c/build/include"
#"dependencies/mariadb-connector-c/include"
- "import/mariadb/include"
+ #"import/mariadb/include"
)
@@ -50,11 +52,32 @@ add_executable(Gradido_LoginServer ${LOCAL_SRCS})
if(WIN32)
-find_library(MYSQL_LIBRARIES mariadbclient.lib PATHS "import/mariadb/lib/release")
+find_library(MYSQL_LIBRARIES mariadbclient.lib PATHS "dependencies/mariadb-connector-c/build/libmariadb/Release" REQUIRED)
#find_library(MYSQL_LIBRARIES_DEBUG mariadbclient.lib PATHS "import/mariadb/lib/debug")
-find_library(MARIADB_CLIENT_DEBUG mariadbclient PATHS "dependencies/mariadb-connector-c/build/libmariadb/Debug" REQUIRED)
+find_library(COMPILED_MARIADB_CLIENT_DEBUG mariadbclient PATHS "dependencies/mariadb-connector-c/build/libmariadb/Debug" REQUIRED)
find_library(IROHA_ED25519 ed25519 PATHS "dependencies/iroha-ed25519/build/Debug" REQUIRED)
-set(MYSQL_INCLUDE_DIR "import/mariadb/include")
+set(MYSQL_INCLUDE_DIR "dependencies/mariadb-connector-c/include")
+
+#set(POCO_DEBUG_PATH "I:/FremdCode/C++/poco/win64/lib/Debug")
+
+#find_library(POCO_DEBUG_FOUNDATION PocoFoundationd PocoFoundation PATHS ${POCO_DEBUG_PATH} REQUIRED)
+#find_library(POCO_DEBUG_DATA PocoDatad PocoData PATHS ${POCO_DEBUG_PATH} REQUIRED)
+#find_library(POCO_DEBUG_NET PocoNetd PocoNet PATHS ${POCO_DEBUG_PATH} REQUIRED)
+#find_library(POCO_DEBUG_NET_SSL PocoNetSSLd PocoNetSSL PATHS ${POCO_DEBUG_PATH} REQUIRED)
+#find_library(POCO_DEBUG_UTIL PocoUtild PocoUtil PATHS ${POCO_DEBUG_PATH} REQUIRED)
+#find_library(POCO_DEBUG_CRYPTO PocoCryptod PocoCrypto PATHS ${POCO_DEBUG_PATH} REQUIRED)
+
+#set(POCO_DEBUG_LIBS ${POCO_DEBUG_FOUNDATION} ${POCO_DEBUG_UTIL} ${POCO_DEBUG_DATA} ${POCO_DEBUG_NET} ${POCO_DEBUG_NET_SSL} ${POCO_DEBUG_CRYPTO})
+#include_directories(
+# "I:/FremdCode/C++/poco/Foundation/include"
+# "I:/FremdCode/C++/poco/Data/include"
+# "I:/FremdCode/C++/poco/Net/include"
+ #"I:/FremdCode/C++/poco/NetSSL_Win/include"
+# "I:/FremdCode/C++/poco/NetSSL_OpenSSL/include"
+# "I:/FremdCode/C++/poco/Crypto/include"
+# "I:/FremdCode/C++/poco/Util/include"
+# "I:/FremdCode/C++/ssl/include"
+#)
else(WIN32)
find_library(IROHA_ED25519 ed25519 PATHS "dependencies/iroha-ed25519/build" REQUIRED)
@@ -72,10 +95,10 @@ include_directories(
endif(WIN32)
-target_link_libraries(Gradido_LoginServer ${CONAN_LIBS} ${IROHA_ED25519} ${MARIADB_CLIENT})
+target_link_libraries(Gradido_LoginServer ${CONAN_LIBS} ${IROHA_ED25519})
if(WIN32)
TARGET_LINK_LIBRARIES(Gradido_LoginServer optimized ${MYSQL_LIBRARIES} Shlwapi)
-TARGET_LINK_LIBRARIES(Gradido_LoginServer debug ${MARIADB_CLIENT_DEBUG} Shlwapi)
+TARGET_LINK_LIBRARIES(Gradido_LoginServer debug ${COMPILED_MARIADB_CLIENT_DEBUG} Shlwapi)
else(WIN32)
target_link_libraries(Gradido_LoginServer libmariadb PocoNet PocoUtil PocoFoundation PocoData PocoNetSSL -lpthread)
endif(WIN32)
\ No newline at end of file
diff --git a/conanfile.txt b/conanfile.txt
index 9592ef121..9378c4a10 100644
--- a/conanfile.txt
+++ b/conanfile.txt
@@ -1,5 +1,5 @@
[requires]
-#Poco/1.9.4@pocoproject/stable
+Poco/1.9.4@pocoproject/stable
libsodium/1.0.18@bincrafters/stable
protobuf/3.9.1@bincrafters/stable
diff --git a/src/cpp/HTTPInterface/CheckEmailPage.cpp b/src/cpp/HTTPInterface/CheckEmailPage.cpp
index 0c3bc285a..dd9b062dc 100644
--- a/src/cpp/HTTPInterface/CheckEmailPage.cpp
+++ b/src/cpp/HTTPInterface/CheckEmailPage.cpp
@@ -5,7 +5,7 @@
#include "Poco/DeflatingStream.h"
-#line 7 "/home/rock/code/gradido_login_server/src/cpsp/checkEmail.cpsp"
+#line 7 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\checkEmail.cpsp"
@@ -24,7 +24,7 @@ void CheckEmailPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::
if (_compressResponse) response.set("Content-Encoding", "gzip");
Poco::Net::HTMLForm form(request, request.stream());
-#line 10 "/home/rock/code/gradido_login_server/src/cpsp/checkEmail.cpsp"
+#line 10 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\checkEmail.cpsp"
bool hasErrors = false;
if(mSession) {
@@ -64,25 +64,25 @@ void CheckEmailPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::
responseStream << "
\n";
responseStream << "\n";
responseStream << "\t";
-#line 45 "/home/rock/code/gradido_login_server/src/cpsp/checkEmail.cpsp"
+#line 45 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\checkEmail.cpsp"
if(mSession && hasErrors) { responseStream << "\n";
responseStream << "\t\t";
-#line 46 "/home/rock/code/gradido_login_server/src/cpsp/checkEmail.cpsp"
+#line 46 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\checkEmail.cpsp"
responseStream << ( mSession->getErrorsHtml() );
responseStream << "\n";
responseStream << "\t";
-#line 47 "/home/rock/code/gradido_login_server/src/cpsp/checkEmail.cpsp"
+#line 47 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\checkEmail.cpsp"
} responseStream << "\n";
responseStream << "\t
Einen neuen Account anlegen \n";
responseStream << "\t";
-#line 49 "/home/rock/code/gradido_login_server/src/cpsp/checkEmail.cpsp"
+#line 49 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\checkEmail.cpsp"
if(mSession && mSession->getSessionState() < SESSION_STATE_EMAIL_VERIFICATION_SEND) { responseStream << "\n";
responseStream << "\t\t
\n";
responseStream << "\t\t\t
Die E-Mail wurde noch nicht verschickt, bitte habe noch etwas Geduld.
\n";
responseStream << "\t\t\t
Versuche es einfach in 1-2 Minuten erneut.
\n";
responseStream << "\t\t
\n";
responseStream << "\t";
-#line 54 "/home/rock/code/gradido_login_server/src/cpsp/checkEmail.cpsp"
+#line 54 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\checkEmail.cpsp"
} else { responseStream << "\n";
responseStream << "\t
\n";
responseStream << "\t";
-#line 60 "/home/rock/code/gradido_login_server/src/cpsp/checkEmail.cpsp"
+#line 60 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\checkEmail.cpsp"
} responseStream << "\n";
responseStream << "
\n";
responseStream << "\n";
diff --git a/src/cpp/HTTPInterface/ConfigPage.cpp b/src/cpp/HTTPInterface/ConfigPage.cpp
index 3994b696b..8eb2cfd96 100644
--- a/src/cpp/HTTPInterface/ConfigPage.cpp
+++ b/src/cpp/HTTPInterface/ConfigPage.cpp
@@ -5,7 +5,7 @@
#include "Poco/DeflatingStream.h"
-#line 4 "/home/rock/code/gradido_login_server/src/cpsp/config.cpsp"
+#line 4 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\config.cpsp"
diff --git a/src/cpp/HTTPInterface/DashboardPage.cpp b/src/cpp/HTTPInterface/DashboardPage.cpp
index 534362f2c..03bf092a1 100644
--- a/src/cpp/HTTPInterface/DashboardPage.cpp
+++ b/src/cpp/HTTPInterface/DashboardPage.cpp
@@ -5,7 +5,7 @@
#include "Poco/DeflatingStream.h"
-#line 7 "/home/rock/code/gradido_login_server/src/cpsp/dashboard.cpsp"
+#line 7 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\dashboard.cpsp"
#include "../SingletonManager/SessionManager.h"
@@ -28,7 +28,7 @@ void DashboardPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::N
Poco::DeflatingOutputStream _gzipStream(_responseStream, Poco::DeflatingStreamBuf::STREAM_GZIP, 1);
std::ostream& responseStream = _compressResponse ? _gzipStream : _responseStream;
responseStream << "\n";
-#line 10 "/home/rock/code/gradido_login_server/src/cpsp/dashboard.cpsp"
+#line 10 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\dashboard.cpsp"
//Poco::Net::NameValueCollection cookies;
//request.getCookies(cookies);
@@ -48,20 +48,20 @@ void DashboardPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::N
responseStream << "\n";
responseStream << "\n";
responseStream << "\t
Willkommen ";
-#line 28 "/home/rock/code/gradido_login_server/src/cpsp/dashboard.cpsp"
+#line 28 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\dashboard.cpsp"
responseStream << ( mSession->getUser()->getName() );
responseStream << " \n";
responseStream << "\t";
-#line 29 "/home/rock/code/gradido_login_server/src/cpsp/dashboard.cpsp"
+#line 29 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\dashboard.cpsp"
responseStream << ( mSession->getErrorsHtml() );
responseStream << "\n";
responseStream << "\t
Status \n";
responseStream << "\t
";
-#line 31 "/home/rock/code/gradido_login_server/src/cpsp/dashboard.cpsp"
+#line 31 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\dashboard.cpsp"
responseStream << ( mSession->getSessionStateString() );
responseStream << "
\n";
responseStream << "\t";
-#line 32 "/home/rock/code/gradido_login_server/src/cpsp/dashboard.cpsp"
+#line 32 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\dashboard.cpsp"
if(mSession->getSessionState() == SESSION_STATE_EMAIL_VERIFICATION_SEND) { responseStream << "\n";
responseStream << "\t
Verification Code E-Mail wurde erfolgreich an dich verschickt, bitte schaue auch in dein Spam-Verzeichnis nach wenn du sie nicht findest und klicke auf den Link den du dort findest oder kopiere den Code hier her:
\n";
responseStream << "\t
\n";
responseStream << "\t";
-#line 38 "/home/rock/code/gradido_login_server/src/cpsp/dashboard.cpsp"
+#line 38 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\dashboard.cpsp"
} responseStream << "\n";
responseStream << "\t
Abmelden \n";
responseStream << "\t
Account löschen \n";
diff --git a/src/cpp/HTTPInterface/LoginPage.cpp b/src/cpp/HTTPInterface/LoginPage.cpp
index e15c84aa9..482e057dd 100644
--- a/src/cpp/HTTPInterface/LoginPage.cpp
+++ b/src/cpp/HTTPInterface/LoginPage.cpp
@@ -5,7 +5,7 @@
#include "Poco/DeflatingStream.h"
-#line 4 "/home/rock/code/gradido_login_server/src/cpsp/login.cpsp"
+#line 4 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\login.cpsp"
#include "../SingletonManager/SessionManager.h"
#include "Poco/Net/HTTPCookie.h"
@@ -21,7 +21,7 @@ void LoginPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Net::
if (_compressResponse) response.set("Content-Encoding", "gzip");
Poco::Net::HTMLForm form(request, request.stream());
-#line 10 "/home/rock/code/gradido_login_server/src/cpsp/login.cpsp"
+#line 10 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\login.cpsp"
auto session = SessionManager::getInstance()->getNewSession();
@@ -79,7 +79,7 @@ void LoginPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Net::
responseStream << "\t
\n";
responseStream << "\t\t
Login \n";
responseStream << "\t\t";
-#line 63 "/home/rock/code/gradido_login_server/src/cpsp/login.cpsp"
+#line 63 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\login.cpsp"
responseStream << ( session->getErrorsHtml() );
responseStream << "\n";
responseStream << "\t\t
\n";
diff --git a/src/cpp/HTTPInterface/PageRequestHandlerFactory.cpp b/src/cpp/HTTPInterface/PageRequestHandlerFactory.cpp
index 1c63515c0..d9abec53c 100644
--- a/src/cpp/HTTPInterface/PageRequestHandlerFactory.cpp
+++ b/src/cpp/HTTPInterface/PageRequestHandlerFactory.cpp
@@ -38,7 +38,7 @@ Poco::Net::HTTPRequestHandler* PageRequestHandlerFactory::createRequestHandler(c
}
if (url_first_part == "/elopage_webhook_261") {
- printf("choose elopage\n");
+ //printf("choose elopage\n");
return new ElopageWebhook;
}
diff --git a/src/cpp/HTTPInterface/PassphrasePage.cpp b/src/cpp/HTTPInterface/PassphrasePage.cpp
index 64cb1dcd2..2da80e58d 100644
--- a/src/cpp/HTTPInterface/PassphrasePage.cpp
+++ b/src/cpp/HTTPInterface/PassphrasePage.cpp
@@ -5,7 +5,7 @@
#include "Poco/DeflatingStream.h"
-#line 7 "/home/rock/code/gradido_login_server/src/cpsp/passphrase.cpsp"
+#line 7 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\passphrase.cpsp"
enum PageState
@@ -29,7 +29,7 @@ void PassphrasePage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::
if (_compressResponse) response.set("Content-Encoding", "gzip");
Poco::Net::HTMLForm form(request, request.stream());
-#line 15 "/home/rock/code/gradido_login_server/src/cpsp/passphrase.cpsp"
+#line 15 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\passphrase.cpsp"
PageState state = PAGE_ASK_PASSPHRASE;
bool hasErrors = mSession->errorCount() > 0;
@@ -94,18 +94,18 @@ void PassphrasePage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::
responseStream << "\n";
responseStream << "\n";
responseStream << "\t";
-#line 75 "/home/rock/code/gradido_login_server/src/cpsp/passphrase.cpsp"
+#line 75 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\passphrase.cpsp"
if(mSession && hasErrors) { responseStream << "\n";
responseStream << "\t\t";
-#line 76 "/home/rock/code/gradido_login_server/src/cpsp/passphrase.cpsp"
+#line 76 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\passphrase.cpsp"
responseStream << ( mSession->getErrorsHtml() );
responseStream << "\n";
responseStream << "\t";
-#line 77 "/home/rock/code/gradido_login_server/src/cpsp/passphrase.cpsp"
+#line 77 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\passphrase.cpsp"
} responseStream << "\n";
responseStream << "\t
Einen neuen Account anlegen \n";
responseStream << "\t";
-#line 79 "/home/rock/code/gradido_login_server/src/cpsp/passphrase.cpsp"
+#line 79 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\passphrase.cpsp"
if(state == PAGE_SHOW_PASSPHRASE) { responseStream << "\n";
responseStream << "\t\t
\n";
responseStream << "\t\t\t
\n";
@@ -113,14 +113,14 @@ void PassphrasePage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::
responseStream << "\t\t\t
\n";
responseStream << "\t\t\t
\n";
responseStream << "\t\t\t\t";
-#line 85 "/home/rock/code/gradido_login_server/src/cpsp/passphrase.cpsp"
+#line 85 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\passphrase.cpsp"
responseStream << ( mSession->getPassphrase() );
responseStream << "\n";
responseStream << "\t\t\t
\n";
responseStream << "\t\t\t
Weiter \n";
responseStream << "\t\t
\n";
responseStream << "\t";
-#line 89 "/home/rock/code/gradido_login_server/src/cpsp/passphrase.cpsp"
+#line 89 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\passphrase.cpsp"
} else if(state == PAGE_ASK_PASSPHRASE) { responseStream << "\n";
responseStream << "\t
Deine E-Mail Adresse wurde erfolgreich bestätigt.
\n";
responseStream << "\t
\n";
responseStream << "\t";
-#line 108 "/home/rock/code/gradido_login_server/src/cpsp/passphrase.cpsp"
+#line 108 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\passphrase.cpsp"
} else { responseStream << "\n";
responseStream << "\t\t
\n";
responseStream << "\t\t\tUngültige Seite, wenn du das siehst stimmt hier etwas nicht. Bitte wende dich an den Server-Admin. \n";
responseStream << "\t\t
\n";
responseStream << "\t";
-#line 112 "/home/rock/code/gradido_login_server/src/cpsp/passphrase.cpsp"
+#line 112 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\passphrase.cpsp"
} responseStream << "\n";
responseStream << "
\n";
responseStream << "\n";
diff --git a/src/cpp/HTTPInterface/RegisterPage.cpp b/src/cpp/HTTPInterface/RegisterPage.cpp
index 66ca2eb8e..d3b5d72a2 100644
--- a/src/cpp/HTTPInterface/RegisterPage.cpp
+++ b/src/cpp/HTTPInterface/RegisterPage.cpp
@@ -5,7 +5,7 @@
#include "Poco/DeflatingStream.h"
-#line 4 "/home/rock/code/gradido_login_server/src/cpsp/register.cpsp"
+#line 4 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\register.cpsp"
#include "../SingletonManager/SessionManager.h"
#include "Poco/Net/HTTPCookie.h"
@@ -19,7 +19,7 @@ void RegisterPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Ne
if (_compressResponse) response.set("Content-Encoding", "gzip");
Poco::Net::HTMLForm form(request, request.stream());
-#line 8 "/home/rock/code/gradido_login_server/src/cpsp/register.cpsp"
+#line 8 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\register.cpsp"
auto session = SessionManager::getInstance()->getNewSession();
bool userReturned = false;
@@ -29,7 +29,8 @@ void RegisterPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Ne
session->addError(new Error("Passwort", "Passwörter sind nicht identisch."));
} else {
userReturned = session->createUser(
- form.get("register-name"),
+ form.get("register-first-name"),
+ form.get("register-last-name"),
form.get("register-email"),
form.get("register-password")
);
@@ -73,7 +74,7 @@ void RegisterPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Ne
responseStream << "\n";
responseStream << "\t
Einen neuen Account anlegen \n";
responseStream << "\t";
-#line 57 "/home/rock/code/gradido_login_server/src/cpsp/register.cpsp"
+#line 58 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\register.cpsp"
if(!form.empty() && userReturned) { responseStream << "\n";
responseStream << "\t\t\n";
responseStream << "\t\t
\n";
@@ -83,34 +84,41 @@ void RegisterPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Ne
responseStream << "\t\t\t
\n";
responseStream << "\t\t
\n";
responseStream << "\t";
-#line 65 "/home/rock/code/gradido_login_server/src/cpsp/register.cpsp"
+#line 66 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\register.cpsp"
} else { responseStream << "\n";
responseStream << "\t\n";
responseStream << "\t\n";
responseStream << "\t\t";
-#line 68 "/home/rock/code/gradido_login_server/src/cpsp/register.cpsp"
+#line 69 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\register.cpsp"
if(!form.empty() && !userReturned) { responseStream << "\n";
responseStream << "\t\t\t";
-#line 69 "/home/rock/code/gradido_login_server/src/cpsp/register.cpsp"
+#line 70 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\register.cpsp"
responseStream << ( session->getErrorsHtml() );
responseStream << "\n";
responseStream << "\t\t";
-#line 70 "/home/rock/code/gradido_login_server/src/cpsp/register.cpsp"
+#line 71 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\register.cpsp"
} responseStream << "\n";
responseStream << "\t\t\n";
responseStream << "\t\t\tAccount anlegen \n";
responseStream << "\t\t\tBitte gebe deine Daten um einen Account anzulegen
\n";
responseStream << "\t\t\t\n";
- responseStream << "\t\t\t\tVorname \n";
- responseStream << "\t\t\t\t Vorname\n";
+ responseStream << "\t\t\t\t \n";
+ responseStream << "\t\t\t
\n";
+ responseStream << "\t\t\t\n";
+ responseStream << "\t\t\t\tNachname \n";
+ responseStream << "\t\t\t\t \n";
responseStream << "\t\t\t
\n";
responseStream << "\t\t\t\n";
responseStream << "\t\t\t\tE-Mail \n";
responseStream << "\t\t\t\t \n";
responseStream << "\t\t\t
\n";
@@ -127,7 +135,7 @@ void RegisterPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Ne
responseStream << "\t\t\n";
responseStream << "\t \n";
responseStream << "\t";
-#line 94 "/home/rock/code/gradido_login_server/src/cpsp/register.cpsp"
+#line 99 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\register.cpsp"
} responseStream << "\n";
responseStream << " \n";
responseStream << "\n";
diff --git a/src/cpp/HTTPInterface/SaveKeysPage.cpp b/src/cpp/HTTPInterface/SaveKeysPage.cpp
index 00acf3527..68c0beade 100644
--- a/src/cpp/HTTPInterface/SaveKeysPage.cpp
+++ b/src/cpp/HTTPInterface/SaveKeysPage.cpp
@@ -5,7 +5,7 @@
#include "Poco/DeflatingStream.h"
-#line 7 "/home/rock/code/gradido_login_server/src/cpsp/saveKeys.cpsp"
+#line 7 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\saveKeys.cpsp"
#include "Poco/Net/HTTPServerParams.h"
@@ -32,7 +32,7 @@ void SaveKeysPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Ne
if (_compressResponse) response.set("Content-Encoding", "gzip");
Poco::Net::HTMLForm form(request, request.stream());
-#line 18 "/home/rock/code/gradido_login_server/src/cpsp/saveKeys.cpsp"
+#line 18 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\saveKeys.cpsp"
bool hasErrors = mSession->errorCount() > 0;
@@ -109,18 +109,18 @@ void SaveKeysPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Ne
responseStream << "\n";
responseStream << "
\n";
responseStream << "\t";
-#line 90 "/home/rock/code/gradido_login_server/src/cpsp/saveKeys.cpsp"
+#line 90 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\saveKeys.cpsp"
if(hasErrors) { responseStream << "\n";
responseStream << "\t\t";
-#line 91 "/home/rock/code/gradido_login_server/src/cpsp/saveKeys.cpsp"
+#line 91 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\saveKeys.cpsp"
responseStream << ( mSession->getErrorsHtml() );
responseStream << "\n";
responseStream << "\t";
-#line 92 "/home/rock/code/gradido_login_server/src/cpsp/saveKeys.cpsp"
+#line 92 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\saveKeys.cpsp"
} responseStream << "\n";
responseStream << "\t
Daten speichern \n";
responseStream << "\t";
-#line 94 "/home/rock/code/gradido_login_server/src/cpsp/saveKeys.cpsp"
+#line 94 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\saveKeys.cpsp"
if(state == PAGE_ASK) { responseStream << "\n";
responseStream << "\t
\n";
responseStream << "\t\t\n";
@@ -135,7 +135,7 @@ void SaveKeysPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Ne
responseStream << "\t\t\t\tJa, bitte speichern! \n";
responseStream << "\t\t\t\n";
responseStream << "\t\t\t";
-#line 107 "/home/rock/code/gradido_login_server/src/cpsp/saveKeys.cpsp"
+#line 107 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\saveKeys.cpsp"
if(!hasPassword) { responseStream << "\n";
responseStream << "\t\t\t\tIch brauche nochmal dein Passwort wenn du dich für ja entscheidest.
\n";
responseStream << "\t\t\t\t\n";
@@ -143,7 +143,7 @@ void SaveKeysPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Ne
responseStream << "\t\t\t\t\t \n";
responseStream << "\t\t\t\t
\n";
responseStream << "\t\t\t";
-#line 113 "/home/rock/code/gradido_login_server/src/cpsp/saveKeys.cpsp"
+#line 113 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\saveKeys.cpsp"
} responseStream << "\n";
responseStream << "\t\t\t\n";
responseStream << "\t\t\t\t \n";
@@ -168,31 +168,31 @@ void SaveKeysPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Ne
responseStream << "\t\t \n";
responseStream << "\t
\n";
responseStream << "\t";
-#line 136 "/home/rock/code/gradido_login_server/src/cpsp/saveKeys.cpsp"
+#line 136 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\saveKeys.cpsp"
} else if(state == PAGE_SHOW_PUBKEY) { responseStream << "\n";
responseStream << "\t\t
\n";
responseStream << "\t\t\t
Je nach Auswahl werden deine Daten nun verschlüsselt und gespeichert.
\n";
responseStream << "\t\t\t
Deine Gradido Adresse (Hex):
\n";
responseStream << "\t\t\t
\n";
responseStream << "\t\t\t\t";
-#line 141 "/home/rock/code/gradido_login_server/src/cpsp/saveKeys.cpsp"
+#line 141 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\saveKeys.cpsp"
responseStream << ( mSession->getUser()->getPublicKeyHex() );
responseStream << "\n";
responseStream << "\t\t\t
\n";
responseStream << "\t\t\t
Zurück zur Startseite \n";
responseStream << "\t\t
\n";
responseStream << "\t";
-#line 145 "/home/rock/code/gradido_login_server/src/cpsp/saveKeys.cpsp"
+#line 145 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\saveKeys.cpsp"
} else if(state == PAGE_ERROR) { responseStream << "\n";
responseStream << "\t\t
\n";
responseStream << "\t\t\t
Ein Fehler trat auf, bitte versuche es erneut oder wende dich an den Server-Admin
\n";
responseStream << "\t\t\t";
-#line 148 "/home/rock/code/gradido_login_server/src/cpsp/saveKeys.cpsp"
+#line 148 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\saveKeys.cpsp"
responseStream << ( mSession->getSessionStateString() );
responseStream << "\n";
responseStream << "\t\t
\n";
responseStream << "\t";
-#line 150 "/home/rock/code/gradido_login_server/src/cpsp/saveKeys.cpsp"
+#line 150 "I:\\Code\\C++\\Eigene_Projekte\\Gradido_LoginServer\\src\\cpsp\\saveKeys.cpsp"
} responseStream << "\n";
responseStream << "
\n";
responseStream << "\n";
diff --git a/src/cpp/MySQL/Binder.cpp b/src/cpp/MySQL/Binder.cpp
index d53d33e47..48098e915 100644
--- a/src/cpp/MySQL/Binder.cpp
+++ b/src/cpp/MySQL/Binder.cpp
@@ -12,7 +12,7 @@
//
-#include "Poco/Data/MySQL/Binder.h"
+#include "Poco/Binder.h"
namespace Poco {
diff --git a/src/cpp/MySQL/Connector.cpp b/src/cpp/MySQL/Connector.cpp
index 5062bad04..d3a86e30c 100644
--- a/src/cpp/MySQL/Connector.cpp
+++ b/src/cpp/MySQL/Connector.cpp
@@ -12,8 +12,8 @@
//
-#include "Poco/Data/MySQL/Connector.h"
-#include "Poco/Data/MySQL/SessionImpl.h"
+#include "Poco/Connector.h"
+#include "Poco/SessionImpl.h"
#include "Poco/Data/SessionFactory.h"
#include "Poco/Exception.h"
#include
diff --git a/src/cpp/MySQL/Extractor.cpp b/src/cpp/MySQL/Extractor.cpp
index db3b601b4..4d724cd68 100644
--- a/src/cpp/MySQL/Extractor.cpp
+++ b/src/cpp/MySQL/Extractor.cpp
@@ -12,7 +12,7 @@
//
-#include "Poco/Data/MySQL/Extractor.h"
+#include "Poco/Extractor.h"
#include "Poco/Data/Date.h"
#include "Poco/Data/Time.h"
diff --git a/src/cpp/MySQL/MySQLException.cpp b/src/cpp/MySQL/MySQLException.cpp
index d3c7d950f..7a4c02c2d 100644
--- a/src/cpp/MySQL/MySQLException.cpp
+++ b/src/cpp/MySQL/MySQLException.cpp
@@ -12,7 +12,7 @@
//
-#include "Poco/Data/MySQL/MySQLException.h"
+#include "Poco/MySQLException.h"
#include
#include
diff --git a/src/cpp/MySQL/MySQLStatementImpl.cpp b/src/cpp/MySQL/MySQLStatementImpl.cpp
index 6a805c803..210bce7e8 100644
--- a/src/cpp/MySQL/MySQLStatementImpl.cpp
+++ b/src/cpp/MySQL/MySQLStatementImpl.cpp
@@ -12,7 +12,7 @@
//
-#include "Poco/Data/MySQL/MySQLStatementImpl.h"
+#include "Poco/MySQLStatementImpl.h"
namespace Poco {
namespace Data {
diff --git a/src/cpp/MySQL/Poco/Binder.h b/src/cpp/MySQL/Poco/Binder.h
index 4837be00d..487a6a668 100644
--- a/src/cpp/MySQL/Poco/Binder.h
+++ b/src/cpp/MySQL/Poco/Binder.h
@@ -17,10 +17,10 @@
#ifndef Data_MySQL_Binder_INCLUDED
#define Data_MySQL_Binder_INCLUDED
-#include "Poco/Data/MySQL/MySQL.h"
+#include "Poco/MySQL.h"
#include "Poco/Data/AbstractBinder.h"
#include "Poco/Data/LOB.h"
-#include "Poco/Data/MySQL/MySQLException.h"
+#include "Poco/MySQLException.h"
#ifdef _WIN32
#pragma comment(lib, "Ws2_32.lib")
#pragma comment(lib, "shlwapi.lib")
@@ -32,7 +32,7 @@ namespace Data {
namespace MySQL {
-class MySQL_API Binder: public Poco::Data::AbstractBinder
+class Binder: public Poco::Data::AbstractBinder
/// Binds placeholders in the sql query to the provided values. Performs data types mapping.
{
public:
diff --git a/src/cpp/MySQL/Poco/Connector.h b/src/cpp/MySQL/Poco/Connector.h
index cec55e29a..afcfba19b 100644
--- a/src/cpp/MySQL/Poco/Connector.h
+++ b/src/cpp/MySQL/Poco/Connector.h
@@ -18,7 +18,7 @@
#define Data_MySQL_Connector_INCLUDED
-#include "Poco/Data/MySQL/MySQL.h"
+#include "MySQL.h"
#include "Poco/Data/Connector.h"
@@ -27,7 +27,7 @@ namespace Data {
namespace MySQL {
-class MySQL_API Connector: public Poco::Data::Connector
+class Connector: public Poco::Data::Connector
/// Connector instantiates MySQL SessionImpl objects.
{
public:
diff --git a/src/cpp/MySQL/Poco/Extractor.h b/src/cpp/MySQL/Poco/Extractor.h
index 67dfb100e..45673500c 100644
--- a/src/cpp/MySQL/Poco/Extractor.h
+++ b/src/cpp/MySQL/Poco/Extractor.h
@@ -18,9 +18,9 @@
#define Data_MySQL_Extractor_INCLUDED
-#include "Poco/Data/MySQL/MySQL.h"
-#include "Poco/Data/MySQL/StatementExecutor.h"
-#include "Poco/Data/MySQL/ResultMetadata.h"
+#include "Poco/MySQL.h"
+#include "Poco/StatementExecutor.h"
+#include "Poco/ResultMetadata.h"
#include "Poco/Data/AbstractExtractor.h"
#include "Poco/Data/LOB.h"
@@ -35,7 +35,7 @@ namespace Data {
namespace MySQL {
-class MySQL_API Extractor: public Poco::Data::AbstractExtractor
+class Extractor: public Poco::Data::AbstractExtractor
/// Extracts and converts data values from the result row returned by MySQL.
/// If NULL is received, the incoming val value is not changed and false is returned
{
diff --git a/src/cpp/MySQL/Poco/MySQL.h b/src/cpp/MySQL/Poco/MySQL.h
index 64c76e974..5688d3487 100644
--- a/src/cpp/MySQL/Poco/MySQL.h
+++ b/src/cpp/MySQL/Poco/MySQL.h
@@ -21,40 +21,4 @@
#include "Poco/Foundation.h"
-//
-// The following block is the standard way of creating macros which make exporting
-// from a DLL simpler. All files within this DLL are compiled with the ODBC_EXPORTS
-// symbol defined on the command line. this symbol should not be defined on any project
-// that uses this DLL. This way any other project whose source files include this file see
-// ODBC_API functions as being imported from a DLL, wheras this DLL sees symbols
-// defined with this macro as being exported.
-//
-#if defined(_WIN32) && defined(POCO_DLL)
- #if defined(MySQL_EXPORTS)
- #define MySQL_API __declspec(dllexport)
- #else
- #define MySQL_API __declspec(dllimport)
- #endif
-#endif
-
-
-#if !defined(MySQL_API)
- #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4)
- #define MySQL_API __attribute__ ((visibility ("default")))
- #else
- #define MySQL_API
- #endif
-#endif
-
-
-//
-// Automatically link Data library.
-//
-#if defined(_MSC_VER)
- #if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(MySQL_EXPORTS)
- #pragma comment(lib, "PocoDataMySQL" POCO_LIB_SUFFIX)
- #endif
-#endif
-
-
#endif // MySQL_MySQL_INCLUDED
diff --git a/src/cpp/MySQL/Poco/MySQLException.h b/src/cpp/MySQL/Poco/MySQLException.h
index 6822abafb..499b270d5 100644
--- a/src/cpp/MySQL/Poco/MySQLException.h
+++ b/src/cpp/MySQL/Poco/MySQLException.h
@@ -17,7 +17,7 @@
#ifndef Data_MySQL_MySQLException_INCLUDED
#define Data_MySQL_MySQLException_INCLUDED
-#include "Poco/Data/MySQL/MySQL.h"
+#include "Poco/MySQL.h"
#include "Poco/Data/DataException.h"
#include
#include
@@ -34,7 +34,7 @@ namespace MySQL {
// End-user include this file and use in code ConnectionException/StatementException
// So it need not know
-class MySQL_API MySQLException: public Poco::Data::DataException
+class MySQLException: public Poco::Data::DataException
/// Base class for all MySQL exceptions
{
public:
diff --git a/src/cpp/MySQL/Poco/MySQLStatementImpl.h b/src/cpp/MySQL/Poco/MySQLStatementImpl.h
index ee5bae040..43bec52c1 100644
--- a/src/cpp/MySQL/Poco/MySQLStatementImpl.h
+++ b/src/cpp/MySQL/Poco/MySQLStatementImpl.h
@@ -17,12 +17,12 @@
#ifndef Data_MySQL_MySQLStatementImpl_INCLUDED
#define Data_MySQL_MySQLStatementImpl_INCLUDED
-#include "Poco/Data/MySQL/MySQL.h"
-#include "Poco/Data/MySQL/SessionImpl.h"
-#include "Poco/Data/MySQL/Binder.h"
-#include "Poco/Data/MySQL/Extractor.h"
-#include "Poco/Data/MySQL/StatementExecutor.h"
-#include "Poco/Data/MySQL/ResultMetadata.h"
+#include "Poco/MySQL.h"
+#include "Poco/SessionImpl.h"
+#include "Poco/Binder.h"
+#include "Poco/Extractor.h"
+#include "Poco/StatementExecutor.h"
+#include "Poco/ResultMetadata.h"
#include "Poco/Data/StatementImpl.h"
#include "Poco/SharedPtr.h"
#include "Poco/Format.h"
@@ -33,7 +33,7 @@ namespace Data {
namespace MySQL {
-class MySQL_API MySQLStatementImpl: public Poco::Data::StatementImpl
+class MySQLStatementImpl: public Poco::Data::StatementImpl
/// Implements statement functionality needed for MySQL
{
public:
diff --git a/src/cpp/MySQL/Poco/SessionHandle.h b/src/cpp/MySQL/Poco/SessionHandle.h
index 235d1f90b..17d3dea37 100644
--- a/src/cpp/MySQL/Poco/SessionHandle.h
+++ b/src/cpp/MySQL/Poco/SessionHandle.h
@@ -18,7 +18,7 @@
#define Data_MySQL_SessionHandle_INCLUDED
#include
-#include "Poco/Data/MySQL/MySQLException.h"
+#include "Poco/MySQLException.h"
namespace Poco {
namespace Data {
diff --git a/src/cpp/MySQL/Poco/SessionImpl.h b/src/cpp/MySQL/Poco/SessionImpl.h
index d80c09c6c..7725124aa 100644
--- a/src/cpp/MySQL/Poco/SessionImpl.h
+++ b/src/cpp/MySQL/Poco/SessionImpl.h
@@ -18,11 +18,11 @@
#define Data_MySQL_SessionImpl_INCLUDED
-#include "Poco/Data/MySQL/MySQL.h"
+#include "Poco/MySQL.h"
#include "Poco/Data/AbstractSessionImpl.h"
-#include "Poco/Data/MySQL/SessionHandle.h"
-#include "Poco/Data/MySQL/StatementExecutor.h"
-#include "Poco/Data/MySQL/ResultMetadata.h"
+#include "Poco/SessionHandle.h"
+#include "Poco/StatementExecutor.h"
+#include "Poco/ResultMetadata.h"
#include "Poco/Mutex.h"
@@ -31,7 +31,7 @@ namespace Data {
namespace MySQL {
-class MySQL_API SessionImpl: public Poco::Data::AbstractSessionImpl
+class SessionImpl: public Poco::Data::AbstractSessionImpl
/// Implements SessionImpl interface
{
public:
diff --git a/src/cpp/MySQL/Poco/StatementExecutor.h b/src/cpp/MySQL/Poco/StatementExecutor.h
index 632d3a7f3..eabf136b8 100644
--- a/src/cpp/MySQL/Poco/StatementExecutor.h
+++ b/src/cpp/MySQL/Poco/StatementExecutor.h
@@ -18,7 +18,7 @@
#define Data_MySQL_StatementHandle_INCLUDED
#include
-#include "Poco/Data/MySQL/MySQLException.h"
+#include "Poco/MySQLException.h"
namespace Poco {
namespace Data {
diff --git a/src/cpp/MySQL/Poco/Utility.h b/src/cpp/MySQL/Poco/Utility.h
index 95f0ca3af..d8ff70b84 100644
--- a/src/cpp/MySQL/Poco/Utility.h
+++ b/src/cpp/MySQL/Poco/Utility.h
@@ -18,7 +18,7 @@
#define MySQL_Utility_INCLUDED
-#include "Poco/Data/MySQL/MySQL.h"
+#include "Poco/MySQL.h"
#include "Poco/Data/Session.h"
@@ -31,7 +31,7 @@ namespace Data {
namespace MySQL {
-class MySQL_API Utility
+class Utility
/// Various utility functions for MySQL.
{
public:
diff --git a/src/cpp/MySQL/ResultMetadata.cpp b/src/cpp/MySQL/ResultMetadata.cpp
index 91d854cd4..4579e9d50 100644
--- a/src/cpp/MySQL/ResultMetadata.cpp
+++ b/src/cpp/MySQL/ResultMetadata.cpp
@@ -12,8 +12,8 @@
//
-#include "Poco/Data/MySQL/ResultMetadata.h"
-#include "Poco/Data/MySQL/MySQLException.h"
+#include "Poco/ResultMetadata.h"
+#include "Poco/MySQLException.h"
#include
namespace
diff --git a/src/cpp/MySQL/SessionHandle.cpp b/src/cpp/MySQL/SessionHandle.cpp
index 37616acd2..ea502a468 100644
--- a/src/cpp/MySQL/SessionHandle.cpp
+++ b/src/cpp/MySQL/SessionHandle.cpp
@@ -12,7 +12,7 @@
//
-#include "Poco/Data/MySQL/SessionHandle.h"
+#include "Poco/SessionHandle.h"
#include "Poco/Data/DataException.h"
#include "Poco/SingletonHolder.h"
#ifdef POCO_OS_FAMILY_UNIX
diff --git a/src/cpp/MySQL/SessionImpl.cpp b/src/cpp/MySQL/SessionImpl.cpp
index 64ab76529..011c14d6c 100644
--- a/src/cpp/MySQL/SessionImpl.cpp
+++ b/src/cpp/MySQL/SessionImpl.cpp
@@ -12,8 +12,8 @@
//
-#include "Poco/Data/MySQL/SessionImpl.h"
-#include "Poco/Data/MySQL/MySQLStatementImpl.h"
+#include "Poco/SessionImpl.h"
+#include "Poco/MySQLStatementImpl.h"
#include "Poco/Data/Session.h"
#include "Poco/NumberParser.h"
#include "Poco/String.h"
diff --git a/src/cpp/MySQL/StatementExecutor.cpp b/src/cpp/MySQL/StatementExecutor.cpp
index 1c5a3cc88..10fdeb4d0 100644
--- a/src/cpp/MySQL/StatementExecutor.cpp
+++ b/src/cpp/MySQL/StatementExecutor.cpp
@@ -13,7 +13,7 @@
#include
-#include "Poco/Data/MySQL/StatementExecutor.h"
+#include "Poco/StatementExecutor.h"
#include "Poco/Format.h"
diff --git a/src/cpp/MySQL/Utility.cpp b/src/cpp/MySQL/Utility.cpp
index b711901ce..eb3cff347 100644
--- a/src/cpp/MySQL/Utility.cpp
+++ b/src/cpp/MySQL/Utility.cpp
@@ -14,7 +14,7 @@
//
-#include "Poco/Data/MySQL/Utility.h"
+#include "Poco/Utility.h"
#include
diff --git a/src/cpp/ServerConfig.cpp b/src/cpp/ServerConfig.cpp
index 68de64c75..1a225aaac 100644
--- a/src/cpp/ServerConfig.cpp
+++ b/src/cpp/ServerConfig.cpp
@@ -104,14 +104,17 @@ namespace ServerConfig {
const std::string& certificateStoreName = CERT_STORE_MY);
*/
try {
- g_SSL_CLient_Context = new Context(Context::CLIENT_USE, "", "", "cacert.pem", Context::VERIFY_RELAXED, 9, true, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
+#ifdef POCO_NETSSL_WIN
+ g_SSL_CLient_Context = new Context(Context::CLIENT_USE, "cacert.pem", Context::VERIFY_RELAXED, Context::OPT_DEFAULTS);
+#else
+
+ g_SSL_CLient_Context = new Context(Context::CLIENT_USE, "", "", "cacert.pem", Context::VERIFY_RELAXED, 9, true, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
+#endif
} catch(Poco::Exception& ex) {
printf("[ServerConfig::initSSLClientContext] error init ssl context, maybe no cacert.pem found?\nPlease make sure you have cacert.pem (CA/root certificates) next to binary from https://curl.haxx.se/docs/caextract.html\n");
return false;
}
- //g_SSL_CLient_Context = new Context(Context::CLIENT_USE, "", "", "", Context::VERIFY_RELAXED, 9, true, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
- // another poco version?
- //g_SSL_CLient_Context = new Context(Context::CLIENT_USE, "", Context::VERIFY_RELAXED, Context::OPT_DEFAULTS);
+
SSLManager::instance().initializeClient(0, pCert, g_SSL_CLient_Context);
return true;
diff --git a/src/cpp/SingletonManager/ConnectionManager.h b/src/cpp/SingletonManager/ConnectionManager.h
index 7562fdacf..3736f8526 100644
--- a/src/cpp/SingletonManager/ConnectionManager.h
+++ b/src/cpp/SingletonManager/ConnectionManager.h
@@ -6,7 +6,7 @@
#include "Poco/Util/LayeredConfiguration.h"
#include "Poco/Data/SessionPoolContainer.h"
-#include "Poco/Data/MySQL/Connector.h"
+#include "../MySQL/Poco/Connector.h"
#include "Poco/Exception.h"
#include "../model/ErrorList.h"
diff --git a/src/cpp/model/Session.cpp b/src/cpp/model/Session.cpp
index abcd96e8c..24622bf57 100644
--- a/src/cpp/model/Session.cpp
+++ b/src/cpp/model/Session.cpp
@@ -94,6 +94,7 @@ Session::~Session()
void Session::reset()
{
+ printf("[Session::reset]\n");
lock();
mSessionUser = nullptr;
@@ -108,6 +109,7 @@ void Session::reset()
mClientLoginIP = Poco::Net::IPAddress();
mEmailVerificationCode = 0;
unlock();
+ printf("[Session::reset] finished\n");
}
void Session::updateTimeout()
@@ -117,14 +119,18 @@ void Session::updateTimeout()
unlock();
}
-bool Session::createUser(const std::string& name, const std::string& email, const std::string& password)
+bool Session::createUser(const std::string& first_name, const std::string& last_name, const std::string& email, const std::string& password)
{
Profiler usedTime;
auto sm = SessionManager::getInstance();
- if (!sm->isValid(name, VALIDATE_NAME)) {
+ if (!sm->isValid(first_name, VALIDATE_NAME)) {
addError(new Error("Vorname", "Bitte gebe einen Namen an. Mindestens 3 Zeichen, keine Sonderzeichen oder Zahlen."));
return false;
}
+ if (!sm->isValid(last_name, VALIDATE_NAME)) {
+ addError(new Error("Nachname", "Bitte gebe einen Namen an. Mindestens 3 Zeichen, keine Sonderzeichen oder Zahlen."));
+ return false;
+ }
if (!sm->isValid(email, VALIDATE_EMAIL)) {
addError(new Error("E-Mail", "Bitte gebe eine gültige E-Mail Adresse an."));
return false;
@@ -177,7 +183,7 @@ bool Session::createUser(const std::string& name, const std::string& email, cons
printf("mysql exception: %s\n", exc.displayText().data());
}
- mSessionUser = new User(email.data(), name.data());
+ mSessionUser = new User(email.data(), first_name.data(), last_name.data());
updateTimeout();
// Prepare E-Mail
@@ -321,7 +327,7 @@ bool Session::deleteUser()
bResult = mSessionUser->deleteFromDB();
}
if(!bResult) {
- addError(new Error("Benutzer", "Fehler beim löschen des Accounts. Bitte logge dich erneut ein und versuche es nochmal."));
+ addError(new Error("Benutzer", "Fehler beim Löschen des Accounts. Bitte logge dich erneut ein und versuche es nochmal."));
}
return bResult;
@@ -392,7 +398,7 @@ Poco::Net::HTTPCookie Session::getLoginCookie()
// prevent reading or changing cookie with js
keks.setHttpOnly();
// send cookie only via https
- keks.setSecure(true);
+ //keks.setSecure(true);
return keks;
}
diff --git a/src/cpp/model/Session.h b/src/cpp/model/Session.h
index 69e9f97d8..9292a033d 100644
--- a/src/cpp/model/Session.h
+++ b/src/cpp/model/Session.h
@@ -52,7 +52,7 @@ public:
// TODO: automatic redirect after some time, median profiled time for register
// TODO: register state: written into db, mails sended, update state only if new state is higher as old state
- bool createUser(const std::string& name, const std::string& email, const std::string& password);
+ bool createUser(const std::string& first_name, const std::string& last_name, const std::string& email, const std::string& password);
// TODO: check if email exist and if not, fake waiting on password hashing with profiled times of real password hashing
bool loadUser(const std::string& email, const std::string& password);
diff --git a/src/cpp/model/User.cpp b/src/cpp/model/User.cpp
index 771a1ce87..84d2d0801 100644
--- a/src/cpp/model/User.cpp
+++ b/src/cpp/model/User.cpp
@@ -144,8 +144,8 @@ int UserWriteKeysIntoDB::run()
// *******************************************************************************
// new user
-User::User(const char* email, const char* name)
- : mDBId(0), mEmail(email), mFirstName(name), mPasswordHashed(0), mEmailChecked(false), mCryptoKey(nullptr)
+User::User(const char* email, const char* first_name, const char* last_name)
+ : mDBId(0), mEmail(email), mFirstName(first_name), mLastName(last_name), mPasswordHashed(0), mEmailChecked(false), mCryptoKey(nullptr)
{
}
@@ -162,8 +162,8 @@ User::User(const char* email)
Poco::Data::Statement select(session);
int email_checked = 0;
- select << "SELECT id, name, password, pubkey, email_checked from users where email = ?",
- into(mDBId), into(mFirstName), into(mPasswordHashed), into(pubkey), into(email_checked), use(mEmail);
+ select << "SELECT id, first_name, last_name, password, pubkey, email_checked from users where email = ?",
+ into(mDBId), into(mFirstName), into(mLastName), into(mPasswordHashed), into(pubkey), into(email_checked), use(mEmail);
try {
auto result = select.execute();
int zahl = 1;
@@ -283,21 +283,30 @@ bool User::deleteFromDB()
Poco::Data::Statement deleteFromDB(session);
//DELETE FROM `table_name` [WHERE condition];
- deleteFromDB
+ std::string tables[] = { "users", "email_opt_in", "user_backups" };
+
+ /*deleteFromDB
<< "DELETE from users where id = ?;"
- << "DELETE from email_opt_in where user_id = ?;"
- << "DELETE from user_backups where user_id = ?",
+ "DELETE from email_opt_in where user_id = ?;"
+ "DELETE from user_backups where user_id = ?",
use(mDBId), use(mDBId), use(mDBId);
-
- try {
- auto result = deleteFromDB.execute();
- printf("[User::deleteFromDB] deleted: %d\n", result);
- } catch(Poco::Exception& ex) {
- em->addError(new ParamError("[User::deleteFromDB]", "error deleting user tables", ex.displayText().data()));
- em->sendErrorsAsEmail();
- return false;
+ */
+ for (int i = 0; i < 3; i++) {
+ if (i > 0) deleteFromDB.reset(session);
+ deleteFromDB << "DELETE from " << tables[i] << " where id = ?", use(mDBId);
+
+ try {
+ auto result = deleteFromDB.execute();
+ //printf("[User::deleteFromDB] %s deleted: %d\n", tables[i].data(), result);
+ }
+ catch (Poco::Exception& ex) {
+ em->addError(new ParamError("[User::deleteFromDB]", "error deleting user tables", ex.displayText().data()));
+ em->sendErrorsAsEmail();
+ //return false;
+ }
}
+
return true;
}
@@ -425,8 +434,8 @@ Poco::Data::Statement User::insertIntoDB(Poco::Data::Session session)
//Poco::Data::BLOB pwd(&mPasswordHashed[0], crypto_shorthash_BYTES);
//printf("[User::insertIntoDB] password hashed: %llu\n", mPasswordHashed);
- insert << "INSERT INTO users (email, name, password) VALUES(?, ?, ?);",
- use(mEmail), use(mFirstName), bind(mPasswordHashed);
+ insert << "INSERT INTO users (email, first_name, last_name, password) VALUES(?, ?, ?, ?);",
+ use(mEmail), use(mFirstName), use(mLastName), bind(mPasswordHashed);
return insert;
}
diff --git a/src/cpp/model/User.h b/src/cpp/model/User.h
index 68dacfeaf..a8d9ba558 100644
--- a/src/cpp/model/User.h
+++ b/src/cpp/model/User.h
@@ -22,7 +22,7 @@ class User : public ErrorList
friend UserWriteIntoDB;
public:
// new user
- User(const char* email, const char* name);
+ User(const char* email, const char* first_name, const char* last_name);
// existing user
User(const char* email);
// login
@@ -43,7 +43,8 @@ public:
inline bool hasCryptoKey() { lock(); bool bRet = mCryptoKey != nullptr; unlock(); return bRet; }
inline const char* getEmail() const { return mEmail.data(); }
- inline const char* getName() const { return mFirstName.data(); }
+ inline const char* getFirstName() const { return mFirstName.data(); }
+ inline const char* getLastName() const { return mLastName.data(); }
inline int getDBId() const { return mDBId; }
inline void setEmailChecked() { mEmailChecked = true; }
inline bool isEmailChecked() { return mEmailChecked; }
@@ -78,6 +79,7 @@ private:
int mDBId;
std::string mEmail;
std::string mFirstName;
+ std::string mLastName;
passwordHashed mPasswordHashed;
bool mEmailChecked;
diff --git a/src/cpp/tasks/Thread.cpp b/src/cpp/tasks/Thread.cpp
index 7017a641f..36dc5b1ed 100644
--- a/src/cpp/tasks/Thread.cpp
+++ b/src/cpp/tasks/Thread.cpp
@@ -21,7 +21,7 @@ namespace UniLib {
Thread::~Thread()
{
- printf("[Thread::~Thread]\n");
+ //printf("[Thread::~Thread]\n");
if(mPocoThread)
{
//Post Exit to Thread
diff --git a/src/cpsp/register.cpsp b/src/cpsp/register.cpsp
index 49dbc53d4..f3ba9f13f 100644
--- a/src/cpsp/register.cpsp
+++ b/src/cpsp/register.cpsp
@@ -14,7 +14,8 @@
session->addError(new Error("Passwort", "Passwörter sind nicht identisch."));
} else {
userReturned = session->createUser(
- form.get("register-name"),
+ form.get("register-first-name"),
+ form.get("register-last-name"),
form.get("register-email"),
form.get("register-password")
);
@@ -72,8 +73,12 @@ label:not(.grd_radio_label) {
Account anlegen
Bitte gebe deine Daten um einen Account anzulegen
- Vorname
- "/>
+ Vorname
+ "/>
+
+
+ Nachname
+ "/>
E-Mail