1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-29 21:24:44 +03:00
Commit Graph

3074 Commits

Author SHA1 Message Date
Michal Čihař
9c8f537a23 Merge branch 'master' into master-security 2016-06-22 13:11:08 +02:00
Michal Čihař
d338a61d32 Merge branch 'QA_4_6' 2016-06-22 11:35:42 +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ř
637d4eb4de Merge branch 'QA_4_6-security' into master-security 2016-06-20 17:35:46 +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ř
791bdafcdd Merge branch 'QA_4_6-security' into master-security 2016-06-17 16:24:39 +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ř
dbd848d595 Fix wrong redirection tests
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-17 13:36:58 +02:00
Michal Čihař
dce94f229f More consistency for URL::getCommon
Now URL::getCommon always returns HTML encoded string, if you want
unencded one, use URL::getCommonRaw. This makes it easier to review the
code if uses correct variant.

Also I've fixed several wrong uses of the HTML encoded variant in
Location header.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-17 12:44:29 +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ř
cdc7a6c6bf Merge branch 'QA_4_6' 2016-06-17 11:23:25 +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ř
9869a95641 Simplify Message adding methods
The methods are now called based on added type:

- addHtml adds HTML code as is
- addText adds text after escaping it
- addMessage adds Message instance

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-16 15:23:45 +02:00
Michal Čihař
54a76de3d8 'Replace addString calls with correct method based on content
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-16 15:20:30 +02:00
Michal Čihař
19f76066f2 Separate adding string and Message objects to Message
This way we can rely on type checking and avoid potential problems with
escaping.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-16 15:16:29 +02:00
Michal Čihař
a7cd193554 Make it clear whether addMessages expects string or Message object
With this, it's way easier to anaylize code for potential problems with
escaping.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-16 14:56:41 +02:00
Michal Čihař
c6a6bbfb2f Fix test expectations to match current code
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-16 14:30:29 +02:00
Michal Čihař
18c0786eae Improve addMessage calls
- add call which accepts HTML markup
- use separator where applicable
- extend testcase to see HTML markup handling

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-16 14:25:33 +02:00
Michal Čihař
9348d0cb16 Separate adding HTML markup to message from others
We really want this to be explicit for easier review and hiding this in
second parameter of addParam doesn't make it.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-16 13:41:35 +02:00
Michal Čihař
45ef3aed75 Remove needless inclusion of export.php from tests
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-16 11:38:58 +02:00
Michal Čihař
fe18b9477f Remove possibility to use global name as message string
This is really confusing and can cause surprising effects when parameter
(eg. table name) matches some global.

Also I think this is really not used anywhere.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-16 11:35:58 +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ř
8af7b7e48a Merge branch 'QA_4_6' 2016-06-15 13:03:09 +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ř
9b7a6967a8 Merge branch 'QA_4_6' 2016-06-15 11:46:29 +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ř
136b85fc97 Produce valid JSON on export
The JSON export now generates valid JSON data, but this means that the
resulting JSON format has changed.

Fixes #12307

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-14 09:16:58 +02:00
Michal Čihař
25ede08182 Merge branch 'QA_4_6' 2016-06-14 08:30:03 +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ř
c70aed7a1d Merge branch 'QA_4_6' 2016-06-09 09:40:21 +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ř
62d417db9b Merge branch 'QA_4_6' 2016-06-09 09:20:26 +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ř
7a66320753 Merge branch 'QA_4_6' 2016-06-06 13:54:53 +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ř
ab29ec9947 Merge branch 'QA_4_6' 2016-05-27 11:12:58 +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ř
c71e842349 Merge branch 'QA_4_6' 2016-05-26 18:06:14 +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ř
23d703cf40 Fix typo
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-25 11:35:41 +02:00
Michal Čihař
3fc1fa1c80 Do not try to generate coverage from phpunit tests
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-25 11:35:24 +02:00
Michal Čihař
4e7077b264 Run selenium tests more verbosely to see the progress
The currently timeout od Travis due to no output.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-25 10:25:27 +02:00
Michal Čihař
9d5c5f0c86 Adjust tests to new error messages
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-23 21:27:41 +02:00
Michal Čihař
792f5dc794 Merge branch 'QA_4_6' 2016-05-23 13:23:43 +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ř
e3d650a2bb Merge branch 'QA_4_6' 2016-05-23 13:05:01 +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