10-02-2017 11:04 PM - edited 02-21-2020 10:35 AM
hi
how can i verify stored md5 hash password on mysql with ISE ODBC store procedure. no problem with stored cleartext passwd
example ;
mysql> select * from users;
+---------+----------+----------------------------------+
| user_id | username | password |
+---------+----------+----------------------------------+
| 1 | murat | password |
| 4 | test1 | 2ac9cb7dc02b3c0083eb70898e549b63 |
+---------+----------+----------------------------------+
store procedure with cleartext ; ( murat user is working at auth.)
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `ISEAuthUserPlainReturnsRecordset`(username varchar(64), password varchar(255))
begin
IF EXISTS (select * from users where users.username = username and users.password = password.) THEN
select 0,11,'This is a very good user, give him all access','no error';
ELSE
select 3, 0, 'odbc','ODBC Authen Error';
END IF;
end //
store procedure with md5 ; (test1 user not working)
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `ISEAuthUserPlainReturnsRecordset`(username varchar(64), password varchar(255))
begin
IF EXISTS (select * from users where users.username = username and users.password = md5(password)) THEN
select 0,11,'This is a very good user, give him all access','no error';
ELSE
select 3, 0, 'odbc','ODBC Authen Error';
END IF;
end //
10-03-2017 01:04 PM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide