Commit be80b259 authored by jan.koester's avatar jan.koester
Browse files

new httpform api

parent c450ffeb
Loading
Loading
Loading
Loading
Loading
+148 −162

File changed.

Preview size limit exceeded, changes collapsed.

+5 −6
Changes for src/authdb.cpp: 5 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -93,12 +93,11 @@ namespace authdb {

            std::string username,password,pwhash;

            for(libhttppp::HttpForm::UrlcodedForm::Data *curformdat=form.UrlFormData.getFormData();
                curformdat; curformdat=curformdat->nextData()){
                if(curformdat->getKey()=="username")
                    username=curformdat->getValue();
                else if(curformdat->getKey()=="password")
                    password=curformdat->getValue();
            for(const auto &curformdat : form.urlData()){
                if(curformdat.key=="username")
                    username=curformdat.value;
                else if(curformdat.key=="password")
                    password=curformdat.value;
                }

                if(!password.empty() && !username.empty()){