Actions
Bug #4734
closedWt::Dbo segfaults when calling sql functions
Start date:
02/14/2016
Due date:
% Done:
0%
Estimated time:
Description
I am working on a password authentication module, where the passwordhash and the salt are stored in a mysql database. This very simple code gives me a consistent segfault:
Wt::Dbo::backend::MySQL database
( conf.mysql_database
, conf.mysql_user
, conf.mysql_password
, conf.mysql_server_ip
, conf.mysql_server_port
, conf.mysql_client_socket.string() );
std::string username("user");
std::string password("12345");
Wt::Dbo::Session session;
session.setConnection(database);
std::string authenticated;
{
Wt::Dbo::Transaction transaction(session);
authenticated = session.template query<std::string>
("select sha1(?), salt from User where username = ?")
.bind(password)
.bind(username);
}
After tracing the segfault it happens in
Wt/Dbo/backend/MySQL.C:138
in the function
virtual void MySQLStatement::bind(int column, const std::string& value)
Updated by Koen Deforche almost 9 years ago
- Status changed from New to InProgress
- Assignee set to Koen Deforche
- Target version set to 3.3.6
Updated by Koen Deforche almost 9 years ago
- Status changed from InProgress to Feedback
I tested this and it seems to work correctly though (with latest wt git). What version of Wt are you using?
Updated by Koen Deforche almost 9 years ago
- Status changed from Feedback to InProgress
Actually, I got it failing now.
Updated by Koen Deforche almost 9 years ago
- Status changed from InProgress to Resolved
Updated by Koen Deforche over 8 years ago
- Status changed from Resolved to Closed
Actions