From 63de1053dfda1faca22a84afb82d6b1315b8db6e Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Wed, 9 Jul 2014 12:47:03 +0200 Subject: added sql.user_match + username character check --- tests/sql/mysqli_user_match_error.phpt | 18 ++++++++++++++++++ tests/sql/mysqli_user_match_ok.phpt | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 tests/sql/mysqli_user_match_error.phpt create mode 100644 tests/sql/mysqli_user_match_ok.phpt (limited to 'tests') diff --git a/tests/sql/mysqli_user_match_error.phpt b/tests/sql/mysqli_user_match_error.phpt new file mode 100644 index 0000000..69db081 --- /dev/null +++ b/tests/sql/mysqli_user_match_error.phpt @@ -0,0 +1,18 @@ +--TEST-- +Mysqli connect with user_match not matching username +--INI-- +extension=mysqli.so +suhosin.sql.user_match=complicated_userprefix* +suhosin.log.stdout=32 +--SKIPIF-- + +--FILE-- + +--EXPECTREGEX-- +ALERT - SQL username .* does not match.* \ No newline at end of file diff --git a/tests/sql/mysqli_user_match_ok.phpt b/tests/sql/mysqli_user_match_ok.phpt new file mode 100644 index 0000000..4d7a438 --- /dev/null +++ b/tests/sql/mysqli_user_match_ok.phpt @@ -0,0 +1,18 @@ +--TEST-- +Mysqli connect with user_match not matching username +--INI-- +extension=mysqli.so +suhosin.sql.user_match=invalid_* +suhosin.log.stdout=32 +--SKIPIF-- + +--FILE-- + +--EXPECTREGEX-- +.*Access denied for user 'invalid_username'.* \ No newline at end of file -- cgit v1.3