From de4fb44eeb041ef933639969d09e46ac37d5ac17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucie=20Proch=C3=A1zkov=C3=A1?= Date: Sat, 10 Dec 2016 22:56:15 +0000 Subject: [PATCH 01/16] Translated using Weblate (Czech) Currently translated at 93.3% (3008 of 3222 strings) [CI skip] --- po/cs.po | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/po/cs.po b/po/cs.po index 645a0f6653..6b28330f4c 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,8 +6,8 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.6.5-dev\n" "Report-Msgid-Bugs-To: translators@phpmyadmin.net\n" "POT-Creation-Date: 2016-11-10 09:39+0100\n" -"PO-Revision-Date: 2016-11-24 13:35+0000\n" -"Last-Translator: ratajs \n" +"PO-Revision-Date: 2016-12-10 22:56+0000\n" +"Last-Translator: Lucie Procházková \n" "Language-Team: Czech " "\n" "Language: cs\n" @@ -2923,6 +2923,8 @@ msgstr "Selhalo formátování textu pro pravidlo „%s“." #, php-format msgid "Error in reading file: The file '%s' does not exist or is not readable!" msgstr "" +"Chyba při čtení souboru: Soubor '%s' neexistuje, nebo se jej nepodařilo " +"přečíst" #: libraries/Advisor.php:492 #, php-format @@ -3659,8 +3661,9 @@ msgid "Unknown error in file upload." msgstr "Neznámá chyba při nahrávání souboru." #: libraries/File.php:424 +#, fuzzy msgid "File is a symbolic link" -msgstr "" +msgstr "Soubor je symbolická linka." #: libraries/File.php:470 msgid "Error moving the uploaded file, see [doc@faq1-11]FAQ 1.11[/doc]." @@ -3813,8 +3816,9 @@ msgid "Page number:" msgstr "Strana číslo:" #: libraries/LanguageManager.php:867 +#, fuzzy msgid "Ignoring unsupported language code." -msgstr "" +msgstr "Ignorován nepodporovaný jazykový kód." #: libraries/Linter.php:99 msgid "" @@ -15756,7 +15760,7 @@ msgstr "Hašovací funkce pro heslo:" #: view_create.php:44 msgid "View name can not be empty" -msgstr "" +msgstr "Název pohledu nemůže být prázdný." #: view_create.php:247 msgid "VIEW name" From 78af58dd0a306c56d7f30bf25641a81187e28346 Mon Sep 17 00:00:00 2001 From: Isaac Bennetch Date: Mon, 12 Dec 2016 19:47:13 -0500 Subject: [PATCH 02/16] Improve documentation for servers with Suhosin; issue #12434 Signed-off-by: Isaac Bennetch --- ChangeLog | 1 + doc/faq.rst | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index d76afc97ca..52570da9fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,7 @@ phpMyAdmin - ChangeLog - issue #12786 Fixed database searching - issue #12792 Fixed javascript error on new version link - issue #12785 Add information about required and suggested extensions to composer.json +- issue #12434 Improve documentation for servers running with Suhosin 4.6.5.2 (2016-12-05) - issue #12765 Fixed SQL export with newlines diff --git a/doc/faq.rst b/doc/faq.rst index 8acf84401a..fbb2a10444 100644 --- a/doc/faq.rst +++ b/doc/faq.rst @@ -521,6 +521,23 @@ parameters: php.net/suhosin/configuration.html#logging_configuration>`_ should not include :term:`SQL`, otherwise you get big slowdown +* `suhosin.sql.union `_ must be disabled (which is the default). +* `suhosin.sql.multiselect `_ must be disabled (which is the default). +* `suhosin.sql.comment `_ must be disabled (which is the default). + +To further improve security, we also recommend these modifications: + +* `suhosin.executor.include.max\_traversal `_ should be + enabled as a mitigation against local file inclusion attacks. We suggest + setting this to 2 as ``../`` is used with the ReCaptcha library. +* `suhosin.cookie.encrypt `_ should be enabled. +* `suhosin.executor.disable_emodifier `_ should be enabled. You can also disable the warning using the :config:option:`$cfg['SuhosinDisableWarning']`. From c72b1563d13e26cc870b332afa7a2bf104229b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 18 Apr 2016 17:23:58 +0200 Subject: [PATCH 03/16] Fix various broken or outdated links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backported from master Signed-off-by: Michal Čihař --- doc/config.rst | 10 +++++----- doc/credits.rst | 4 ++-- doc/faq.rst | 33 ++++++++++++--------------------- doc/glossary.rst | 4 +++- 4 files changed, 22 insertions(+), 29 deletions(-) diff --git a/doc/config.rst b/doc/config.rst index 36c1b974d9..51e00d2a7f 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -692,7 +692,7 @@ Server connection settings For auto-upgrade functionality to work, your ``$cfg['Servers'][$i]['controluser']`` must have ALTER privilege on ``phpmyadmin`` database. See the `MySQL documentation for GRANT - `_ on how to + `_ on how to ``GRANT`` privileges to a user. .. _history: @@ -1577,7 +1577,7 @@ Cookie authentication options :default: ``''`` The public key for the reCaptcha service that can be obtained from - https://www.google.com/recaptcha. + https://www.google.com/recaptcha/intro/. reCaptcha will be then used in :ref:`cookie`. @@ -1587,7 +1587,7 @@ Cookie authentication options :default: ``''`` The private key for the reCaptcha service that can be obtain from - https://www.google.com/recaptcha. + https://www.google.com/recaptcha/intro/. reCaptcha will be then used in :ref:`cookie`. @@ -2228,7 +2228,7 @@ Languages Defines the default connection collation to use, if not user-defined. See the `MySQL documentation for charsets - `_ + `_ for list of possible values. .. config:option:: $cfg['Lang'] @@ -2927,7 +2927,7 @@ Developer :default: false Enable to let server present itself as demo server. - This is used for . + This is used for `phpMyAdmin demo server `_. Examples diff --git a/doc/credits.rst b/doc/credits.rst index fed0fd6e7c..910fb62235 100644 --- a/doc/credits.rst +++ b/doc/credits.rst @@ -182,8 +182,8 @@ Credits, in chronological order * :term:`PDF` schema output, thanks also to Olivier Plathey for the "FPDF" library (see ), Steven - Wittens for the "UFPDF" library and - Nicola Asuni for the "TCPDF" library (see ). + Wittens for the "UFPDF" library (see ) and + Nicola Asuni for the "TCPDF" library (see ). * Olof Edlund diff --git a/doc/faq.rst b/doc/faq.rst index fbb2a10444..888b56bb05 100644 --- a/doc/faq.rst +++ b/doc/faq.rst @@ -129,7 +129,7 @@ and after execution of your :term:`SQL` commands, removed. ------------------------------------------------------- The MySQL manual explains how to `reset the permissions -`_. +`_. .. _faq1_13: @@ -210,7 +210,7 @@ The proper solution is to use the `mysqli extension `_ with the proper client library to match your MySQL installation. More information (and several workarounds) are located in the `MySQL -Documentation `_. +Documentation `_. .. _faq1_18: @@ -316,7 +316,7 @@ should work. 1.27 I get empty page when I want to view huge page (eg. db\_structure.php with plenty of tables). -------------------------------------------------------------------------------------------------- -This was caused by a `PHP bug `_ that occur when +This was caused by a `PHP bug `_ that occur when GZIP output buffering is enabled. If you turn off it (by :config:option:`$cfg['OBGzip']` in :file:`config.inc.php`), it should work. This bug will has been fixed in PHP 5.0.0. @@ -493,32 +493,23 @@ The default values for most Suhosin configuration options will work in most scenarios, however you might want to adjust at least following parameters: -* `suhosin.request.max\_vars `_ should +* `suhosin.request.max\_vars `_ should be increased (eg. 2048) -* `suhosin.post.max\_vars `_ should be +* `suhosin.post.max\_vars `_ should be increased (eg. 2048) -* `suhosin.request.max\_array\_index\_length `_ +* `suhosin.request.max\_array\_index\_length `_ should be increased (eg. 256) -* `suhosin.post.max\_array\_index\_length `_ +* `suhosin.post.max\_array\_index\_length `_ should be increased (eg. 256) -* `suhosin.request.max\_totalname\_length `_ +* `suhosin.request.max\_totalname\_length `_ should be increased (eg. 8192) -* `suhosin.post.max\_totalname\_length `_ should be +* `suhosin.post.max\_totalname\_length `_ should be increased (eg. 8192) -* `suhosin.get.max\_value\_length `_ +* `suhosin.get.max\_value\_length `_ should be increased (eg. 1024) -* `suhosin.sql.bailout\_on\_error `_ +* `suhosin.sql.bailout\_on\_error `_ needs to be disabled (the default) -* `suhosin.log.\* `_ should not +* `suhosin.log.\* `_ should not include :term:`SQL`, otherwise you get big slowdown * `suhosin.sql.union + .. seealso:: SSL Secure Sockets Layer is a cryptographic protocol which provides secure @@ -369,6 +369,8 @@ From Wikipedia, the free encyclopedia UFPDF Unicode/UTF-8 extension for :term:`FPDF` + .. seealso:: + URL Uniform Resource Locator is a sequence of characters, conforming to a standardized format, that is used for referring to resources, such as From 1308ecccd0cd2289aa91a5f766aa0286d17c3500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 13 Dec 2016 08:23:46 +0100 Subject: [PATCH 04/16] Enable testing in PHP 7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I hoped there will be phpMyAdmin 4.7.0 by time PHP 7.1 is out, but obviously that's not the case, so we should fix 4.6 branch as well. Signed-off-by: Michal Čihař --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 0f26ad6965..4ce3a6dde1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ language: php php: + - "7.1" - "7.0" - "5.6" - "5.5" From 034047a21908d1a547682862b9589191d036c9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 13 Dec 2016 08:27:02 +0100 Subject: [PATCH 05/16] There is no runkit for 7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- test/install-runkit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/install-runkit b/test/install-runkit index 0b3b55cdf0..7fde346b05 100755 --- a/test/install-runkit +++ b/test/install-runkit @@ -6,7 +6,7 @@ if [ -n "$GATEWAY_INTERFACE" ] ; then exit 1 fi -if [ "$TRAVIS_PHP_VERSION" = "nightly" -o "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "7.0" ] ; then +if [ "$TRAVIS_PHP_VERSION" = "nightly" -o "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "7.0" -o "$TRAVIS_PHP_VERSION" = "7.1" ] ; then exit 0 fi From 48144987d810a2b2ec113f1d94375387f3782e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 5 Sep 2016 18:46:01 +0200 Subject: [PATCH 06/16] Ensure font size is integer, we do further calculations with it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- libraries/plugins/schema/svg/Svg.php | 6 +++--- libraries/plugins/schema/svg/SvgRelationSchema.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/plugins/schema/svg/Svg.php b/libraries/plugins/schema/svg/Svg.php index 0ea3c90adf..d0f4b44de4 100644 --- a/libraries/plugins/schema/svg/Svg.php +++ b/libraries/plugins/schema/svg/Svg.php @@ -104,7 +104,7 @@ class Svg extends XMLWriter /** * Set document font size * - * @param string $value sets the font size in pixels + * @param integer $value sets the font size in pixels * * @return void */ @@ -116,7 +116,7 @@ class Svg extends XMLWriter /** * Get document font size * - * @return string returns the font size + * @return integer returns the font size */ public function getFontSize() { @@ -240,7 +240,7 @@ class Svg extends XMLWriter $this->writeAttribute('style', $styles); if (isset($text)) { $this->writeAttribute('font-family', $this->font); - $this->writeAttribute('font-size', $this->fontSize); + $this->writeAttribute('font-size', $this->fontSize . 'px'); $this->text($text); } $this->endElement(); diff --git a/libraries/plugins/schema/svg/SvgRelationSchema.php b/libraries/plugins/schema/svg/SvgRelationSchema.php index 2ba33514d0..fa81b29df5 100644 --- a/libraries/plugins/schema/svg/SvgRelationSchema.php +++ b/libraries/plugins/schema/svg/SvgRelationSchema.php @@ -72,7 +72,7 @@ class SvgRelationSchema extends ExportRelationSchema ); $this->diagram->SetAuthor('phpMyAdmin ' . PMA_VERSION); $this->diagram->setFont('Arial'); - $this->diagram->setFontSize('16px'); + $this->diagram->setFontSize(16); $alltables = $this->getTablesFromRequest(); @@ -264,4 +264,4 @@ class SvgRelationSchema extends ExportRelationSchema $table->tableDraw($this->showColor); } } -} \ No newline at end of file +} From 9f5789dff85302cc78d23ded2e67dd59d57f6870 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 6 Sep 2016 10:00:14 +0200 Subject: [PATCH 07/16] Set reasonable mock value for tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set integer where we do a COUNT() SQL. See also #12539 Signed-off-by: Michal Čihař --- test/libraries/PMA_server_status_monitor_test.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/libraries/PMA_server_status_monitor_test.php b/test/libraries/PMA_server_status_monitor_test.php index 3bce886cef..522938a3a5 100644 --- a/test/libraries/PMA_server_status_monitor_test.php +++ b/test/libraries/PMA_server_status_monitor_test.php @@ -246,12 +246,12 @@ class PMA_ServerStatusMonitor_Test extends PHPUnit_Framework_TestCase $value = array( 'sql_text' => 'insert sql_text', - '#' => 'types', + '#' => 11, ); $value2 = array( 'sql_text' => 'update sql_text', - '#' => 'types2', + '#' => 10, ); $dbi->expects($this->at(1))->method('fetchAssoc') @@ -269,10 +269,10 @@ class PMA_ServerStatusMonitor_Test extends PHPUnit_Framework_TestCase $ret = PMA_getJsonForLogDataTypeSlow($start, $end); $result_rows = array( - array('sql_text' => 'insert sql_text', '#' => 'types'), - array('sql_text' => 'update sql_text', '#' => 'types2') + array('sql_text' => 'insert sql_text', '#' => 11), + array('sql_text' => 'update sql_text', '#' => 10) ); - $result_sum = array('insert' =>0, 'TOTAL' =>0, 'update' => 0); + $result_sum = array('insert' =>11, 'TOTAL' =>21, 'update' => 10); $this->assertEquals( 2, $ret['numRows'] From ffaf589a26432a9d12b329c7c102ce032568e4e7 Mon Sep 17 00:00:00 2001 From: Deven Bansod Date: Tue, 6 Sep 2016 12:10:23 +0530 Subject: [PATCH 08/16] Fix numeric errors Signed-off-by: Deven Bansod --- libraries/SysInfoLinux.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/SysInfoLinux.php b/libraries/SysInfoLinux.php index 6d66c9c279..c2afba8b12 100644 --- a/libraries/SysInfoLinux.php +++ b/libraries/SysInfoLinux.php @@ -76,16 +76,16 @@ class SysInfoLinux extends \PMA\libraries\SysInfo $mem = array_merge($defaults, $mem); + foreach ($mem as $idx => $value) { + $mem[$idx] = intval($value); + } + $mem['MemUsed'] = $mem['MemTotal'] - $mem['MemFree'] - $mem['Cached'] - $mem['Buffers']; $mem['SwapUsed'] = $mem['SwapTotal'] - $mem['SwapFree'] - $mem['SwapCached']; - foreach ($mem as $idx => $value) { - $mem[$idx] = intval($value); - } - return $mem; } } From cb6d733e5ac2a9e3720ae69918041ae95b27d4c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 6 Sep 2016 10:24:04 +0200 Subject: [PATCH 09/16] Fix other places of wrong value for # in tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- test/libraries/PMA_server_status_monitor_test.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/libraries/PMA_server_status_monitor_test.php b/test/libraries/PMA_server_status_monitor_test.php index 522938a3a5..5fa8aac2e8 100644 --- a/test/libraries/PMA_server_status_monitor_test.php +++ b/test/libraries/PMA_server_status_monitor_test.php @@ -303,13 +303,13 @@ class PMA_ServerStatusMonitor_Test extends PHPUnit_Framework_TestCase $value = array( 'sql_text' => 'insert sql_text', - '#' => 'types', + '#' => 10, 'argument' => 'argument argument2', ); $value2 = array( 'sql_text' => 'update sql_text', - '#' => 'types2', + '#' => 11, 'argument' => 'argument3 argument4', ); @@ -331,7 +331,7 @@ class PMA_ServerStatusMonitor_Test extends PHPUnit_Framework_TestCase $value, $value2, ); - $result_sum = array('argument' =>0, 'TOTAL' =>0, 'argument3' => 0); + $result_sum = array('argument' =>10, 'TOTAL' =>21, 'argument3' => 11); $this->assertEquals( 2, @@ -363,7 +363,7 @@ class PMA_ServerStatusMonitor_Test extends PHPUnit_Framework_TestCase $value = array( 'sql_text' => 'insert sql_text', - '#' => 'types', + '#' => 22, 'argument' => 'argument argument2', ); @@ -402,7 +402,7 @@ class PMA_ServerStatusMonitor_Test extends PHPUnit_Framework_TestCase $value = array( 'sql_text' => 'insert sql_text', - '#' => 'types', + '#' => 33, 'argument' => 'argument argument2', ); From 1fd24b650d005782ac9f9edc73fb4f46d4ad0410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 13 Dec 2016 08:36:07 +0100 Subject: [PATCH 10/16] Update phpSecLib to 2.0.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix E_DEPRECATED errors on PHP 7.1 * Random: fix issues with serialize() Issue #12800 Signed-off-by: Michal Čihař --- ChangeLog | 1 + libraries/phpseclib/Crypt/Base.php | 54 +++++++++++++++------------- libraries/phpseclib/Crypt/Random.php | 49 +++++++++++++++++++++---- 3 files changed, 73 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index 52570da9fc..26f14daf01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,7 @@ phpMyAdmin - ChangeLog - issue #12792 Fixed javascript error on new version link - issue #12785 Add information about required and suggested extensions to composer.json - issue #12434 Improve documentation for servers running with Suhosin +- issue #12800 Updated embedded phpSecLib to 2.0.4 4.6.5.2 (2016-12-05) - issue #12765 Fixed SQL export with newlines diff --git a/libraries/phpseclib/Crypt/Base.php b/libraries/phpseclib/Crypt/Base.php index e1d0b8b272..42aa9b56af 100644 --- a/libraries/phpseclib/Crypt/Base.php +++ b/libraries/phpseclib/Crypt/Base.php @@ -708,10 +708,13 @@ abstract class Base return !defined('OPENSSL_RAW_DATA') ? substr($result, 0, -$this->block_size) : $result; case self::MODE_CBC: $result = openssl_encrypt($plaintext, $this->cipher_name_openssl, $this->key, $this->openssl_options, $this->encryptIV); + if (!defined('OPENSSL_RAW_DATA')) { + $result = substr($result, 0, -$this->block_size); + } if ($this->continuousBuffer) { $this->encryptIV = substr($result, -$this->block_size); } - return !defined('OPENSSL_RAW_DATA') ? substr($result, 0, -$this->block_size) : $result; + return $result; case self::MODE_CTR: return $this->_openssl_ctr_process($plaintext, $this->encryptIV, $this->enbuffer); case self::MODE_CFB: @@ -773,7 +776,7 @@ abstract class Base $this->changed = false; } if ($this->enchanged) { - mcrypt_generic_init($this->enmcrypt, $this->key, $this->encryptIV); + @mcrypt_generic_init($this->enmcrypt, $this->key, $this->encryptIV); $this->enchanged = false; } @@ -806,15 +809,15 @@ abstract class Base if ($len >= $block_size) { if ($this->enbuffer['enmcrypt_init'] === false || $len > $this->cfb_init_len) { if ($this->enbuffer['enmcrypt_init'] === true) { - mcrypt_generic_init($this->enmcrypt, $this->key, $iv); + @mcrypt_generic_init($this->enmcrypt, $this->key, $iv); $this->enbuffer['enmcrypt_init'] = false; } - $ciphertext.= mcrypt_generic($this->enmcrypt, substr($plaintext, $i, $len - $len % $block_size)); + $ciphertext.= @mcrypt_generic($this->enmcrypt, substr($plaintext, $i, $len - $len % $block_size)); $iv = substr($ciphertext, -$block_size); $len%= $block_size; } else { while ($len >= $block_size) { - $iv = mcrypt_generic($this->ecb, $iv) ^ substr($plaintext, $i, $block_size); + $iv = @mcrypt_generic($this->ecb, $iv) ^ substr($plaintext, $i, $block_size); $ciphertext.= $iv; $len-= $block_size; $i+= $block_size; @@ -823,7 +826,7 @@ abstract class Base } if ($len) { - $iv = mcrypt_generic($this->ecb, $iv); + $iv = @mcrypt_generic($this->ecb, $iv); $block = $iv ^ substr($plaintext, -$len); $iv = substr_replace($iv, $block, 0, $len); $ciphertext.= $block; @@ -833,10 +836,10 @@ abstract class Base return $ciphertext; } - $ciphertext = mcrypt_generic($this->enmcrypt, $plaintext); + $ciphertext = @mcrypt_generic($this->enmcrypt, $plaintext); if (!$this->continuousBuffer) { - mcrypt_generic_init($this->enmcrypt, $this->key, $this->encryptIV); + @mcrypt_generic_init($this->enmcrypt, $this->key, $this->encryptIV); } return $ciphertext; @@ -1014,10 +1017,13 @@ abstract class Base if (!defined('OPENSSL_RAW_DATA')) { $padding = str_repeat(chr($this->block_size), $this->block_size) ^ substr($ciphertext, -$this->block_size); $ciphertext.= substr(openssl_encrypt($padding, $this->cipher_name_openssl_ecb, $this->key, true), 0, $this->block_size); + $offset = 2 * $this->block_size; + } else { + $offset = $this->block_size; } $plaintext = openssl_decrypt($ciphertext, $this->cipher_name_openssl, $this->key, $this->openssl_options, $this->decryptIV); if ($this->continuousBuffer) { - $this->decryptIV = substr($ciphertext, -$this->block_size); + $this->decryptIV = substr($ciphertext, -$offset, $this->block_size); } break; case self::MODE_CTR: @@ -1082,7 +1088,7 @@ abstract class Base $this->changed = false; } if ($this->dechanged) { - mcrypt_generic_init($this->demcrypt, $this->key, $this->decryptIV); + @mcrypt_generic_init($this->demcrypt, $this->key, $this->decryptIV); $this->dechanged = false; } @@ -1110,12 +1116,12 @@ abstract class Base } if ($len >= $block_size) { $cb = substr($ciphertext, $i, $len - $len % $block_size); - $plaintext.= mcrypt_generic($this->ecb, $iv . $cb) ^ $cb; + $plaintext.= @mcrypt_generic($this->ecb, $iv . $cb) ^ $cb; $iv = substr($cb, -$block_size); $len%= $block_size; } if ($len) { - $iv = mcrypt_generic($this->ecb, $iv); + $iv = @mcrypt_generic($this->ecb, $iv); $plaintext.= $iv ^ substr($ciphertext, -$len); $iv = substr_replace($iv, substr($ciphertext, -$len), 0, $len); $pos = $len; @@ -1124,10 +1130,10 @@ abstract class Base return $plaintext; } - $plaintext = mdecrypt_generic($this->demcrypt, $ciphertext); + $plaintext = @mdecrypt_generic($this->demcrypt, $ciphertext); if (!$this->continuousBuffer) { - mcrypt_generic_init($this->demcrypt, $this->key, $this->decryptIV); + @mcrypt_generic_init($this->demcrypt, $this->key, $this->decryptIV); } return $this->paddable ? $this->_unpad($plaintext) : $plaintext; @@ -1270,7 +1276,7 @@ abstract class Base * PHP's OpenSSL bindings do not operate in continuous mode so we'll wrap around it. Since the keystream * for CTR is the same for both encrypting and decrypting this function is re-used by both Base::encrypt() * and Base::decrypt(). Also, OpenSSL doesn't implement CTR for all of it's symmetric ciphers so this - * function will emulate CTR with ECB when necesary. + * function will emulate CTR with ECB when necessary. * * @see self::encrypt() * @see self::decrypt() @@ -1589,7 +1595,7 @@ abstract class Base case self::ENGINE_MCRYPT: return $this->cipher_name_mcrypt && extension_loaded('mcrypt') && - in_array($this->cipher_name_mcrypt, mcrypt_list_algorithms()); + in_array($this->cipher_name_mcrypt, @mcrypt_list_algorithms()); case self::ENGINE_INTERNAL: return true; } @@ -1668,13 +1674,13 @@ abstract class Base if ($this->engine != self::ENGINE_MCRYPT && $this->enmcrypt) { // Closing the current mcrypt resource(s). _mcryptSetup() will, if needed, // (re)open them with the module named in $this->cipher_name_mcrypt - mcrypt_module_close($this->enmcrypt); - mcrypt_module_close($this->demcrypt); + @mcrypt_module_close($this->enmcrypt); + @mcrypt_module_close($this->demcrypt); $this->enmcrypt = null; $this->demcrypt = null; if ($this->ecb) { - mcrypt_module_close($this->ecb); + @mcrypt_module_close($this->ecb); $this->ecb = null; } } @@ -1788,19 +1794,19 @@ abstract class Base self::MODE_STREAM => MCRYPT_MODE_STREAM, ); - $this->demcrypt = mcrypt_module_open($this->cipher_name_mcrypt, '', $mcrypt_modes[$this->mode], ''); - $this->enmcrypt = mcrypt_module_open($this->cipher_name_mcrypt, '', $mcrypt_modes[$this->mode], ''); + $this->demcrypt = @mcrypt_module_open($this->cipher_name_mcrypt, '', $mcrypt_modes[$this->mode], ''); + $this->enmcrypt = @mcrypt_module_open($this->cipher_name_mcrypt, '', $mcrypt_modes[$this->mode], ''); // we need the $ecb mcrypt resource (only) in MODE_CFB with enableContinuousBuffer() // to workaround mcrypt's broken ncfb implementation in buffered mode // see: {@link http://phpseclib.sourceforge.net/cfb-demo.phps} if ($this->mode == self::MODE_CFB) { - $this->ecb = mcrypt_module_open($this->cipher_name_mcrypt, '', MCRYPT_MODE_ECB, ''); + $this->ecb = @mcrypt_module_open($this->cipher_name_mcrypt, '', MCRYPT_MODE_ECB, ''); } } // else should mcrypt_generic_deinit be called? if ($this->mode == self::MODE_CFB) { - mcrypt_generic_init($this->ecb, $this->key, str_repeat("\0", $this->block_size)); + @mcrypt_generic_init($this->ecb, $this->key, str_repeat("\0", $this->block_size)); } } @@ -2499,7 +2505,7 @@ abstract class Base * is stored, classwide (!), here for reusing. * * The string-based index of $function is a classwide - * uniqe value representing, at least, the $mode of + * unique value representing, at least, the $mode of * operation (or more... depends of the optimizing level) * for which $mode the lambda function was created. * diff --git a/libraries/phpseclib/Crypt/Random.php b/libraries/phpseclib/Crypt/Random.php index 586bd6c4d5..44b5b4baa2 100644 --- a/libraries/phpseclib/Crypt/Random.php +++ b/libraries/phpseclib/Crypt/Random.php @@ -148,13 +148,13 @@ class Random session_start(); $v = $seed = $_SESSION['seed'] = pack('H*', sha1( - serialize($_SERVER) . - serialize($_POST) . - serialize($_GET) . - serialize($_COOKIE) . - serialize($GLOBALS) . - serialize($_SESSION) . - serialize($_OLD_SESSION) + (isset($_SERVER) ? phpseclib_safe_serialize($_SERVER) : '') . + (isset($_POST) ? phpseclib_safe_serialize($_POST) : '') . + (isset($_GET) ? phpseclib_safe_serialize($_GET) : '') . + (isset($_COOKIE) ? phpseclib_safe_serialize($_COOKIE) : '') . + phpseclib_safe_serialize($GLOBALS) . + phpseclib_safe_serialize($_SESSION) . + phpseclib_safe_serialize($_OLD_SESSION) )); if (!isset($_SESSION['count'])) { $_SESSION['count'] = 0; @@ -241,3 +241,38 @@ class Random return substr($result, 0, $length); } } + +if (!function_exists('phpseclib_safe_serialize')) { + /** + * Safely serialize variables + * + * If a class has a private __sleep() method it'll give a fatal error on PHP 5.2 and earlier. + * PHP 5.3 will emit a warning. + * + * @param mixed $arr + * @access public + */ + function phpseclib_safe_serialize(&$arr) + { + if (is_object($arr)) { + return ''; + } + if (!is_array($arr)) { + return serialize($arr); + } + // prevent circular array recursion + if (isset($arr['__phpseclib_marker'])) { + return ''; + } + $safearr = array(); + $arr['__phpseclib_marker'] = true; + foreach (array_keys($arr) as $key) { + // do not recurse on the '__phpseclib_marker' key itself, for smaller memory usage + if ($key !== '__phpseclib_marker') { + $safearr[$key] = phpseclib_safe_serialize($arr[$key]); + } + } + unset($arr['__phpseclib_marker']); + return serialize($safearr); + } +} From 28968fe919964d32ed30a84dcb92ff0ef53df5ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 6 Sep 2016 09:48:14 +0200 Subject: [PATCH 11/16] Set correct Uptime value for tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MySQL returns this as integer, so we should do the same for tests. See also #12539 Signed-off-by: Michal Čihař --- test/libraries/PMA_server_status_queries_test.php | 3 +-- test/libraries/PMA_server_status_test.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/test/libraries/PMA_server_status_queries_test.php b/test/libraries/PMA_server_status_queries_test.php index c18e9004b9..3b0c8b1545 100644 --- a/test/libraries/PMA_server_status_queries_test.php +++ b/test/libraries/PMA_server_status_queries_test.php @@ -114,8 +114,7 @@ class PMA_ServerStatusQueries_Test extends PHPUnit_Framework_TestCase $GLOBALS['dbi'] = $dbi; $this->ServerStatusData = new ServerStatusData(); - $upTime = "10h"; - $this->ServerStatusData->status['Uptime'] = $upTime; + $this->ServerStatusData->status['Uptime'] = 36000; $this->ServerStatusData->used_queries = array( "Com_change_db" => "15", "Com_select" => "12", diff --git a/test/libraries/PMA_server_status_test.php b/test/libraries/PMA_server_status_test.php index 8c28e426bf..d0217b77e9 100644 --- a/test/libraries/PMA_server_status_test.php +++ b/test/libraries/PMA_server_status_test.php @@ -152,13 +152,12 @@ class PMA_ServerStatus_Test extends PHPUnit_Framework_TestCase public function testPMAGetHtmlForServerStatus() { //parameters - $upTime = "10h"; $bytes_received = 100; $bytes_sent = 200; $max_used_conn = 500; $aborted_conn = 200; $conn = 1000; - $this->ServerStatusData->status['Uptime'] = $upTime; + $this->ServerStatusData->status['Uptime'] = 36000; $this->ServerStatusData->status['Bytes_received'] = $bytes_received; $this->ServerStatusData->status['Bytes_sent'] = $bytes_sent; $this->ServerStatusData->status['Max_used_connections'] = $max_used_conn; From 569a4d280c34fe463bff894583114d65a3b6835b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 6 Sep 2016 09:51:34 +0200 Subject: [PATCH 12/16] Fix test expectations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- test/libraries/PMA_server_status_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/libraries/PMA_server_status_test.php b/test/libraries/PMA_server_status_test.php index d0217b77e9..0c49ce1288 100644 --- a/test/libraries/PMA_server_status_test.php +++ b/test/libraries/PMA_server_status_test.php @@ -177,7 +177,7 @@ class PMA_ServerStatus_Test extends PHPUnit_Framework_TestCase ); //updatetime $upTime_html = 'This MySQL server has been running for ' - . '0 days, 0 hours, 0 minutes and 10h seconds'; + . '0 days, 10 hours, 0 minutes and 0 seconds'; $this->assertContains( $upTime_html, $html From 2086bb61c17fc104074867c3df6b01d0e1a3ea70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 13 Dec 2016 09:21:48 +0100 Subject: [PATCH 13/16] Add changelog entry for PHP 7.1 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #12800 Signed-off-by: Michal Čihař --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 26f14daf01..f6632087df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,7 @@ phpMyAdmin - ChangeLog - issue #12785 Add information about required and suggested extensions to composer.json - issue #12434 Improve documentation for servers running with Suhosin - issue #12800 Updated embedded phpSecLib to 2.0.4 +- issue #12800 Fixed various issues with PHP 7.1 4.6.5.2 (2016-12-05) - issue #12765 Fixed SQL export with newlines From 7ae3259b6406628c941fc23844256d8d938a261d Mon Sep 17 00:00:00 2001 From: Laura Arjona Reina Date: Tue, 13 Dec 2016 09:25:01 +0000 Subject: [PATCH 14/16] Translated using Weblate (Spanish) Currently translated at 99.7% (3215 of 3222 strings) [CI skip] --- po/es.po | 107 +++++++++++++++++++++++++------------------------------ 1 file changed, 49 insertions(+), 58 deletions(-) diff --git a/po/es.po b/po/es.po index e5af3cfe89..e01be7c269 100644 --- a/po/es.po +++ b/po/es.po @@ -4,16 +4,16 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.6.5-dev\n" "Report-Msgid-Bugs-To: translators@phpmyadmin.net\n" "POT-Creation-Date: 2016-11-10 09:39+0100\n" -"PO-Revision-Date: 2016-07-27 00:30+0000\n" -"Last-Translator: jorge jansen abreu \n" -"Language-Team: Spanish \n" +"PO-Revision-Date: 2016-12-13 09:24+0000\n" +"Last-Translator: Laura Arjona Reina \n" +"Language-Team: Spanish " +"\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 2.8-dev\n" +"X-Generator: Weblate 2.10-dev\n" #: changelog.php:38 license.php:33 #, php-format @@ -792,6 +792,7 @@ msgstr "" #: index.php:509 msgid "The secret passphrase in configuration (blowfish_secret) is too short." msgstr "" +"La frase secreta en la configuración (blowfish_secret) es demasiado corta." #: index.php:523 msgid "" @@ -1822,6 +1823,7 @@ msgstr "Exportar" #: js/messages.php:389 msgid "No routine is exportable. Required privileges may be lacking." msgstr "" +"No se puede exportar ninguna rutina. Quizá falten los privilegios necesarios." #: js/messages.php:392 libraries/rte/rte_routines.lib.php:754 msgid "ENUM/SET editor" @@ -2182,12 +2184,16 @@ msgid "" "MySQL accepts additional values not selectable by the slider; key in those " "values directly if desired" msgstr "" +"MySQL acepta valores adicionales que no se pueden seleccionar en el " +"deslizador; introduzca esos valores directamente si lo desea" #: js/messages.php:528 msgid "" "MySQL accepts additional values not selectable by the datepicker; key in " "those values directly if desired" msgstr "" +"MySQL acepta valores adicionales que no se pueden seleccionar en el " +"calendario; introduzca esos valores directamente si lo desea" #: js/messages.php:534 msgid "" @@ -2966,6 +2972,7 @@ msgstr "No se pudo dar formato a una cadena para la regla '%s'." #, php-format msgid "Error in reading file: The file '%s' does not exist or is not readable!" msgstr "" +"Error al leer el archivo: ¡El archivo '%s' no existe o no se puede leer!" #: libraries/Advisor.php:492 #, php-format @@ -3704,7 +3711,7 @@ msgstr "Error desconocido al subir el archivo." #: libraries/File.php:424 msgid "File is a symbolic link" -msgstr "" +msgstr "El archivo es un enlace simbólico" #: libraries/File.php:470 msgid "Error moving the uploaded file, see [doc@faq1-11]FAQ 1.11[/doc]." @@ -5242,10 +5249,8 @@ msgid "You allow for connecting to the server without a password." msgstr "Permite conectarse al servidor sin contraseña." #: libraries/config/ServerConfigChecks.php:347 -#, fuzzy -#| msgid "Key is too short, it should have at least 8 characters." msgid "Key is too short, it should have at least 32 characters." -msgstr "La clave es muy corta, debe tener al menos 8 caracteres." +msgstr "La clave es muy corta, debe tener al menos 32 caracteres." #: libraries/config/ServerConfigChecks.php:357 msgid "Key should contain letters, numbers [em]and[/em] special characters." @@ -5388,10 +5393,8 @@ msgid "Could not connect to the database server!" msgstr "¡No se pudo conectar con el servidor de base de datos!" #: libraries/config/Validator.php:243 -#, fuzzy -#| msgid "Authentication type" msgid "Invalid authentication type!" -msgstr "Tipo de autenticación" +msgstr "¡Tipo de autenticación inválida!" #: libraries/config/Validator.php:250 msgid "Empty username while using [kbd]config[/kbd] authentication method!" @@ -9420,10 +9423,8 @@ msgid "Log out" msgstr "Finalizar sesión" #: libraries/navigation/NavigationHeader.php:170 -#, fuzzy -#| msgid "Dumping data" msgid "Empty session data" -msgstr "Volcado de datos" +msgstr "Datos de sesión vacíos" #: libraries/navigation/NavigationHeader.php:186 msgid "phpMyAdmin documentation" @@ -9455,9 +9456,8 @@ msgstr[1] "Se encontró %s resultado adicional" #: libraries/navigation/NavigationTree.php:1364 #: libraries/navigation/NavigationTree.php:1401 -#, fuzzy msgid "Type to filter these, Enter to search all" -msgstr "Escribe para filtrar estos, Introduce para buscar todo" +msgstr "Escribe para filtrar estos, «Intro» para buscar todo" #: libraries/navigation/NavigationTree.php:1366 #: libraries/navigation/NavigationTree.php:1402 @@ -12023,10 +12023,8 @@ msgid "routine" msgstr "rutina" #: libraries/rte/rte_words.lib.php:32 -#, fuzzy -#| msgid "You do not have the necessary privileges to create a routine" msgid "You do not have the necessary privileges to create a routine." -msgstr "No posee los privilegios necesarios para crear una rutina" +msgstr "No posee los privilegios necesarios para crear una rutina." #: libraries/rte/rte_words.lib.php:35 #, php-format @@ -12034,6 +12032,8 @@ msgid "" "No routine with name %1$s found in database %2$s. You might be lacking the " "necessary privileges to edit this routine." msgstr "" +"No se encuentran rutinas con nombre %1$s en la base de datos %2$s. Quizá " +"falten los privilegios necesarios para editar esta rutina." #: libraries/rte/rte_words.lib.php:39 #, php-format @@ -12041,12 +12041,13 @@ msgid "" "No routine with name %1$s found in database %2$s. You might be lacking the " "necessary privileges to view/export this routine." msgstr "" +"No se encuentran rutinas con nombre %1$s en la base de datos %2$s. Quizá " +"falten los privilegios necesarios para ver/exportar esta rutina." #: libraries/rte/rte_words.lib.php:42 -#, fuzzy, php-format -#| msgid "No routine with name %1$s found in database %2$s" +#, php-format msgid "No routine with name %1$s found in database %2$s." -msgstr "No se encontró rutina con nombre %1$s en la base de datos %2$s" +msgstr "No se encontró rutina con nombre %1$s en la base de datos %2$s." #: libraries/rte/rte_words.lib.php:43 msgid "There are no routines to display." @@ -12066,16 +12067,13 @@ msgid "trigger" msgstr "disparador" #: libraries/rte/rte_words.lib.php:54 -#, fuzzy -#| msgid "You do not have the necessary privileges to create a trigger" msgid "You do not have the necessary privileges to create a trigger." -msgstr "No posee los privilegios necesarios para crear un disparador" +msgstr "No posee los privilegios necesarios para crear un disparador." #: libraries/rte/rte_words.lib.php:56 -#, fuzzy, php-format -#| msgid "No trigger with name %1$s found in database %2$s" +#, php-format msgid "No trigger with name %1$s found in database %2$s." -msgstr "No se encontró disparador con nombre %1$s en la base de datos %2$s" +msgstr "No se encontró disparador con nombre %1$s en la base de datos %2$s." #: libraries/rte/rte_words.lib.php:57 msgid "There are no triggers to display." @@ -12095,16 +12093,13 @@ msgid "event" msgstr "evento" #: libraries/rte/rte_words.lib.php:68 -#, fuzzy -#| msgid "You do not have the necessary privileges to create an event" msgid "You do not have the necessary privileges to create an event." -msgstr "No posee los privilegios necesarios para crear un evento" +msgstr "No posee los privilegios necesarios para crear un evento." #: libraries/rte/rte_words.lib.php:70 -#, fuzzy, php-format -#| msgid "No event with name %1$s found in database %2$s" +#, php-format msgid "No event with name %1$s found in database %2$s." -msgstr "No se encontró evento con nombre %1$s en la base de datos %2$s" +msgstr "No se encontró evento con nombre %1$s en la base de datos %2$s." #: libraries/rte/rte_words.lib.php:71 msgid "There are no events to display." @@ -12382,6 +12377,8 @@ msgid "" "Allows user to give to other users or remove from other users privileges " "that user possess on this routine." msgstr "" +"Permite al usuario dar o quitar a otros usuarios los permisos que el usuario " +"posee en esta rutina." #: libraries/server_privileges.lib.php:1042 msgid "Allows altering and dropping this routine." @@ -12444,6 +12441,8 @@ msgid "" "Allows user to give to other users or remove from other users the privileges " "that user possess yourself." msgstr "" +"Permite al usuario dar o quitar a otros usuarios los permisos que el usuario " +"posee." #: libraries/server_privileges.lib.php:1552 msgid "Native MySQL authentication" @@ -13949,20 +13948,20 @@ msgstr "Se esperaba un corchete de apertura." #: libraries/sql-parser/src/Statements/InsertStatement.php:227 #: libraries/sql-parser/src/Statements/ReplaceStatement.php:165 #: libraries/sql-parser/src/Statements/ReplaceStatement.php:193 -#, fuzzy -#| msgid "Unexpected token." msgid "Unexpected keyword." -msgstr "Símbolo (token) inesperado." +msgstr "Palabra clave inesperada." #: libraries/sql-parser/src/Components/CaseExpression.php:202 msgid "Unexpected end of CASE expression" -msgstr "" +msgstr "Final inesperado de expresión CASE" #: libraries/sql-parser/src/Components/CreateDefinition.php:227 msgid "" "A symbol name was expected! A reserved keyword can not be used as a column " "name without backquotes." msgstr "" +"¡Se esperaba un nombre de símbolo! Una palabra reservada no puede usarse " +"como nombre de columna sin comillas." #: libraries/sql-parser/src/Components/CreateDefinition.php:241 msgid "A symbol name was expected!" @@ -14010,10 +14009,9 @@ msgid "This option conflicts with \"%1$s\"." msgstr "Esta opción tiene conflictos con \"%1$s\"." #: libraries/sql-parser/src/Components/OptionsArray.php:260 -#, fuzzy, php-format -#| msgid "Ending quote %1$s was expected." +#, php-format msgid "Value/Expression for the option %1$s was expected" -msgstr "Se esperaba terminar la cita %1$s." +msgstr "Se esperaba una expresión/valor para la opción %1$s" #: libraries/sql-parser/src/Components/RenameOperation.php:101 msgid "The old name of the table was expected." @@ -14083,20 +14081,16 @@ msgid "Unrecognized keyword." msgstr "Palabra clave no reconocida." #: libraries/sql-parser/src/Statement.php:457 -#, fuzzy -#| msgid "Unexpected beginning of statement." msgid "Unexpected ordering of clauses." -msgstr "Comienzo inesperado de declaración." +msgstr "Orden inesperado de condiciones." #: libraries/sql-parser/src/Statements/CreateStatement.php:381 msgid "The name of the entity was expected." msgstr "Se esperaba el nombre de la entidad." #: libraries/sql-parser/src/Statements/CreateStatement.php:436 -#, fuzzy -#| msgid "Variable name was expected." msgid "A table name was expected." -msgstr "Se esperaba el nombre de la variable." +msgstr "Se esperaba un nombre de tabla." #: libraries/sql-parser/src/Statements/CreateStatement.php:444 msgid "At least one column definition was expected." @@ -14107,10 +14101,8 @@ msgid "A \"RETURNS\" keyword was expected." msgstr "Se esperaba una palabra \"RETURNS\"." #: libraries/sql-parser/src/Statements/DeleteStatement.php:303 -#, fuzzy -#| msgid "This type of clause was previously parsed." msgid "This type of clause is not valid in Multi-table queries." -msgstr "Este tipo de cláusula se analizó previamente." +msgstr "Este tipo de cláusula no es válida en consultas multi-tabla." #: libraries/sql.lib.php:231 msgid "Detailed profile" @@ -14672,10 +14664,8 @@ msgstr "" "config para utilizarlo." #: setup/frames/index.inc.php:132 -#, fuzzy -#| msgid "Configuration saved." msgid "Configuration not saved!" -msgstr "Configuración guardada." +msgstr "¡Configuración no guardada!" #: setup/frames/index.inc.php:147 setup/frames/menu.inc.php:19 msgid "Overview" @@ -14797,7 +14787,7 @@ msgstr "Datos incorrectos" #: setup/validate.php:30 #, php-format msgid "Wrong data or no validation for %s" -msgstr "" +msgstr "Datos erróneos o sin validación para %s" #: tbl_create.php:30 tbl_get_field.php:26 #, php-format @@ -14859,10 +14849,8 @@ msgid "Table name" msgstr "Nombre de la tabla" #: templates/columns_definitions/column_definitions_form.phtml:65 -#, fuzzy -#| msgid "Columns" msgid "column(s)" -msgstr "Columnas" +msgstr "columna(s)" #: templates/columns_definitions/column_definitions_form.phtml:92 msgid "Collation:" @@ -15599,6 +15587,9 @@ msgid "" "an index on it. Alternatively, you can define an index below, before " "creating the foreign key." msgstr "" +"Crear una clave foránea sobre una columna no indexada crearía " +"automáticamente un índice en ella. De manera alternativa, puede definir un " +"índice más abajo, antes de crear la clave foránea." #: templates/table/relation/common_form.phtml:20 msgid "" From 685b51d5d517fa69297617c18e0cb4c7caeb9482 Mon Sep 17 00:00:00 2001 From: jorge jansen abreu Date: Tue, 13 Dec 2016 09:25:27 +0000 Subject: [PATCH 15/16] Translated using Weblate (Spanish) Currently translated at 99.8% (3216 of 3222 strings) [CI skip] --- po/es.po | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/po/es.po b/po/es.po index e01be7c269..e7caf3b7ed 100644 --- a/po/es.po +++ b/po/es.po @@ -4,8 +4,8 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.6.5-dev\n" "Report-Msgid-Bugs-To: translators@phpmyadmin.net\n" "POT-Creation-Date: 2016-11-10 09:39+0100\n" -"PO-Revision-Date: 2016-12-13 09:24+0000\n" -"Last-Translator: Laura Arjona Reina \n" +"PO-Revision-Date: 2016-12-13 09:25+0000\n" +"Last-Translator: jorge jansen abreu \n" "Language-Team: Spanish " "\n" "Language: es\n" @@ -15875,10 +15875,8 @@ msgid "Description" msgstr "Descripción" #: url.php:41 -#, fuzzy -#| msgid "Taking you to next step…" msgid "Taking you to the target site." -msgstr "Llevándolo al siguiente paso…" +msgstr "Llevándolo a la página web destino." #: user_password.php:34 msgid "You don't have sufficient privileges to be here right now!" From 90e4325bcf57d2a7d4f8ae9b1ac96d370a4c7c97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 13 Dec 2016 10:27:42 +0100 Subject: [PATCH 16/16] Rewrite https in setup and messages handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The client side check is more reliable - Does not depend on server setup - Removed related inline javascript (see #12261) Signed-off-by: Michal Čihař --- setup/frames/index.inc.php | 35 ++++++++++++----------------------- setup/lib/index.lib.php | 17 ++++++----------- setup/scripts.js | 27 ++++++++++++++++----------- 3 files changed, 34 insertions(+), 45 deletions(-) diff --git a/setup/frames/index.inc.php b/setup/frames/index.inc.php index 370bf748a7..fca7a27291 100644 --- a/setup/frames/index.inc.php +++ b/setup/frames/index.inc.php @@ -66,30 +66,19 @@ if (!$config_writable || !$config_readable) { ); } // -// Check https connection +// Https connection warning (check done on the client side) // -$is_https = !empty($_SERVER['HTTPS']) - && mb_strtolower($_SERVER['HTTPS']) == 'on'; -if (!$is_https) { - $text = __( - 'You are not using a secure connection; all data (including potentially ' - . 'sensitive information, like passwords) is transferred unencrypted!' - ); - - $text .= ' '; - - // Temporary workaround to use tranlated message in older releases - $text .= str_replace( - array('[a@%s]', '[/a]'), - array('', ''), - __( - 'If your server is also configured to accept HTTPS requests ' - . 'follow [a@%s]this link[/a] to use a secure connection.' - ) - ); - $text .= ''; - PMA_messagesSet('notice', 'no_https', __('Insecure connection'), $text); -} +$text = __( + 'You are not using a secure connection; all data (including potentially ' + . 'sensitive information, like passwords) is transferred unencrypted!' +); +$text .= ' '; +$text .= __( + 'If your server is also configured to accept HTTPS requests ' + . 'follow this link to use a secure connection.' +); +$text .= ''; +PMA_messagesSet('notice', 'no_https', __('Insecure connection'), $text); echo '
'; diff --git a/setup/lib/index.lib.php b/setup/lib/index.lib.php index c4de5964a4..17451b597e 100644 --- a/setup/lib/index.lib.php +++ b/setup/lib/index.lib.php @@ -79,23 +79,18 @@ function PMA_messagesEnd() */ function PMA_messagesShowHtml() { - $old_ids = array(); foreach ($_SESSION['messages'] as $type => $messages) { foreach ($messages as $id => $msg) { - echo '
' + if (! $msg['fresh'] && $type != 'error') { + $extra = ' hiddenmessage'; + } else { + $extra = ''; + } + echo '
' , '

' , $msg['title'] , '

' , $msg['message'] , '
'; - if (!$msg['fresh'] && $type != 'error') { - $old_ids[] = $id; - } } } - - echo "\n" , '\n"; } /** diff --git a/setup/scripts.js b/setup/scripts.js index e912bec005..53c33bebbd 100644 --- a/setup/scripts.js +++ b/setup/scripts.js @@ -12,24 +12,29 @@ if (top != self) { // Messages // -// stores hidden message ids -var hiddenMessages = []; - $(function () { - var hidden = hiddenMessages.length; - for (var i = 0; i < hidden; i++) { - $('#' + hiddenMessages[i]).css('display', 'none'); + + if (window.location.protocol === 'https:') { + $('#no_https').remove(); + } else { + $('#no_https a').click(function () { + var old_location = window.location; + window.location.href = 'https:' + old_location.href.substring(old_location.protocol.length); + return false; + }); } - if (hidden > 0) { + + var hiddenmessages = $('.hiddenmessage'); + + if (hiddenmessages.length > 0) { + hiddenmessages.hide(); var link = $('#show_hidden_messages'); link.click(function (e) { e.preventDefault(); - for (var i = 0; i < hidden; i++) { - $('#' + hiddenMessages[i]).show(500); - } + hiddenmessages.show(); $(this).remove(); }); - link.html(link.html().replace('#MSG_COUNT', hidden)); + link.html(link.html().replace('#MSG_COUNT', hiddenmessages.length)); link.css('display', ''); } });