Demonstrate SQL injection in PL/pgSQL
问题 I have this function in plpgsql: CREATE OR REPLACE function login_v(em varchar, passwd varchar) RETURNS users AS $$ DECLARE cu users; BEGIN SELECT * into cu FROM users where email = em AND encrypted_password = crypt(passwd, encrypted_password); return cu; END $$ LANGUAGE plpgsql; When I provide an input like this: select login_v('test@test.com'' OR 1=1;--','la la la'); , I think my method should return the user with email test@test.com . What Am I doing wrong? Performing SQL injection is