23 #include "user_verifier.h"
25 #include <config/config.h>
26 #include <core/exception.h>
27 #include <logging/logger.h>
65 std::string userpath = std::string(
"/webview/users/") + user;
66 std::string confpass = config->
get_string(userpath.c_str());
68 if (confpass.compare(0, 11,
"!cleartext!") == 0) {
69 return (confpass.substr(11) == password);
73 return (apr_password_validate(password, confpass.c_str()) == APR_SUCCESS);
75 #elif defined(HAVE_CRYPT)
80 char *crypted = crypt_r(password, confpass.c_str(), &cd);
82 char *crypted = crypt(password, confpass.c_str());
85 if (confpass == crypted) {
93 return (confpass == password);