Michal Čihař
34795cd742
Do not use intdiv() it's PHP 7 only
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-11 17:37:04 +02:00
Michal Čihař
2fec79a943
Remove unused use clause
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-11 17:24:31 +02:00
Michal Čihař
05e87b4a92
Move authentication failure handling out of DatabaseInterface
...
We really want to check return value of DatabaseInterface::connect() and
not handle every failure case individually there.
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-11 17:23:27 +02:00
Michal Čihař
f624f5f742
Merge branch 'QA_4_7'
2017-04-11 17:18:15 +02:00
Michal Čihař
a05bbd55e6
Correctly fail if user specifies null as one of connection parameters
...
See https://github.com/phpmyadmin/docker/issues/118
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-11 17:17:47 +02:00
Michal Čihař
e4d7a80f63
Separate version string to text conversion and test it
...
See https://github.com/phpmyadmin/docker/issues/118
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-11 16:38:05 +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ř
1dd118d275
Offer login as different user on access denied from MySQL
...
Fixes #13087
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-16 14:40:55 +01:00
Michal Čihař
a72a048f1e
Correctly handle case when CURRENT_USER() fails
...
It's not likely, but the code path was obviously returning wrong value.
Maybe it did happen in issue #13037
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-01 10:53:19 +01:00
Michal Čihař
ce49be7e07
Fix condition to activate tracker
...
Invoking empty() on the result might work in most cases as false is
empty and false is result from failure, but on the other side empty can
be true for valid results as well.
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-01 10:45:51 +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ř
4f151204d2
Fix more tables where table sorting is not honored
...
Issue #12941
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-02-02 15:11:22 +01:00
Isaac Bennetch
b853299cba
Add closelog() call after writing to syslog.
...
See http://php.net/manual/en/function.syslog.php#79554
and our issue #6146
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2017-01-28 22:39:51 -05:00
Michal Čihař
6bf4f3bf39
Merge branch 'QA_4_6'
2016-12-19 16:20:57 +01:00
Michal Čihař
ffe68c7219
Honor user configured connection collation
...
* the user set collation is now honored
* default value has been changed to utf8mb4
* it is downgraded to utf8 if server does not support it
Fixes #12826
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-19 16:18:21 +01:00
Michal Čihař
06d13fc715
Merge branch 'QA_4_6'
2016-12-14 15:34:54 +01:00
Michal Čihař
eec9d3f3dd
Use === to avoid suprises with numeric table names
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-14 15:34:39 +01:00
Michal Čihař
beea41fc96
Merge branch 'QA_4_6'
2016-12-14 15:31:29 +01:00
Michal Čihař
715bdf3a49
Fixed operation with lower_case_table_names=2
...
The problem is that mysqli_fields_meta returns orgtable as lowercase
making phpMyAdmin treat it as alias later nad finding no fields for
original table.
Fixes issue #11816
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-14 15:29:43 +01:00
Michal Čihař
a34e314952
Reuse getCurrentUser method
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-02 11:12:07 +01:00
Michal Čihař
0fc20266a4
Merge branch 'QA_4_6'
2016-12-02 11:10:55 +01:00
Deven Bansod
7d4f188c72
Current user might vary from the actual defined user
...
Use CURRENT_USER instead, which would give the actual user defined in User accounts table
Fix #12769
ChangeLog entry for #12769
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-12-02 01:07:48 +05:30
Deven Bansod
ace8d9c945
Merge branch 'QA_4_6'
2016-11-16 09:24:49 +05:30
Deven Bansod
74fd7986eb
Remove debugging calls
...
Fix #12706
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-11-16 09:23:06 +05:30
Michal Čihař
dad93483c1
Merge branch 'QA_4_6'
2016-11-10 11:08:36 +01:00
Deven Bansod
cb7abad0b5
Remove call to old methods, fix tests
...
Remove definition of old method. Remove related tests
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-11-09 10:40:00 +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
5f84046759
Make PHPCS happy
...
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-09-29 09:21:50 +05:30
Michal Čihař
7fc28626fd
Merge branch 'QA_4_6'
2016-09-19 10:51:50 +02:00
Deven Bansod
f8ea67f2bc
Fix #12530 : Show enabled links for Edit and Execute after proper priv checks
...
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-09-16 13:51:34 +05:30
Michal Čihař
42d54a938a
Remove MySQL version caching
...
In my testing the session/cache access is slower than fetching single
value from MySQL and calculating the values.
Also the caching would need some logic for invalidation as the server
can be upgraded or configuration changed.
Fixes #11924
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-07 09:28:13 +02:00
Michal Čihař
aee8184faf
Merge branch 'QA_4_6'
2016-09-02 14:40:23 +02:00
Michal Čihař
e01f404804
Remove unused variable
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-02 14:40:18 +02:00
Michal Čihař
bfd6a76819
Merge branch 'QA_4_6'
2016-09-02 14:39:45 +02:00
Michal Čihař
eb3e3b73c3
Simplified handling of connection errors
...
There is no need to retrigger errors, just let the handler know to
handle them without backtrace.
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-02 14:35:36 +02:00
Michal Čihař
ae79ceb3a4
Do not error on unset server port
...
Fixes #12339
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-02 08:53:06 +02:00
Michal Čihař
4054228e1b
Always merge control user configuration
...
Issue #12218
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-29 13:25:29 +02:00
Michal Čihař
9d0c745aa5
Add missing documentation
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-29 12:48:57 +02:00
Michal Čihař
90498afe76
Allow to specify further parameters for control connection
...
Fixes #12218
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-29 12:38:03 +02:00
Michal Čihař
a36367bafb
Always provide default for ssl and compress settings
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-29 12:27:06 +02:00
Michal Čihař
0fdc46eb55
Always set default connection params
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-29 12:24:39 +02:00
Michal Čihař
8a41fd3f63
Fix fallback value for MySQL port
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-29 12:24:28 +02:00
Michal Čihař
94ff41a97f
Add safety check for invalid method call
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-29 12:22:01 +02:00
Michal Čihař
061c620723
Generate connection settings at one place
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-29 12:19:40 +02:00
Michal Čihař
9592f66bd5
Share socket/port/host sanitization in DatabaseInterface
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-29 12:09:26 +02:00
Michal Čihař
6fd55f968a
Pass user link parameter in server array as well
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-29 12:04:25 +02:00
Michal Čihař
95064ed9fb
Move control user connection calculation to DatabaseInterface
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-29 11:58:02 +02:00
Michal Čihař
2dce033943
Move configuration management in DBI to separate method
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-29 11:57:51 +02:00
Michal Čihař
25a38b2067
Determine correct user/password for connect in DatabaseInterface
...
The API only specifies what kind of link we want and we will get it.
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-29 11:51:09 +02:00