Commit Graph

2948 Commits

Author SHA1 Message Date
Michal Čihař
519e634a8d Merge branch 'QA_4_6' into QA_4_6-security 2016-06-22 13:10:55 +02:00
Michal Čihař
e50e37b51d Properly escape database name when listing privileges
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-22 11:35:04 +02:00
Michal Čihař
1cc7466db3 Quote delimiter before using preg_replace
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-20 12:16:03 +02:00
Michal Čihař
be3ecbb4cc Simplify and cleanup transformation plugins
Remove PMA_transformation_global_html_replace which makes the code only
more confusing.

Also add escaping to browse transformations.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-17 16:18:13 +02:00
Michal Čihař
00b9be9c4a Merge branch 'QA_4_6' into QA_4_6-security 2016-06-17 11:23:36 +02:00
Michal Čihař
4a9da1df40 Adjust tests to new error reporting handling of objects
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-17 11:23:20 +02:00
Michal Čihař
27caf5b46b Improve detection of script name
In case PHP_SELF was not set by server, we used REQUEST_URI, which might
embed PATH_INFO as well. However we really need to know the path without
it, so let's strip it as well.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-16 09:35:56 +02:00
Michal Čihař
73d067a540 Fix test for new redirect code
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-15 13:02:59 +02:00
Michal Čihař
8a142aba73 Adjust tests to new behavior
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-15 11:45:16 +02:00
Michal Čihař
79a34ff94c Calculate table size as integer
It should be big enough on 64-bit systems, so avoid rounding issues
which double calculations can bring.

Fixes #12303

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-14 08:28:26 +02:00
Michal Čihař
763683b4fe Fix test expectations
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-09 09:40:16 +02:00
Michal Čihař
b261ecae25 Add test for possible rounding issues
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-09 09:19:55 +02:00
Michal Čihař
4fd2709650 Avoid rewriting PHP stack frames
Surprisingly PHP stack frames are passed as references to the error
handling code, thus changing value there leads to changing value in the
executed code.

With MySQL issuing warning about incompatible version (different runtime
library than compile time), handling this warning rewrites current stack
frame and the mysql_real_connect later sees parameters as processed by
Error class for display.

We now create copy of the stacktrace to avoid this.

Fixes #12279

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-06 13:52:32 +02:00
Michal Čihař
d78e173b34 Do not use dirname for calculating cookie path
It is wrong for this purpose as on Windows this uses \ for both
separating parts and generating result. This fixed calculation of cookie
path on Windows.

Fixes #12249

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-27 11:11:56 +02:00
Michal Čihař
e72c1d4da9 Add more tests for getCookiePath (issue #12249)
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-26 18:04:23 +02:00
Michal Čihař
adfd5a22b9 Avoid double redirects in signon auth on logout
Also adjusts tests to no longer rely on runkit.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-23 13:23:16 +02:00
Michal Čihař
11eb574242 Improve handling of logout
- add separate script for handling logout
- no longer require old_usr for all authentication methods
  (this avoids potential information leak)
- require valid token for logout

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-23 13:02:21 +02:00
Michal Čihař
381c80dda4 Split test cases to avoid huge test methods
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-23 12:35:13 +02:00
Michal Čihař
21db724c85 Remove need for having define for test
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-23 12:09:36 +02:00
Michal Čihař
1c081f9087 Fix test to not depend on variables set elsewhere
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-23 11:47:40 +02:00
Michal Čihař
ec1c32fd09 Fix tested url
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-17 11:59:04 +02:00
Michal Čihař
506fd28cbd Add support to link directly to some page
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-17 11:54:28 +02:00
Michal Čihař
0e233c89ce Test more doc links generating
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-17 11:51:34 +02:00
Michal Čihař
574fee04f7 Fix test failures after changing links
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-17 10:44:54 +02:00
Michal Čihař
d248d8d83d Remove link to no longer maintained blog
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-17 10:35:56 +02:00
Michal Čihař
521b79d0d7 Replace non working pbxt link with link to MariaDB knowledgebase
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-17 10:34:52 +02:00
Michal Čihař
3686263f1d Fix test expectations
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-13 13:08:38 +02:00
Michal Čihař
cb41491f44 Adjust test to no stripping
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-13 11:55:52 +02:00
Michal Čihař
57a1d3a7ca Adjust tests to template doing no stripping
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-12 15:42:57 +02:00
Michal Čihař
288995ba18 Remove trimming from template renderere
This relies on preg_replace correctly handles multibyte chars what is
not true on Windows and it then corrupts the content as it removers
parts of UTF-8 chars. Removal fixes occassional 200 errors on Windows.

Fixes #11705

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-12 15:35:38 +02:00
Michal Čihař
bbe8efaf7c Use https for documentation links
Fixes #12225

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-10 15:04:29 +02:00
Michal Čihař
f329a38639 Add missing variable
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-04-20 10:13:39 +02:00
Michal Čihař
e0724d2660 Fixed check for ndb version
Fixes #12200

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-04-20 10:07:06 +02:00
Michal Čihař
951f1fed5f Add method to slice errors from the handler
This can be useful to pop n-last errors.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-04-18 13:32:52 +02:00
Michal Čihař
ea428dc860 Make ErrorHandler test more complete
Actually test handling of stored errors.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-04-18 13:32:52 +02:00
Michal Čihař
73278068a9 Adjust tests to simplified DatabaseStructureController
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-04-06 11:29:43 +02:00
Michal Čihař
1b43606a48 Fixed possible invalid SQL export
We should emit the charset restoration only if we have emitted its
setting in the header. As the condition was slightly different in both
cases it was possible that only one part of these two was emitted in
past.

Fixes #12074

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-03-18 10:34:17 +01:00
Michal Čihař
a29f154f37 Merge branch 'MAINT_4_5_5-security' into QA_4_6-security 2016-02-29 10:35:47 +01:00
Michal Čihař
e42b7e3aed Bring back SSL certificate validation
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-25 11:08:44 +01:00
Michal Čihař
35dae12574 Define cell_align_left for tests
It's defined early in common.inc.php so it's always available.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-17 12:12:49 +01:00
Michal Čihař
c90e01f4ce Merge branch 'QA_4_5' into QA_4_6 2016-02-12 15:44:39 +01:00
Michal Čihař
073b85e1ee Avoid matching of date
This causes random failures as time can be one second further when
generating output.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-12 15:43:43 +01:00
Michal Čihař
5fefcdd998 Fix test expectations to match current filename
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-12 14:28:57 +01:00
Michal Čihař
b73855842b Merge branch 'QA_4_5' into QA_4_6 2016-02-12 14:25:24 +01:00
Michal Čihař
2b3ef7ad99 Improve test coverage for getting relative path
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-12 14:24:49 +01:00
Madhura Jayaratne
f1dbd56798 Merge branch 'QA_4_5' into QA_4_6 2016-02-12 19:43:25 +11:00
Madhura Jayaratne
04181fb2b9 Fix #11911 Inserts via tbl_change.php in VARBINARY columns does not allow using HEX() and MD5()
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2016-02-12 19:32:52 +11:00
Michal Čihař
3ebacb0025 Simplify loading of vendor configuration
Do it just once and very early, so that all scripts can rely on it being
available.

Fixes autoloading of phpseclib.

Fixes #11914

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-09 11:00:54 +01:00
Michal Čihař
de7181653f Correctly handle paths to exact files when setting cookie
We need to set path to folder not a given file.

Fixes #11916

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-08 09:54:57 +01:00
Michal Čihař
22e5f4a4be Fix test expectations
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-03 21:07:07 +01:00