Commit Graph

1175 Commits

Author SHA1 Message Date
Michal Čihař
92a1e5a47b Merge pull request #13237 from nijel/tempdir
Share TempDir for Twig and other uses
2017-05-05 12:03:53 +02:00
Michal Čihař
b7668cd442 Merge pull request #13192 from mauriciofauth/fix/coding-standard
Fix errors detected by PHP_CodeSniffer
2017-05-05 11:11:53 +02:00
Michal Čihař
ae9006e9be Use one temporary directory
Share one directory for Twig cache, SHP import and file uploads.

The code now also validates the cache directory and creates it on the
fly, so it properly detects if the directory can not be used.

Also the documentation has been improved to document securing this
directory.

Fixes #13225
Fixes #13226

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-05-05 11:08:36 +02:00
Maurício Meneghini Fauth
0e236f43bf Rename export plugins helpers
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-05-04 19:33:55 -03:00
Gemorroj
6d2bf012d2 Simplify HTML: <input></input> -> <input />
Signed-off-by: Gemorroj <wapinet@gmail.com>
2017-04-28 16:09:20 +02:00
Michal Čihař
d53d541307 Merge branch 'QA_4_7' 2017-04-28 16:02:33 +02:00
Michal Čihař
8d6b1dce57 Improved handling of logout with disabled LoginCookieDeleteAll
- avoid removing session for cookie auth if LoginCookieDeleteAll is
  disabled
- redirect user to other server rather than to login page
- show message about partial logout
- adjust tests
- this is based on #13221

Fixes #12301

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-28 16:02:11 +02:00
Harro Verton
cde775bd2b Don't destroy the session if logins are still present. fixes #12301
If you are logged-in into multiple database servers, logOut() logs you
out of all of them. This fix will prevent that, and will only destroy
the session when you log out of the last server.

Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Harro Verton <wanwizard@wanwizard.eu>
2017-04-28 15:27:24 +02:00
Maurício Meneghini Fauth
290b183d03 Fix errors detected by PHP_CodeSniffer
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-04-15 00:05:19 -03:00
Maurício Meneghini Fauth
9028055d8b Fix some coding standard errors in DocBlocks
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-04-10 18:36:02 -03:00
Maurício Meneghini Fauth
385b687013 Ignore coding standard errors in transformations
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-04-08 15:12:20 -03:00
Michal Čihař
8ef8dbf3e9 Merge pull request #13121 from mauriciofauth/fix/coding-standard
Fix some coding standard errors
2017-03-27 12:00:43 +02:00
Michal Čihař
f8e83ef36d Merge branch 'QA_4_7' 2017-03-27 11:29:06 +02:00
Michal Čihař
ebaf126501 Do not use empty() for checking submitted username
The empty() function is evil and will you block from login with username
"0".

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-27 11:28:16 +02:00
Maurício Meneghini Fauth
750e42916f Fix some coding standard errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-03-23 11:08:30 -03:00
Michal Čihař
7adff6b57c Indicate when HTTPS is not properly reported on the server
This can happen in both directions which both can have undesired side
effects:

- when server thinks it's serving HTTPS, but it's not, the cookies are
  set as secure and thus never returned back by client
- whene server thinks it's not serving HTTPS, the secure flag for
  cookies is not set, making it possible to leak them over HTTP

Fixes #13110

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-21 08:46:38 +01:00
Michal Čihař
0700cee6e3 Merge pull request #13024 from nijel/remove-unused-auth-code
Remove no longer needed code in authentication
2017-03-16 15:50:46 +01:00
Michal Čihař
4ca1f8bd27 Remove no longer needed code in authentication
The code is incosistent between auth methods and I don't see any purpose
for it.

Fixes #12478
Fixes #13003

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-02-20 17:39:21 +01:00
Michal Čihař
1f819d8d50 Coding style improvements to #13011
- use camel case for function names
- move initialization to existing on load block

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-02-20 16:32:01 +01:00
Michal Čihař
a280edc69f Merge remote-tracking branch 'origin/pull/13011' 2017-02-20 16:29:36 +01:00
Michal Čihař
72572cb6c2 Merge branch 'QA_4_7' 2017-02-20 08:58:35 +01:00
Michal Čihař
59e9856200 Fixed OpenDocument exports
Fixes #13002

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-02-20 08:44:03 +01:00
Shreyas Sinha
c433b571b4
Pass Google reCAPTCHA with the submit button
Signed-off-by: Shreyas Sinha <shreyas.sinha14@gmail.com>
2017-02-20 11:12:34 +05:30
Michal Čihař
26d7d4269d Merge branch 'QA_4_7' 2017-02-14 17:01:07 +01:00
Michal Čihař
82f13e34d0 Better handle multiple open browser windows
Calculate session expiry per browser (tracking is based on
sessionStorage which is unique per tab). With this we're able to detect
that there is another window open and actively used and avoid logging it
out by inactive one.

