Commit Graph

439 Commits

Author SHA1 Message Date
Michal Čihař
e433d8189b Use phpseclib for generating session encryption key
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-06-12 14:43:10 +02:00
Michal Čihař
da047efbd1 Use random per session key for encrypting password
This makes it impossible to decrypt cookies later if the key would be
compromised.

Signed-off-by: Michal Čihař <michal@cihar.com>
2014-06-12 14:43:10 +02:00
Michal Čihař
5e51f178dd Remove some blowfish mentions
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-06-12 14:43:10 +02:00
Michal Čihař
cd4d54395b Remove another reference to Blowfish
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-06-12 14:43:10 +02:00
Michal Čihař
96977c994e Use require here
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-06-12 10:50:52 +02:00
Michal Čihař
20640592f0 Always use phpseclib for cookie encryption
- it provides fallback in case mcrypt is not found
- we now use AES in both mcrypt and PHP code case
- cleanup the code by removing mcrypt conditials
- rename some methods and cookies so that they don't refer to
  implementation details
- switching encryption implementations no longer invalidates the
  credentials

Signed-off-by: Michal Čihař <michal@cihar.com>
2014-06-12 10:39:52 +02:00
Michal Čihař
0652ca9ccd Merge remote-tracking branch 'origin/QA_4_2' 2014-06-12 10:19:00 +02:00
Michal Čihař
bc60315023 Adjust tests to new IV logic
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-06-12 10:18:45 +02:00
Michal Čihař
c6e76422c4 Allow to use system phpseclib
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-06-12 10:06:20 +02:00
Michal Čihař
716f6d4c55 Merge remote-tracking branch 'origin/QA_4_2' 2014-06-12 09:47:17 +02:00
Michal Čihař
953c7415ad Separate check for password cookie
Otherwise it would not be possible to recall user name.

Signed-off-by: Michal Čihař <michal@cihar.com>
2014-06-12 09:47:04 +02:00
Michal Čihař
5d39998a86 Merge commit '7cba81de271d62bdf93ded7598709702a96f92d7'
Conflicts:
	libraries/plugins/auth/AuthenticationCookie.class.php
2014-06-12 09:45:13 +02:00
Michal Čihař
7cba81de27 Regenerate cookie encryption IV for every session
The IV for cookie encryption was generated just once for every browser
and kept in a cookie. Generating it for every session is much better to
avoid information leaks (eg. that same user has logged in).

Signed-off-by: Michal Čihař <michal@cihar.com>
2014-06-12 09:41:27 +02:00
Michal Čihař
b252cb9981 Use better source of entropy for mcrypt IV
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-06-12 09:16:20 +02:00
Marc Delisle
a6d379caf2 Since PHP 5.3.0, it's not longer required to call srand() before
mcrypt_create_iv().

Signed-off-by: Marc Delisle <marc@infomarc.info>
2014-06-11 08:31:23 -04:00
Marc Delisle
a83ca5d73b Fix merge conflict
Signed-off-by: Marc Delisle <marc@infomarc.info>
2014-06-10 12:43:07 -04:00
Chirayu Chiripal
ff688b18fb Bug-4448: Dump binary columns in hexadecimal notation not working and hex_for_blob -> hex_for_binary
Signed-off-by: Chirayu Chiripal <chirayu.chiripal@gmail.com>
2014-06-10 19:00:16 +05:30
Michal Čihař
06abaaa33f Merge remote-tracking branch 'origin/QA_4_2' 2014-06-10 08:59:18 +02:00
Isaac Bennetch
307dd3b798 Bug 4449: Mediawiki export does not produce table header row; also fix related PHP warnings
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2014-06-09 16:37:43 -04:00
Chirayu Chiripal
33dfef377f RFE-759 Use aliases in SQL export for tables and columns
Signed-off-by: Chirayu Chiripal <chirayu.chiripal@gmail.com>
2014-06-09 22:44:07 +05:30
Michal Čihař
c9dc5611ee Fix type string for longtext
It has to be checked before "long", otherwise it matches first.

