Commit Graph

411 Commits

Author SHA1 Message Date
Michal Čihař
f9d6c40939 Safer handling of sessions during authentication
- always generate new session for login form
- always generate new session when authenticated using cookie auth

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-23 13:48:25 +02:00
Michal Čihař
24bb12793d Fix locking issues when importing SQL
When running import (or generally any SQL query), some tables might be
locked. This will cause queries to not locked tables to fail. And this
is exacly what we do with control user link.

So let's have separate link for control queries even if we're using same
credentials as for main link.

Fixes #12219

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-23 08:42:08 +02:00
Michal Čihař
f58349481d Avoid destroying already initalized gettext variables
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-04-06 10:13:40 +02:00
Michal Čihař
a65a4213d7 Load gettext before autoloader
This fixes possible PHP error in SQL parser as it tries to define __()
if it's not existing. Later loading of gettext just breaks this.

Fixes #12154

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-04-05 09:24:15 +02:00
Michal Čihař
1894e33753 Merge branch 'QA_4_5' into QA_4_6 2016-02-12 12:44:06 +01:00
Michal Čihař
e50a445d17 Define is_ajax_request earlier
This fixes PHP warning on configuration errors.

Fixes #11950

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-12 12:43:30 +01: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ř
ae1ccf3e6a Remove PmaAbsoluteUri configuration directive
Fixes #11412

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-03 17:41:29 +01:00
Michal Čihař
1e9e14d23b Remove ForceSSL configuration directive
In most setups we simply do not have enough information to decide
whether user has come through HTTPS or not leading to infinite
redirects.

Anyway this is better to handle at web server side together with setting
HSTS headers.

