Commit 44974fe5 authored by jan.koester's avatar jan.koester
Browse files

wizzard proetected

parent fbba1cb8
Loading
Loading
Loading
Loading
Loading
+11 −1
Changes for src/authdb.cpp: 11 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include <iostream>
#include <cstring>
#include <sstream>
#include <mutex>
#include <map>
#include <fstream>

@@ -50,6 +51,9 @@
#include "admin.h"

namespace authdb {

    std::mutex g_wizzard;

    bool initalized=true;

    class AuthDB : public libhttppp::HttpEvent{
@@ -450,10 +454,16 @@ VALUEFOUND:
        }

        void RequestEvent(libhttppp::HttpRequest * curreq, const int tid, ULONG_PTR args){
            libhttppp::HttpForm form;
            std::lock_guard<std::mutex> wlock(g_wizzard);

            AuthBackend *backend=(AuthBackend*)args;

            if(backend->end()>sizeof(authdb::AuthHeader)){
                return;
            }

            libhttppp::HttpForm form;

            form.parse(curreq);

            std::string username,password,pwhash;