diff options
| author | Ben Fuhrmannek | 2014-07-09 15:23:19 +0200 |
|---|---|---|
| committer | Ben Fuhrmannek | 2014-07-09 15:23:19 +0200 |
| commit | 1f52bf0e933fdc0cdb2c7990f2684ad96f5056fc (patch) | |
| tree | 78b5ef667e8c7019739c901a742889599eb07802 | |
| parent | e10330a298e2da81d3733e8561e5715e695feeaa (diff) | |
test cases for user_prefix + user_postfix
| -rw-r--r-- | tests/sql/mysqli_user_postfix.phpt | 18 | ||||
| -rw-r--r-- | tests/sql/mysqli_user_prefix.phpt | 18 |
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/sql/mysqli_user_postfix.phpt b/tests/sql/mysqli_user_postfix.phpt new file mode 100644 index 0000000..11e3fe6 --- /dev/null +++ b/tests/sql/mysqli_user_postfix.phpt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | --TEST-- | ||
| 2 | Mysqli connect with user_postfix | ||
| 3 | --INI-- | ||
| 4 | extension=mysqli.so | ||
| 5 | suhosin.sql.user_postfix=_post | ||
| 6 | suhosin.log.stdout=32 | ||
| 7 | --SKIPIF-- | ||
| 8 | <?php | ||
| 9 | include('skipifmysqli.inc'); | ||
| 10 | include('skipif.inc'); | ||
| 11 | ?> | ||
| 12 | --FILE-- | ||
| 13 | <?php | ||
| 14 | include('connect.inc'); | ||
| 15 | $mysqli = new mysqli($host, 'invalid_username', $passwd, $db, $port, $socket); | ||
| 16 | ?> | ||
| 17 | --EXPECTREGEX-- | ||
| 18 | .*Access denied for user 'invalid_username_post'.* \ No newline at end of file | ||
diff --git a/tests/sql/mysqli_user_prefix.phpt b/tests/sql/mysqli_user_prefix.phpt new file mode 100644 index 0000000..bb229f0 --- /dev/null +++ b/tests/sql/mysqli_user_prefix.phpt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | --TEST-- | ||
| 2 | Mysqli connect with user_prefix | ||
| 3 | --INI-- | ||
| 4 | extension=mysqli.so | ||
| 5 | suhosin.sql.user_prefix=pre_ | ||
| 6 | suhosin.log.stdout=32 | ||
| 7 | --SKIPIF-- | ||
| 8 | <?php | ||
| 9 | include('skipifmysqli.inc'); | ||
| 10 | include('skipif.inc'); | ||
| 11 | ?> | ||
| 12 | --FILE-- | ||
| 13 | <?php | ||
| 14 | include('connect.inc'); | ||
| 15 | $mysqli = new mysqli($host, 'invalid_username', $passwd, $db, $port, $socket); | ||
| 16 | ?> | ||
| 17 | --EXPECTREGEX-- | ||
| 18 | .*Access denied for user 'pre_invalid_username'.* \ No newline at end of file | ||
