Re: [Cppcms-users] getting dbixx::session::escaped_query string
Brought to you by:
artyom-beilis
From: augustin <aug...@ov...> - 2010-11-01 12:48:45
|
On Monday 01 November 2010 03:29:39 pm Artyom wrote: > What is md5 function? Is it cppcms::util::md5 or something else? Because > of so it creates 16 characters binary string and you probably > need cppcms::util::md5hex > for 32 hexadecimal characters. It was something else that I found elsewhere on the web. I forgot you already provided the equivalent within the utils. I now use cppcms::util::md5hex and it works equally well. Thanks. > BTW I suggest to salt passwords to prevent using rainbow tables. Yes, I will. > You can add debug printing in line 310 of session.cpp in function > session::single > Before line: > > dbi_result res=dbi_conn_query(conn,escaped_query.c_str()); > > Add: > > std::cerr << "[" << escaped_query <<"]" << std::endl; > > Also if exception is thrown > you can request query() parameter of dbixx_error. Can't dbixx::session::escaped_query be made public? That would be useful both for bebugging and query logging purposes? Maybe it would be safer to simply implement a getEscaped_query() function, but how could I use my own function to modify the query in other ways (e.g. automatically add a prefix to table names)? Even if I make a class derived from dbixx::session, I still wouldn't be able to read AND modify the query as long as escaped_query is private, right? augustin. -- Friends: http://www.reuniting.info/ http://activistsolutions.org/ My projects: http://astralcity.org/ http://3enjeux.overshoot.tv/ http://linux.overshoot.tv/ http://overshoot.tv/ http://charityware.info/ http://masquilier.org/ http://openteacher.info/ http://minguo.info/ http://www.wechange.org/ http://searching911.info/ . |