Issue #11412, #11883

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-03 14:20:11 +01:00
Michal Čihař
ed96969ff9 Merge branch 'QA_4_5' 2016-01-28 09:23:27 +01:00
Michal Čihař
d4b9c22c1f Enable localization before redirect
This is needed in case of IIS which needs full HTML response.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-01-27 08:56:24 +01:00
Michal Čihař
f83b52737e Do not process subforms with PMA_MINIMUM_COMMON
In such case needed infrastructure is not loaded, so related code won't
work anyway.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-01-26 14:35:08 +01:00
Michal Čihař
85ccdbb5b9 Include common libraries in setup
We use PMA_fatalError which in turn needs Response and related objects.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-01-26 14:27:38 +01:00
Michal Čihař
ec0e88e37e Use hash_equals for comparing token
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-01-19 08:32:07 +01:00
Madhura Jayaratne
f2a60e54f4 canvg.js does not seem to be used anymore
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2016-01-14 14:05:03 +11:00
Michal Čihař
342c9a25b5 Switch languge selection to LanguageManager
Issue #11847

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-01-12 14:51:07 +01:00
Michal Čihař
3ecafc5973 Move mysql_charset_map to common.inc.php
It should be later removed (as it's IMHO not needed), but we move it out
of select_lang.inc.php where it really doesn't belong.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-01-12 14:50:13 +01:00
Michal Čihař
ff21ad8e0e Remove unused use
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-01-12 14:49:40 +01:00
Michal Čihař
55b317c699 Remove /*overload*/ prefix from mb_* calls
I believe this was temporary flagging to see which code is migrated and
can be safely removed now.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-01-04 16:35:28 +01:00
Marc Delisle
911f8274c7 Clarify class and variable name
Signed-off-by: Marc Delisle <marc@infomarc.info>
2015-12-31 08:09:47 -05:00
Michal Čihař
3cc092258f Merge branch 'QA_4_5' 2015-12-28 10:07:23 +01:00
Michal Čihař
1abdeb5741 Set PHP's internal encoding to UTF-8
Without setting default_charset, user might have set something different
leading to various problems when encoding to html entities.

Fixes #11785

Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-28 10:05:46 +01:00
Michal Čihař
cc07b737dc Remove unused PMA_String class
The class is no longer used:

- the ctype part is not needed by new SQL parser
- the utf-8 manipulation was replaced by direct usage of mbstring

Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-21 12:09:06 +01:00
Michal Čihař
7de390f26a Move theme initialization to ThemeManager
Issue #11731

Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-09 08:34:09 +01:00
Michal Čihař
1deac94062 Move PHP extensions check to separate function
Issue #11731

Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-09 08:24:41 +01:00
Michal Čihař
c4cdd16342 Move PATH_INFO cleanup to function
Issue #11731

Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-09 08:22:03 +01:00
Michal Čihař
4d9dc457bd Update comment to match current requirements
Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-09 07:50:54 +01:00
Michal Čihař
7facd526b1 Remove code for PHP < 5.4
Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-09 07:50:02 +01:00
Michal Čihař
7181f2d22d Remove magic_quotes_gpc handling
This has been removed in PHP 5.4.0 and we support 5.5.0 or newer only.

Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-09 07:36:34 +01:00
Marc Delisle
ab7942be89 Fix merge conflicts
Signed-off-by: Marc Delisle <marc@infomarc.info>
2015-11-29 07:29:32 -05:00
Madhura Jayaratne
0a2b037706 merge db_create.php into ServerDatabasesController
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2015-11-24 20:41:40 +11:00
Hugues Peccatte
0e5de28eaa Remove side effects in declaration files.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-11-15 17:31:53 +01:00
Madhura Jayaratne
06821464bf Use generic charting mechanism for profiling chart as well
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2015-11-06 20:36:28 +11:00
Hugues Peccatte
8ac9634c7a Make PHPCS happy.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-10-24 13:30:22 +02:00
Abhishek kanojia
1fa2fbdd09 Show current PHP version in case minimum version requirement is not met
Signed-off-by: Abhishek kanojia <abhishekka3193@gmail.com>
2015-10-12 17:49:35 -04:00
Marc Delisle
e4e991d3fc Fix merge conflict
Signed-off-by: Marc Delisle <marc@infomarc.info>
2015-10-09 21:10:28 -04:00
Marc Delisle
9b85cdbbd4 Merge pull request #11552 from madhuracj/cookie
Fix #11551 Fatal error when switched to master from QA_4_5
2015-10-09 21:05:58 -04:00
Madhura Jayaratne
05c22016ee Fix cookies clearing on version change
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2015-10-10 08:26:40 +11:00
Hugues Peccatte
3cd139f163 Remove useless 'use'.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-10-09 22:15:55 +02:00
Madhura Jayaratne
54b0409cc1 The error happens on version downgrade as well
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2015-10-09 09:40:20 +11:00
Madhura Jayaratne
208712796d Increase cookie version and improve cookie clearing
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2015-10-09 08:36:37 +11:00
Hugues Peccatte
6f4676cdfc Merge remote-tracking branch 'origin/master' into useNamespaces_master 2015-10-04 18:04:49 +02:00
Marc Delisle
fd7c8522ea Clarify method name
Signed-off-by: Marc Delisle <marc@infomarc.info>
2015-10-03 10:14:29 -04:00
Hugues Peccatte
71b62bcef9 Merge remote-tracking branch 'origin/master' into useNamespaces_master 2015-09-26 13:50:49 +02:00
Madhura Jayaratne
7ec4bcdbea Use include for files being included conditionally
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2015-09-22 21:11:11 +10:00
Hugues Peccatte
21460a01c0 Merge branch 'master' into useNamespaces_master 2015-09-18 23:17:22 +02:00
Marc Delisle
ecb5a0de32 Use strict comparison on a hash value
Signed-off-by: Marc Delisle <marc@infomarc.info>
2015-09-15 15:39:15 -04:00
Hugues Peccatte
a5d35d41b6 Revert PMA_String rename.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-09-14 22:39:03 +02:00
Hugues Peccatte
74ef226857 Merge branch 'master' into useNamespaces_master 2015-09-14 22:10:51 +02:00
Marc Delisle
8ad850a820 Merge commit '4185868' 2015-09-14 10:51:40 -04:00