Signed-off-by: Michal Čihař <michal@cihar.com>
2014-06-06 15:46:34 +02:00
Michal Čihař
1efadc8e7c We already check for empty value, remove todo
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-06-06 15:46:34 +02:00
Marc Delisle
84f135d048 Fix coding style
Signed-off-by: Marc Delisle <marc@infomarc.info>
2014-06-03 12:40:21 -04:00
Marc Delisle
49c9dd3ecb Remove dead code
Signed-off-by: Marc Delisle <marc@infomarc.info>
2014-05-30 12:20:32 -04:00
Ann + J.M
ddf78c212b Re-merge b3dbec1...9207203, changes got lost on original merge from QA_4_2
Signed-off-by: Ann + J.M <phpMyAdmin@ZweiSteinSoft.de>
2014-05-26 10:39:50 +02:00
Ann + J.M
d9bd81a2a1 Code style fixes
Signed-off-by: Ann + J.M <phpMyAdmin@ZweiSteinSoft.de>
2014-05-19 22:40:24 +02:00
Marc Delisle
39c181ca1e Merge branch 'QA_4_2' 2014-05-18 13:23:16 -04:00
Marc Delisle
e813cab608 bug #4418 When copying databases, primary key attributes get lost
Signed-off-by: Marc Delisle <marc@infomarc.info>
2014-05-18 13:22:14 -04:00
Chanaka Indrajith
cf6a8ce4e1 Fixed documentation issue related to argument type mismatching in ImportCsv.class.php file, raised by scrutinizer
Signed-off-by: Chanaka Indrajith <pe.chanaka.ck@gmail.com>
2014-05-17 18:11:10 +05:30
Marc Delisle
49f1bdd822 Merge commit '0ee881d' 2014-05-16 12:20:52 -04:00
Marc Delisle
0ee881da71 bug #4395 BLOB link transformation is broken
Signed-off-by: Marc Delisle <marc@infomarc.info>
2014-05-16 09:56:47 -04:00
Michal Čihař
8f45363f66 Merge branch 'QA_4_2' 2014-05-10 17:35:59 +02:00
Michal Čihař
b177557c11 Use preg_quote instead of home made replacement to quote string for preg
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-05-10 17:35:49 +02:00
Michal Čihař
afe414102a Improve check for empty message
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-05-09 16:02:48 +02:00
Michal Čihař
f159a39ff2 Handle cases when errno is set, but dbi does not return error message
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-05-09 15:53:45 +02:00
Michal Čihař
d44c4d9a96 Properly report MySQL error
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-05-09 15:12:06 +02:00
Michal Čihař
650e0512de Share code for getting error message
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-05-09 15:05:36 +02:00
Michal Čihař
82b4549176 Remove unused parameter of PMA_Util::cacheUnset
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-05-09 14:21:12 +02:00
Michal Čihař
8a83011da0 Fix checking for not set values
With PHP 0 is empty, what is not desired behavior here.

Signed-off-by: Michal Čihař <michal@cihar.com>
2014-05-06 15:48:49 +02:00
Michal Čihař
7f4f092e82 Fix typo
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-05-06 15:48:44 +02:00
Michal Čihař
ec816c6a31 Use new method for getting translformation default params
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-05-06 15:41:55 +02:00
Michal Čihař
9f5d592ff3 Add method for getting transoformations options
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-05-06 15:35:58 +02:00
Michal Čihař
d7529dc7a2 Remove unused code
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-05-06 15:25:34 +02:00
Marc Delisle
89f21f5109 About bug #4280: try to workaround PHP 5 session garbage collection
Signed-off-by: Marc Delisle <marc@infomarc.info>
2014-04-24 09:15:03 -04:00
Hugues Peccatte
e512768fce Fix coding style.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2014-04-18 18:51:04 +02:00
Hugues Peccatte
b61c12bff1 Fix coding style.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2014-04-18 10:19:58 +02:00
Marc Delisle
cb3929766a Fix merge conflict
Signed-off-by: Marc Delisle <marc@infomarc.info>
2014-03-25 06:18:21 -04:00
Michal Čihař
186a80939d Allow TCPDF to be removed
We currently require TCPDF to be present, but in most cases this is
feature which users do not need and thus can reduce size of installed
phpMyAdmin.

Also this is helpful for Linux distributions as they can provide soft
dependency on tcpdf package.

Signed-off-by: Michal Čihař <michal@cihar.com>
2014-03-24 16:12:13 +01:00
Marc Delisle
bab0572c1e Fix coding style
Signed-off-by: Marc Delisle <marc@infomarc.info>
2014-03-21 12:42:10 -04:00
Michal Čihař
d559fa6a21 Remove trailing whitespace from the code
Signed-off-by: Michal Čihař <michal@cihar.com>
2014-03-20 09:36:48 +01:00