Issue #11231

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-02-14 17:00:44 +01:00
Shreyas Sinha
1dfce55965 Incorrect protocol number at 401/303 headers (#12920)
Shared code for handling HTTP response codes and correctly
set it based on PHP SAPI.

Signed-off-by: Shreyas Sinha <shreyas.sinha14@gmail.com>
2017-02-14 13:20:13 +01:00
Michal Čihař
094afae6cc Merge commit '924aabf652f35a35ccfe66a6fa706bb434282081' 2017-02-13 11:24:55 +01:00
Michal Čihař
924aabf652 Do not show language selector without choices
Move the check from template to the code, so that the selection is
completely hidden when there is nothing to select.

Fixes #12988

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-02-13 11:22:43 +01:00
Michal Čihař
5d3a6fbc25 Merge branch 'QA_4_7' 2017-02-06 13:23:09 +01:00
Michal Čihař
1b7914a4e5 Remove connect_type setting
It is really not necessary as MySQL decides connection type rather based
on hostname than on anything else.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-02-02 16:08:44 +01:00
Michal Čihař
2423aac692 Merge branch 'QA_4_7' 2017-02-02 13:43:55 +01:00
Michal Čihař
5022ff9560 Do not show errors from OpenSSL cookie encryption/decryption
This can happen from corrupted cookies, by invalid encryption parameters
used in older phpMyAdmin versions or by wrong openSSL configuration.

In neither case the error is useful to user, but we need to clear the
error buffer as otherwise the errors would pop up later, for example
during MySQL SSL setup.

Fixes #12924

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-02-02 13:43:51 +01:00
Michal Čihař
c0bb9520e9 Allow to export JSON with unescaped unicode chars
This is optional as there are some parsers which have problems with
utf-8, see http://stackoverflow.com/q/4901133/225718

Fixes #12946

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-02-02 13:21:06 +01:00
Michal Čihař
fe39fbfe1a Merge branch 'QA_4_6' 2017-01-25 10:07:33 +01:00
Michal Čihař
31084a09f6 Improve error message for cookie encryption
- make it localized
- correctly report that it's about cookies

Issue #12924

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-01-25 10:07:19 +01:00
Michal Čihař
75ad097c36 Replace Util::whichCrlf() with PHP_EOL
It's available since PHP 5.0.2 so it's really time to use it.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-01-23 15:59:52 +01:00
Michal Čihař
27fb0b58af Merge branch 'QA_4_6'
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-01-23 14:07:29 +01:00
Michal Čihař
e4bf536906 Update to SQL Parser 4.0.1
It now follows PSR-4 and uses PhpMyAdmin namespace prefix.

See https://github.com/phpmyadmin/sql-parser/issues/126

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-01-23 13:56:35 +01:00
Michal Čihař
b87362b7d2 Update to use shapefile 2.0
It uses PSR-4 prefix for PhpMyAdmin namespace.

See https://github.com/phpmyadmin/sql-parser/issues/126

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-01-23 12:56:24 +01:00
Isaac Bennetch
77c33d0444 Rename Relations to Relationships in many places; Fixes issue #12536
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2017-01-13 18:20:30 -05:00
Michal Čihař
10416615cd Merge remote-tracking branch 'origin/pull/12799' 2017-01-02 16:15:58 +01:00
Ashus
10e93cea0c CRLF fix
Signed-off-by: Ashus <github.com@ashus.net>
2016-12-29 19:22:45 +01:00
Ashus
32f3203ed0 Documentation added, default configuration values altered to match default PHP values.
Signed-off-by: Ashus <github.com@ashus.net>
2016-12-29 19:17:19 +01:00
Michal Čihař
92aa487c54 Merge branch 'QA_4_6' 2016-12-20 14:44:03 +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ř
03bc52f6dc Correctly report OpenSSL errors from cookie encryption
Without calling openssl_error_string() we pollute openssl global state
and some other library might report this as failure (eg. mysqlnd driver
when connecting to SSL enabled server).

Fixes #12293

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-20 14:38:03 +01:00
Michal Čihař
b866371b9a Determine whether to use openssl just once
Issue #12293

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-20 14:30:51 +01:00
Michal Čihař
9835791bff Fix empty password login for http authetication
Fixes #12828

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-19 16:01:00 +01:00
Michal Čihař
945e615253 Merge branch 'QA_4_6' 2016-12-19 15:23:31 +01:00
Michal Čihař
7d361806c3 Share code for rendering custom header and footer
Fixes #12802

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-19 15:20:12 +01:00