Skip to content

Commit

Permalink
Fixed registering on the default authenticator
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Fernandez committed Oct 31, 2010
1 parent 413f376 commit 654a0cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/database/Authenticator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ SECRET_PAIR DefaultAuthenticator::getSecret(ScopedConnection &conn,

bool DefaultAuthenticator::registerUser(ScopedConnection &conn,
const string &user, const string &password, const string &ip) {
string hexPassword = DatabaseRegistry::getShaHexHash(password);
Query query = conn->query(
"INSERT INTO users (name, password, activity, ip) "
"VALUES (%0q, %1q, now(), %2q)"
);
query.parse();
query.execute(user, password, ip);
query.execute(user, hexPassword, ip);
return true;
}

Expand Down

0 comments on commit 654a0cd

Please sign in to comment.