Commit Graph

319 Commits

Author SHA1 Message Date
Michal Čihař
09da5eb49f Test both with and without phpseclib
This ensures we generate compatible data in both cases.

Issue #12293

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-20 14:40:31 +01:00
Michal Čihař
30cd5fc358 Use same encryption key with openssl and phpseclib
Issue #12293

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-20 14:38:34 +01:00
Michal Čihař
a856a61c9d Fix HTTP auth test expectations
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-19 16:20:51 +01:00
Michal Čihař
ec9139edef Do not try to run gd based tests if gd extension is not there
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-06 10:44:06 +01:00
Deven Bansod
06e9b62a25 Remove tests against unsupported versions
Remove duplicate test, fix other tests

Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-11-07 20:42:28 +05:30
Deven Bansod
67501106e0 clear some more tests
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-11-07 11:51:47 +05:30
Deven Bansod
28a658fda0 Fix more tests
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-11-07 00:18:50 +05:30
Deven Bansod
0d03c97ce6 Fix more test errors
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-11-06 23:47:23 +05:30
Deven Bansod
3f48d9cb5f Fixed some more test errors
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-11-05 09:49:55 +05:30
Deven Bansod
8b6e102cf7 Fixed small error in XML test
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-11-04 20:54:23 +05:30
Deven Bansod
02dcfc8198 Fix errors with TrackerTest
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-11-04 19:16:01 +05:30
Deven Bansod
675186ee00 Fixed tests in Designer, Insert edit for, UserGroups, User preferences
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-11-04 18:17:31 +05:30
Deven Bansod
6a79e7c0c0 Fixed some tests in Export, Import and Node
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-11-04 14:21:02 +05:30
Deven Bansod
956f3179cb Fix Navigation tests and Export tests
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-11-04 11:55:46 +05:30
Deven Bansod
f14cffdbe7 Properly escape strings in MySQL statement values
Use *_real_escape string functions provided by connectors to escape strings while exporting

Fix #12453

Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>

Conflicts:
	libraries/server_privileges.lib.php
2016-10-29 10:45:12 +05:30
Deven Bansod
201ba095ce Adjust tests
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-10-14 10:01:04 +05:30
Michal Čihař
83476322ba Use PmaAbsolueUri for cookie path
Issue #12374

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-17 15:35:15 +02:00
Michal Čihař
d31ff5a1e7 Merge branch 'QA_4_6' into QA_4_6-security 2016-07-28 09:43:26 +02:00
Michal Čihař
4072c1d29a Use example.com for sample test urls
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-28 09:12:01 +02:00
Michal Čihař
af337d2054 Use https to access phpmyadmin.net
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-27 16:29:08 +02:00
Michal Čihař
99492bf42a Merge branch 'QA_4_6' into QA_4_6-security 2016-07-26 16:29:07 +02:00
Michal Čihař
6c95b73f90 Do not append session IDs to all URLs in redirect
There is no need to do that as we rely on session cookies anyway. Also
appending sesson ID to external URLs is not a good idea.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-26 16:20:04 +02:00
Michal Čihař
9106b33933 Improve secrets splitting
- ensure it has 16 bytes
- extends it by copying content if original is too short
- correctly handle corner cases (eg. 1 byte secret)

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-22 14:10:28 +02:00
Michal Čihař
643681ee68 Use consistent iv and encrypted text concatenation as other libs
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-22 13:46:51 +02:00
Michal Čihař
3ee65fc8bf Use MAC to verify IV as well
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-22 10:29:46 +02:00
Michal Čihař
ef03daf658 Remove hashing of blowfish secret
New code doesn't have problems with longer secrets.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-22 09:59:02 +02:00
Michal Čihař
d29df46b3a Do not generate too long session secret
We need 16+16 bytes, generating 256 is not really needed.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-22 09:58:39 +02:00
Michal Čihař
e2a25d773d Merge pmaServer and pmaPass cookies
This addresses several issues:

- makes server name encrypted and authenticated, so that it can not be
  tampered
- reduces cookie usage
- reduces overhead of encryption/authentication

The pmaUser cookie is still separate to avoid different lifetime
(pmaUser has month lifetime, while pmaAuth is session only by default).

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-22 09:47:32 +02:00
Michal Čihař
2a2d865d50 Validate input data from cookies
We expect strings only, so not accept anything else.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-22 09:47:32 +02:00
Michal Čihař
3ba8a026fc Use hash_hmac for MAC rather than plain SHA1
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-18 16:56:52 +02:00
Michal Čihař
1543be7138 Use https to access phpmyadmin.net
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-18 16:22:33 +02:00
Michal Čihař
af8385dc87 Fix tests for transformations
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-13 12:16:45 +02:00
Michal Čihař
2ef4fe3d84 Use iframe sandbox for rendering HTML in transformation
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-12 14:15:30 +02:00
Michal Čihař
2ea0b722d7 Use _blank target instead of invalid _new
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-12 11:22:23 +02:00
Michal Čihař
3b0115a321 Adjust tests to recent changes
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-12 11:17:47 +02:00
Michal Čihař
fc6ef261eb Remove Swekey support
It is buggy and their servers are no longer working.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-11 09:02:58 +02:00
Michal Čihař
a97be3a604 Improve cookie encryption
- use MAC to validate content before decryption
- create unique IV for every cookie

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-08 17:40:05 +02:00
Michal Čihař
7de139b90c Properly escape generated XML export
Many fields could contain XML markup, so we need to ensure the generated
XML is valid.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-30 10:54:05 +02:00
Michal Čihař
bd2080c40a Adjust test to not use HTML escaping layer
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-30 10:52:49 +02:00
Michal Čihař
99d7407aa2 Fix PHP export tests
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-30 10:30:35 +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ř
8a142aba73 Adjust tests to new behavior
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-15 11:45:16 +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ř
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ř
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ř
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