Merge lp:~julian-ladisch/ubuntu/wily/phpmyadmin/4.4.15.1-1 into lp:ubuntu/wily/phpmyadmin

Proposed by Julian Ladisch
Status: Needs review
Proposed branch: lp:~julian-ladisch/ubuntu/wily/phpmyadmin/4.4.15.1-1
Merge into: lp:ubuntu/wily/phpmyadmin
Diff against target: 8583 lines (+2921/-2024)
71 files modified
.pc/setup-message.patch/setup/frames/index.inc.php (+1/-0)
ChangeLog (+32/-0)
README (+1/-1)
RELEASE-DATE-4.4.13.1 (+0/-1)
RELEASE-DATE-4.4.15.1 (+1/-0)
debian/changelog (+15/-0)
debian/patches/setup-message.patch (+5/-3)
doc/conf.py (+1/-1)
doc/html/.buildinfo (+1/-1)
doc/html/_sources/require.txt (+1/-1)
doc/html/config.html (+5/-5)
doc/html/copyright.html (+5/-5)
doc/html/credits.html (+5/-5)
doc/html/developers.html (+5/-5)
doc/html/faq.html (+5/-5)
doc/html/genindex.html (+5/-5)
doc/html/glossary.html (+5/-5)
doc/html/import_export.html (+5/-5)
doc/html/index.html (+5/-5)
doc/html/intro.html (+5/-5)
doc/html/other.html (+5/-5)
doc/html/privileges.html (+5/-5)
doc/html/require.html (+6/-6)
doc/html/search.html (+5/-5)
doc/html/setup.html (+5/-5)
doc/html/transformations.html (+5/-5)
doc/html/user.html (+5/-5)
doc/html/vendors.html (+5/-5)
doc/require.rst (+1/-1)
import.php (+1/-1)
js/functions.js (+2/-1)
js/line_counts.php (+10/-10)
js/pmd/move.js (+6/-5)
js/tbl_operations.js (+4/-1)
libraries/Config.class.php (+1/-1)
libraries/DatabaseInterface.class.php (+34/-32)
libraries/DisplayResults.class.php (+3/-1)
libraries/Scripts.class.php (+10/-5)
libraries/Util.class.php (+4/-153)
libraries/VersionInformation.php (+270/-0)
libraries/config/messages.inc.php (+1/-0)
libraries/dbi/DBIDummy.class.php (+6/-2)
libraries/language_stats.inc.php (+9/-9)
libraries/phpseclib/Crypt/AES.php (+74/-130)
libraries/phpseclib/Crypt/Base.php (+913/-400)
libraries/phpseclib/Crypt/Random.php (+60/-81)
libraries/phpseclib/Crypt/Rijndael.php (+347/-680)
libraries/phpseclib/LICENSE (+21/-0)
libraries/plugins/auth/AuthenticationCookie.class.php (+18/-41)
libraries/plugins/auth/recaptcha/ReCaptcha/ReCaptcha.php (+97/-0)
libraries/plugins/auth/recaptcha/ReCaptcha/RequestMethod.php (+42/-0)
libraries/plugins/auth/recaptcha/ReCaptcha/RequestMethod/Post.php (+70/-0)
libraries/plugins/auth/recaptcha/ReCaptcha/RequestMethod/Socket.php (+104/-0)
libraries/plugins/auth/recaptcha/ReCaptcha/RequestMethod/SocketPost.php (+120/-0)
libraries/plugins/auth/recaptcha/ReCaptcha/RequestParameters.php (+103/-0)
libraries/plugins/auth/recaptcha/ReCaptcha/Response.php (+102/-0)
libraries/plugins/auth/recaptcha/autoload.php (+38/-0)
libraries/plugins/auth/recaptcha/recaptchalib.php (+0/-140)
libraries/plugins/import/ImportSql.class.php (+1/-1)
libraries/rte/rte_routines.lib.php (+5/-0)
libraries/server_privileges.lib.php (+1/-1)
libraries/structure.lib.php (+6/-3)
libraries/tbl_relation.lib.php (+8/-6)
setup/frames/index.inc.php (+1/-0)
setup/lib/index.lib.php (+12/-5)
tbl_replace.php (+1/-1)
tbl_row_action.php (+10/-0)
themes/original/sprites.lib.php (+114/-99)
themes/pmahomme/sprites.lib.php (+125/-110)
url.php (+2/-1)
version_check.php (+15/-4)
To merge this branch: bzr merge lp:~julian-ladisch/ubuntu/wily/phpmyadmin/4.4.15.1-1
Reviewer Review Type Date Requested Status
Marc Deslauriers Needs Fixing
Review via email: mp+275897@code.launchpad.net

Commit message

New upstream release 4.4.15.1 fixing CVE-2015-6830 and CVE-2015-7873

Description of the change

* New upstream release.
* Security Update: Vulnerability that allows bypassing the reCaptcha test
  - CVE-2015-6830
  - https://www.phpmyadmin.net/security/PMASA-2015-4/
  - LP: #1510525
* Security Update: Content spoofing vulnerability when
  redirecting user to an external site
  - CVE-2015-7873
  - https://www.phpmyadmin.net/security/PMASA-2015-5/
  - LP: #1510521

To post a comment you must log in.
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Since the package referred to in this bug is in universe or multiverse, it is community maintained. I see that you have attached patches to update the Ubuntu packages to the new upstream version. While this work is appreciated, we cannot publish your patches because this does not follow Ubuntu's policy of backporting security patches. If you are able, perhaps you could prepare debdiffs to fix this by following https://wiki.ubuntu.com/SecurityUpdateProcedures.

review: Needs Fixing

Unmerged revisions

127. By Julian Ladisch

new upstream version; CVE-2015-6830; CVE-2015-7873

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.pc/setup-message.patch/setup/frames/index.inc.php'
--- .pc/setup-message.patch/setup/frames/index.inc.php 2015-07-07 10:25:56 +0000
+++ .pc/setup-message.patch/setup/frames/index.inc.php 2015-10-27 17:36:50 +0000
@@ -16,6 +16,7 @@
16require_once './libraries/display_select_lang.lib.php';16require_once './libraries/display_select_lang.lib.php';
17require_once './libraries/config/FormDisplay.class.php';17require_once './libraries/config/FormDisplay.class.php';
18require_once './libraries/config/ServerConfigChecks.class.php';18require_once './libraries/config/ServerConfigChecks.class.php';
19require_once './libraries/VersionInformation.php';
19require_once './setup/lib/index.lib.php';20require_once './setup/lib/index.lib.php';
2021
21// prepare unfiltered language list22// prepare unfiltered language list
2223
=== modified file 'ChangeLog'
--- ChangeLog 2015-08-10 10:02:56 +0000
+++ ChangeLog 2015-10-27 17:36:50 +0000
@@ -1,6 +1,38 @@
1phpMyAdmin - ChangeLog1phpMyAdmin - ChangeLog
2======================2======================
33
44.4.15.1 (2015-10-23)
5- issue #11464 phpMyAdmin suggests upgrading to newer version not usable on that system
6- issue [security] Content spoofing on url.php
7
84.4.15.0 (2015-09-20)
9- issue #11411 Undefined "replace" function on numeric scalar
10- issue #11421 Stored-proc / routine - broken parameter parsing
11- issue Missing name for configuration read_as_multibytes
12- issue #11431 Incorrect "No row selected" message
13- issue #11447 MySQL 5.5 and the language system variable
14- issue #11452 Semantics of export and import icons are mixed up
15- issue #11451 Designer-Bug in move.js on multiple server configuration
16- issue #11458 Invalid UTF-8 sequence in argument
17- issue #11457 Request URI too large
18- issue Invalid argument supplied for foreach()
19- issue #11461 Foreign key constraints for InnoDB tables with upper-case letters disabled
20- issue #11487 Warning when entering Query page
21
224.4.14.1 (2015-09-08)
23- issue [security] reCaptcha bypass
24
254.4.14.0 (2015-08-20)
26- issue #11367 Export after search, missing WHERE clause
27- issue #11380 Incomplete message after import
28- issue Incorrect scalar type declaration (reported under PHP 7)
29- issue #11389 ReCaptcha produces deprecated messages under PHP 7
30- issue #11387 phpseclib < 2.0 produces deprecated messages on PHP 7
31- issue #11404 "Switch to copied table" doesn't work
32- issue #11406 Missing quotes after calling "distinct values"
33- issue #11386 Cannot import database with long data in one column
34- issue #11410 SPATIAL index option is not clickable
35
44.4.13.1 (2015-08-08)364.4.13.1 (2015-08-08)
5- issue #11368 SQL error when importing phpMyAdmin dump file37- issue #11368 SQL error when importing phpMyAdmin dump file
638
739
=== modified file 'README'
--- README 2015-08-10 10:02:56 +0000
+++ README 2015-10-27 17:36:50 +0000
@@ -1,7 +1,7 @@
1phpMyAdmin - Readme1phpMyAdmin - Readme
2===================2===================
33
4Version 4.4.13.14Version 4.4.15.1
55
6A set of PHP-scripts to manage MySQL over the web.6A set of PHP-scripts to manage MySQL over the web.
77
88
=== removed file 'RELEASE-DATE-4.4.13.1'
--- RELEASE-DATE-4.4.13.1 2015-08-10 10:02:56 +0000
+++ RELEASE-DATE-4.4.13.1 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
1Sat Aug 8 16:22:16 UTC 2015
20
=== added file 'RELEASE-DATE-4.4.15.1'
--- RELEASE-DATE-4.4.15.1 1970-01-01 00:00:00 +0000
+++ RELEASE-DATE-4.4.15.1 2015-10-27 17:36:50 +0000
@@ -0,0 +1,1 @@
1Fri Oct 23 11:29:01 UTC 2015
02
=== modified file 'debian/changelog'
--- debian/changelog 2015-08-10 10:02:56 +0000
+++ debian/changelog 2015-10-27 17:36:50 +0000
@@ -1,3 +1,18 @@
1phpmyadmin (4:4.4.15.1-1) unstable; urgency=medium
2
3 * New upstream release.
4 * Security Update: Vulnerability that allows bypassing the reCaptcha test
5 - CVE-2015-6830
6 - https://www.phpmyadmin.net/security/PMASA-2015-4/
7 - LP: #1510525
8 * Security Update: Content spoofing vulnerability when
9 redirecting user to an external site
10 - CVE-2015-7873
11 - https://www.phpmyadmin.net/security/PMASA-2015-5/
12 - LP: #1510521
13
14 -- Julian Ladisch <launchpad.net-hpe@ladisch.de> Tue, 27 Oct 2015 18:14:40 +0100
15
1phpmyadmin (4:4.4.13.1-1) unstable; urgency=medium16phpmyadmin (4:4.4.13.1-1) unstable; urgency=medium
217
3 * New upstream release.18 * New upstream release.
419
=== modified file 'debian/patches/setup-message.patch'
--- debian/patches/setup-message.patch 2015-05-05 13:48:55 +0000
+++ debian/patches/setup-message.patch 2015-10-27 17:36:50 +0000
@@ -2,9 +2,11 @@
2From: Michal Čihař <nijel@debian.org>2From: Michal Čihař <nijel@debian.org>
3Forwarded: not-needed3Forwarded: not-needed
44
5--- a/setup/frames/index.inc.php5Index: phpmyadmin/setup/frames/index.inc.php
6+++ b/setup/frames/index.inc.php6===================================================================
7@@ -119,9 +119,7 @@7--- phpmyadmin.orig/setup/frames/index.inc.php 2015-10-27 18:16:26.694967720 +0100
8+++ phpmyadmin/setup/frames/index.inc.php 2015-10-27 18:16:26.694967720 +0100
9@@ -120,9 +120,7 @@
8 'notice', uniqid('config_saved'), __('Configuration saved.'),10 'notice', uniqid('config_saved'), __('Configuration saved.'),
9 PMA_sanitize(11 PMA_sanitize(
10 __(12 __(
1113
=== modified file 'doc/conf.py'
--- doc/conf.py 2015-08-10 10:02:56 +0000
+++ doc/conf.py 2015-10-27 17:36:50 +0000
@@ -51,7 +51,7 @@
51# built documents.51# built documents.
52#52#
53# The short X.Y version.53# The short X.Y version.
54version = '4.4.13.1'54version = '4.4.15.1'
55# The full version, including alpha/beta/rc tags.55# The full version, including alpha/beta/rc tags.
56release = version56release = version
5757
5858
=== modified file 'doc/doctrees/config.doctree'
59Binary files doc/doctrees/config.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/config.doctree 2015-10-27 17:36:50 +0000 differ59Binary files doc/doctrees/config.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/config.doctree 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/doctrees/copyright.doctree'
60Binary files doc/doctrees/copyright.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/copyright.doctree 2015-10-27 17:36:50 +0000 differ60Binary files doc/doctrees/copyright.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/copyright.doctree 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/doctrees/credits.doctree'
61Binary files doc/doctrees/credits.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/credits.doctree 2015-10-27 17:36:50 +0000 differ61Binary files doc/doctrees/credits.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/credits.doctree 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/doctrees/developers.doctree'
62Binary files doc/doctrees/developers.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/developers.doctree 2015-10-27 17:36:50 +0000 differ62Binary files doc/doctrees/developers.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/developers.doctree 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/doctrees/environment.pickle'
63Binary files doc/doctrees/environment.pickle 2015-08-10 10:02:56 +0000 and doc/doctrees/environment.pickle 2015-10-27 17:36:50 +0000 differ63Binary files doc/doctrees/environment.pickle 2015-08-10 10:02:56 +0000 and doc/doctrees/environment.pickle 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/doctrees/faq.doctree'
64Binary files doc/doctrees/faq.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/faq.doctree 2015-10-27 17:36:50 +0000 differ64Binary files doc/doctrees/faq.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/faq.doctree 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/doctrees/glossary.doctree'
65Binary files doc/doctrees/glossary.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/glossary.doctree 2015-10-27 17:36:50 +0000 differ65Binary files doc/doctrees/glossary.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/glossary.doctree 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/doctrees/import_export.doctree'
66Binary files doc/doctrees/import_export.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/import_export.doctree 2015-10-27 17:36:50 +0000 differ66Binary files doc/doctrees/import_export.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/import_export.doctree 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/doctrees/index.doctree'
67Binary files doc/doctrees/index.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/index.doctree 2015-10-27 17:36:50 +0000 differ67Binary files doc/doctrees/index.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/index.doctree 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/doctrees/intro.doctree'
68Binary files doc/doctrees/intro.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/intro.doctree 2015-10-27 17:36:50 +0000 differ68Binary files doc/doctrees/intro.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/intro.doctree 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/doctrees/other.doctree'
69Binary files doc/doctrees/other.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/other.doctree 2015-10-27 17:36:50 +0000 differ69Binary files doc/doctrees/other.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/other.doctree 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/doctrees/privileges.doctree'
70Binary files doc/doctrees/privileges.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/privileges.doctree 2015-10-27 17:36:50 +0000 differ70Binary files doc/doctrees/privileges.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/privileges.doctree 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/doctrees/require.doctree'
71Binary files doc/doctrees/require.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/require.doctree 2015-10-27 17:36:50 +0000 differ71Binary files doc/doctrees/require.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/require.doctree 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/doctrees/setup.doctree'
72Binary files doc/doctrees/setup.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/setup.doctree 2015-10-27 17:36:50 +0000 differ72Binary files doc/doctrees/setup.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/setup.doctree 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/doctrees/transformations.doctree'
73Binary files doc/doctrees/transformations.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/transformations.doctree 2015-10-27 17:36:50 +0000 differ73Binary files doc/doctrees/transformations.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/transformations.doctree 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/doctrees/user.doctree'
74Binary files doc/doctrees/user.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/user.doctree 2015-10-27 17:36:50 +0000 differ74Binary files doc/doctrees/user.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/user.doctree 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/doctrees/vendors.doctree'
75Binary files doc/doctrees/vendors.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/vendors.doctree 2015-10-27 17:36:50 +0000 differ75Binary files doc/doctrees/vendors.doctree 2015-08-10 10:02:56 +0000 and doc/doctrees/vendors.doctree 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/html/.buildinfo'
--- doc/html/.buildinfo 2015-08-10 10:02:56 +0000
+++ doc/html/.buildinfo 2015-10-27 17:36:50 +0000
@@ -1,4 +1,4 @@
1# Sphinx build info version 11# Sphinx build info version 1
2# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.2# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3config: cca84bdc9e3e4dabe9e534d2ceab6a203config: 48132e5c8669af439ab5d63e8a0e08cb
4tags: 645f666f9bcd5a90fca523b33c5a78b74tags: 645f666f9bcd5a90fca523b33c5a78b7
55
=== modified file 'doc/html/_sources/require.txt'
--- doc/html/_sources/require.txt 2015-05-28 15:02:54 +0000
+++ doc/html/_sources/require.txt 2015-10-27 17:36:50 +0000
@@ -12,7 +12,7 @@
12PHP12PHP
13---13---
1414
15* You need PHP 5.3.0 or newer, with ``session`` support, the Standard PHP Library15* You need PHP 5.3.7 or newer, with ``session`` support, the Standard PHP Library
16 (SPL) extension, JSON support, and the ``mbstring`` extension.16 (SPL) extension, JSON support, and the ``mbstring`` extension.
1717
18* To support uploading of ZIP files, you need the PHP ``zip`` extension.18* To support uploading of ZIP files, you need the PHP ``zip`` extension.
1919
=== modified file 'doc/html/config.html'
--- doc/html/config.html 2015-08-10 10:02:56 +0000
+++ doc/html/config.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>Configuration &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>Configuration &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -24,7 +24,7 @@
24 <script type="text/javascript" src="_static/underscore.js"></script>24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="copyright" title="Copyright" href="copyright.html" />26 <link rel="copyright" title="Copyright" href="copyright.html" />
27 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" />27 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
28 <link rel="next" title="User Guide" href="user.html" />28 <link rel="next" title="User Guide" href="user.html" />
29 <link rel="prev" title="Installation" href="setup.html" /> 29 <link rel="prev" title="Installation" href="setup.html" />
30 </head>30 </head>
@@ -41,7 +41,7 @@
41 <li class="right" >41 <li class="right" >
42 <a href="setup.html" title="Installation"42 <a href="setup.html" title="Installation"
43 accesskey="P">previous</a> |</li>43 accesskey="P">previous</a> |</li>
44 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 44 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
45 </ul>45 </ul>
46 </div> 46 </div>
4747
@@ -4992,7 +4992,7 @@
4992 <li class="right" >4992 <li class="right" >
4993 <a href="setup.html" title="Installation"4993 <a href="setup.html" title="Installation"
4994 >previous</a> |</li>4994 >previous</a> |</li>
4995 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 4995 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
4996 </ul>4996 </ul>
4997 </div>4997 </div>
4998 <div class="footer">4998 <div class="footer">
49994999
=== modified file 'doc/html/copyright.html'
--- doc/html/copyright.html 2015-08-10 10:02:56 +0000
+++ doc/html/copyright.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>Copyright &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>Copyright &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -24,7 +24,7 @@
24 <script type="text/javascript" src="_static/underscore.js"></script>24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="copyright" title="Copyright" href="#" />26 <link rel="copyright" title="Copyright" href="#" />
27 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" />27 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
28 <link rel="next" title="Credits" href="credits.html" />28 <link rel="next" title="Credits" href="credits.html" />
29 <link rel="prev" title="Distributing and packaging phpMyAdmin" href="vendors.html" /> 29 <link rel="prev" title="Distributing and packaging phpMyAdmin" href="vendors.html" />
30 </head>30 </head>
@@ -41,7 +41,7 @@
41 <li class="right" >41 <li class="right" >
42 <a href="vendors.html" title="Distributing and packaging phpMyAdmin"42 <a href="vendors.html" title="Distributing and packaging phpMyAdmin"
43 accesskey="P">previous</a> |</li>43 accesskey="P">previous</a> |</li>
44 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 44 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
45 </ul>45 </ul>
46 </div> 46 </div>
4747
@@ -144,7 +144,7 @@
144 <li class="right" >144 <li class="right" >
145 <a href="vendors.html" title="Distributing and packaging phpMyAdmin"145 <a href="vendors.html" title="Distributing and packaging phpMyAdmin"
146 >previous</a> |</li>146 >previous</a> |</li>
147 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 147 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
148 </ul>148 </ul>
149 </div>149 </div>
150 <div class="footer">150 <div class="footer">
151151
=== modified file 'doc/html/credits.html'
--- doc/html/credits.html 2015-08-10 10:02:56 +0000
+++ doc/html/credits.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>Credits &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>Credits &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -24,7 +24,7 @@
24 <script type="text/javascript" src="_static/underscore.js"></script>24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="copyright" title="Copyright" href="copyright.html" />26 <link rel="copyright" title="Copyright" href="copyright.html" />
27 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" />27 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
28 <link rel="next" title="Glossary" href="glossary.html" />28 <link rel="next" title="Glossary" href="glossary.html" />
29 <link rel="prev" title="Copyright" href="copyright.html" /> 29 <link rel="prev" title="Copyright" href="copyright.html" />
30 </head>30 </head>
@@ -41,7 +41,7 @@
41 <li class="right" >41 <li class="right" >
42 <a href="copyright.html" title="Copyright"42 <a href="copyright.html" title="Copyright"
43 accesskey="P">previous</a> |</li>43 accesskey="P">previous</a> |</li>
44 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 44 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
45 </ul>45 </ul>
46 </div> 46 </div>
4747
@@ -701,7 +701,7 @@
701 <li class="right" >701 <li class="right" >
702 <a href="copyright.html" title="Copyright"702 <a href="copyright.html" title="Copyright"
703 >previous</a> |</li>703 >previous</a> |</li>
704 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 704 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
705 </ul>705 </ul>
706 </div>706 </div>
707 <div class="footer">707 <div class="footer">
708708
=== modified file 'doc/html/developers.html'
--- doc/html/developers.html 2015-08-10 10:02:56 +0000
+++ doc/html/developers.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>Developers Information &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>Developers Information &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -24,7 +24,7 @@
24 <script type="text/javascript" src="_static/underscore.js"></script>24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="copyright" title="Copyright" href="copyright.html" />26 <link rel="copyright" title="Copyright" href="copyright.html" />
27 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" />27 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
28 <link rel="next" title="Distributing and packaging phpMyAdmin" href="vendors.html" />28 <link rel="next" title="Distributing and packaging phpMyAdmin" href="vendors.html" />
29 <link rel="prev" title="FAQ - Frequently Asked Questions" href="faq.html" /> 29 <link rel="prev" title="FAQ - Frequently Asked Questions" href="faq.html" />
30 </head>30 </head>
@@ -41,7 +41,7 @@
41 <li class="right" >41 <li class="right" >
42 <a href="faq.html" title="FAQ - Frequently Asked Questions"42 <a href="faq.html" title="FAQ - Frequently Asked Questions"
43 accesskey="P">previous</a> |</li>43 accesskey="P">previous</a> |</li>
44 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 44 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
45 </ul>45 </ul>
46 </div> 46 </div>
4747
@@ -105,7 +105,7 @@
105 <li class="right" >105 <li class="right" >
106 <a href="faq.html" title="FAQ - Frequently Asked Questions"106 <a href="faq.html" title="FAQ - Frequently Asked Questions"
107 >previous</a> |</li>107 >previous</a> |</li>
108 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 108 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
109 </ul>109 </ul>
110 </div>110 </div>
111 <div class="footer">111 <div class="footer">
112112
=== modified file 'doc/html/faq.html'
--- doc/html/faq.html 2015-08-10 10:02:56 +0000
+++ doc/html/faq.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>FAQ - Frequently Asked Questions &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>FAQ - Frequently Asked Questions &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -24,7 +24,7 @@
24 <script type="text/javascript" src="_static/underscore.js"></script>24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="copyright" title="Copyright" href="copyright.html" />26 <link rel="copyright" title="Copyright" href="copyright.html" />
27 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" />27 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
28 <link rel="next" title="Developers Information" href="developers.html" />28 <link rel="next" title="Developers Information" href="developers.html" />
29 <link rel="prev" title="Import and export" href="import_export.html" /> 29 <link rel="prev" title="Import and export" href="import_export.html" />
30 </head>30 </head>
@@ -41,7 +41,7 @@
41 <li class="right" >41 <li class="right" >
42 <a href="import_export.html" title="Import and export"42 <a href="import_export.html" title="Import and export"
43 accesskey="P">previous</a> |</li>43 accesskey="P">previous</a> |</li>
44 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 44 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
45 </ul>45 </ul>
46 </div> 46 </div>
4747
@@ -1850,7 +1850,7 @@
1850 <li class="right" >1850 <li class="right" >
1851 <a href="import_export.html" title="Import and export"1851 <a href="import_export.html" title="Import and export"
1852 >previous</a> |</li>1852 >previous</a> |</li>
1853 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 1853 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
1854 </ul>1854 </ul>
1855 </div>1855 </div>
1856 <div class="footer">1856 <div class="footer">
18571857
=== modified file 'doc/html/genindex.html'
--- doc/html/genindex.html 2015-08-10 10:02:56 +0000
+++ doc/html/genindex.html 2015-10-27 17:36:50 +0000
@@ -7,7 +7,7 @@
7 <head>7 <head>
8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9 9
10 <title>Index &mdash; phpMyAdmin 4.4.13.1 documentation</title>10 <title>Index &mdash; phpMyAdmin 4.4.15.1 documentation</title>
11 11
12 <link rel="stylesheet" href="_static/default.css" type="text/css" />12 <link rel="stylesheet" href="_static/default.css" type="text/css" />
13 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />13 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -15,7 +15,7 @@
15 <script type="text/javascript">15 <script type="text/javascript">
16 var DOCUMENTATION_OPTIONS = {16 var DOCUMENTATION_OPTIONS = {
17 URL_ROOT: './',17 URL_ROOT: './',
18 VERSION: '4.4.13.1',18 VERSION: '4.4.15.1',
19 COLLAPSE_INDEX: false,19 COLLAPSE_INDEX: false,
20 FILE_SUFFIX: '.html',20 FILE_SUFFIX: '.html',
21 HAS_SOURCE: true21 HAS_SOURCE: true
@@ -25,7 +25,7 @@
25 <script type="text/javascript" src="_static/underscore.js"></script>25 <script type="text/javascript" src="_static/underscore.js"></script>
26 <script type="text/javascript" src="_static/doctools.js"></script>26 <script type="text/javascript" src="_static/doctools.js"></script>
27 <link rel="copyright" title="Copyright" href="copyright.html" />27 <link rel="copyright" title="Copyright" href="copyright.html" />
28 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" /> 28 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
29 </head>29 </head>
30 <body>30 <body>
31 <div class="related">31 <div class="related">
@@ -34,7 +34,7 @@
34 <li class="right" style="margin-right: 10px">34 <li class="right" style="margin-right: 10px">
35 <a href="#" title="General Index"35 <a href="#" title="General Index"
36 accesskey="I">index</a></li>36 accesskey="I">index</a></li>
37 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 37 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
38 </ul>38 </ul>
39 </div> 39 </div>
4040
@@ -3793,7 +3793,7 @@
3793 <li class="right" style="margin-right: 10px">3793 <li class="right" style="margin-right: 10px">
3794 <a href="#" title="General Index"3794 <a href="#" title="General Index"
3795 >index</a></li>3795 >index</a></li>
3796 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 3796 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
3797 </ul>3797 </ul>
3798 </div>3798 </div>
3799 <div class="footer">3799 <div class="footer">
38003800
=== modified file 'doc/html/glossary.html'
--- doc/html/glossary.html 2015-08-10 10:02:56 +0000
+++ doc/html/glossary.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>Glossary &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>Glossary &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -24,7 +24,7 @@
24 <script type="text/javascript" src="_static/underscore.js"></script>24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="copyright" title="Copyright" href="copyright.html" />26 <link rel="copyright" title="Copyright" href="copyright.html" />
27 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" />27 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
28 <link rel="prev" title="Credits" href="credits.html" /> 28 <link rel="prev" title="Credits" href="credits.html" />
29 </head>29 </head>
30 <body>30 <body>
@@ -37,7 +37,7 @@
37 <li class="right" >37 <li class="right" >
38 <a href="credits.html" title="Credits"38 <a href="credits.html" title="Credits"
39 accesskey="P">previous</a> |</li>39 accesskey="P">previous</a> |</li>
40 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 40 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
41 </ul>41 </ul>
42 </div> 42 </div>
4343
@@ -605,7 +605,7 @@
605 <li class="right" >605 <li class="right" >
606 <a href="credits.html" title="Credits"606 <a href="credits.html" title="Credits"
607 >previous</a> |</li>607 >previous</a> |</li>
608 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 608 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
609 </ul>609 </ul>
610 </div>610 </div>
611 <div class="footer">611 <div class="footer">
612612
=== modified file 'doc/html/import_export.html'
--- doc/html/import_export.html 2015-08-10 10:02:56 +0000
+++ doc/html/import_export.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>Import and export &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>Import and export &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -24,7 +24,7 @@
24 <script type="text/javascript" src="_static/underscore.js"></script>24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="copyright" title="Copyright" href="copyright.html" />26 <link rel="copyright" title="Copyright" href="copyright.html" />
27 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" />27 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
28 <link rel="up" title="User Guide" href="user.html" />28 <link rel="up" title="User Guide" href="user.html" />
29 <link rel="next" title="FAQ - Frequently Asked Questions" href="faq.html" />29 <link rel="next" title="FAQ - Frequently Asked Questions" href="faq.html" />
30 <link rel="prev" title="Other sources of information" href="other.html" /> 30 <link rel="prev" title="Other sources of information" href="other.html" />
@@ -42,7 +42,7 @@
42 <li class="right" >42 <li class="right" >
43 <a href="other.html" title="Other sources of information"43 <a href="other.html" title="Other sources of information"
44 accesskey="P">previous</a> |</li>44 accesskey="P">previous</a> |</li>
45 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li>45 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
46 <li><a href="user.html" accesskey="U">User Guide</a> &raquo;</li> 46 <li><a href="user.html" accesskey="U">User Guide</a> &raquo;</li>
47 </ul>47 </ul>
48 </div> 48 </div>
@@ -134,7 +134,7 @@
134 <li class="right" >134 <li class="right" >
135 <a href="other.html" title="Other sources of information"135 <a href="other.html" title="Other sources of information"
136 >previous</a> |</li>136 >previous</a> |</li>
137 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li>137 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
138 <li><a href="user.html" >User Guide</a> &raquo;</li> 138 <li><a href="user.html" >User Guide</a> &raquo;</li>
139 </ul>139 </ul>
140 </div>140 </div>
141141
=== modified file 'doc/html/index.html'
--- doc/html/index.html 2015-08-10 10:02:56 +0000
+++ doc/html/index.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>Welcome to phpMyAdmin’s documentation! &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>Welcome to phpMyAdmin’s documentation! &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -24,7 +24,7 @@
24 <script type="text/javascript" src="_static/underscore.js"></script>24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="copyright" title="Copyright" href="copyright.html" />26 <link rel="copyright" title="Copyright" href="copyright.html" />
27 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="#" />27 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="#" />
28 <link rel="next" title="Introduction" href="intro.html" /> 28 <link rel="next" title="Introduction" href="intro.html" />
29 </head>29 </head>
30 <body>30 <body>
@@ -37,7 +37,7 @@
37 <li class="right" >37 <li class="right" >
38 <a href="intro.html" title="Introduction"38 <a href="intro.html" title="Introduction"
39 accesskey="N">next</a> |</li>39 accesskey="N">next</a> |</li>
40 <li><a href="#">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 40 <li><a href="#">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
41 </ul>41 </ul>
42 </div> 42 </div>
4343
@@ -195,7 +195,7 @@
195 <li class="right" >195 <li class="right" >
196 <a href="intro.html" title="Introduction"196 <a href="intro.html" title="Introduction"
197 >next</a> |</li>197 >next</a> |</li>
198 <li><a href="#">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 198 <li><a href="#">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
199 </ul>199 </ul>
200 </div>200 </div>
201 <div class="footer">201 <div class="footer">
202202
=== modified file 'doc/html/intro.html'
--- doc/html/intro.html 2015-08-10 10:02:56 +0000
+++ doc/html/intro.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>Introduction &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>Introduction &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -24,7 +24,7 @@
24 <script type="text/javascript" src="_static/underscore.js"></script>24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="copyright" title="Copyright" href="copyright.html" />26 <link rel="copyright" title="Copyright" href="copyright.html" />
27 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" />27 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
28 <link rel="next" title="Requirements" href="require.html" />28 <link rel="next" title="Requirements" href="require.html" />
29 <link rel="prev" title="Welcome to phpMyAdmin’s documentation!" href="index.html" /> 29 <link rel="prev" title="Welcome to phpMyAdmin’s documentation!" href="index.html" />
30 </head>30 </head>
@@ -41,7 +41,7 @@
41 <li class="right" >41 <li class="right" >
42 <a href="index.html" title="Welcome to phpMyAdmin’s documentation!"42 <a href="index.html" title="Welcome to phpMyAdmin’s documentation!"
43 accesskey="P">previous</a> |</li>43 accesskey="P">previous</a> |</li>
44 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 44 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
45 </ul>45 </ul>
46 </div> 46 </div>
4747
@@ -169,7 +169,7 @@
169 <li class="right" >169 <li class="right" >
170 <a href="index.html" title="Welcome to phpMyAdmin’s documentation!"170 <a href="index.html" title="Welcome to phpMyAdmin’s documentation!"
171 >previous</a> |</li>171 >previous</a> |</li>
172 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 172 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
173 </ul>173 </ul>
174 </div>174 </div>
175 <div class="footer">175 <div class="footer">
176176
=== modified file 'doc/html/objects.inv'
177Binary files doc/html/objects.inv 2015-08-10 10:02:56 +0000 and doc/html/objects.inv 2015-10-27 17:36:50 +0000 differ177Binary files doc/html/objects.inv 2015-08-10 10:02:56 +0000 and doc/html/objects.inv 2015-10-27 17:36:50 +0000 differ
=== modified file 'doc/html/other.html'
--- doc/html/other.html 2015-08-10 10:02:56 +0000
+++ doc/html/other.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>Other sources of information &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>Other sources of information &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -24,7 +24,7 @@
24 <script type="text/javascript" src="_static/underscore.js"></script>24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="copyright" title="Copyright" href="copyright.html" />26 <link rel="copyright" title="Copyright" href="copyright.html" />
27 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" />27 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
28 <link rel="up" title="User Guide" href="user.html" />28 <link rel="up" title="User Guide" href="user.html" />
29 <link rel="next" title="Import and export" href="import_export.html" />29 <link rel="next" title="Import and export" href="import_export.html" />
30 <link rel="prev" title="User management" href="privileges.html" /> 30 <link rel="prev" title="User management" href="privileges.html" />
@@ -42,7 +42,7 @@
42 <li class="right" >42 <li class="right" >
43 <a href="privileges.html" title="User management"43 <a href="privileges.html" title="User management"
44 accesskey="P">previous</a> |</li>44 accesskey="P">previous</a> |</li>
45 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li>45 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
46 <li><a href="user.html" accesskey="U">User Guide</a> &raquo;</li> 46 <li><a href="user.html" accesskey="U">User Guide</a> &raquo;</li>
47 </ul>47 </ul>
48 </div> 48 </div>
@@ -121,7 +121,7 @@
121 <li class="right" >121 <li class="right" >
122 <a href="privileges.html" title="User management"122 <a href="privileges.html" title="User management"
123 >previous</a> |</li>123 >previous</a> |</li>
124 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li>124 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
125 <li><a href="user.html" >User Guide</a> &raquo;</li> 125 <li><a href="user.html" >User Guide</a> &raquo;</li>
126 </ul>126 </ul>
127 </div>127 </div>
128128
=== modified file 'doc/html/privileges.html'
--- doc/html/privileges.html 2015-08-10 10:02:56 +0000
+++ doc/html/privileges.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>User management &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>User management &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -24,7 +24,7 @@
24 <script type="text/javascript" src="_static/underscore.js"></script>24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="copyright" title="Copyright" href="copyright.html" />26 <link rel="copyright" title="Copyright" href="copyright.html" />
27 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" />27 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
28 <link rel="up" title="User Guide" href="user.html" />28 <link rel="up" title="User Guide" href="user.html" />
29 <link rel="next" title="Other sources of information" href="other.html" />29 <link rel="next" title="Other sources of information" href="other.html" />
30 <link rel="prev" title="Transformations" href="transformations.html" /> 30 <link rel="prev" title="Transformations" href="transformations.html" />
@@ -42,7 +42,7 @@
42 <li class="right" >42 <li class="right" >
43 <a href="transformations.html" title="Transformations"43 <a href="transformations.html" title="Transformations"
44 accesskey="P">previous</a> |</li>44 accesskey="P">previous</a> |</li>
45 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li>45 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
46 <li><a href="user.html" accesskey="U">User Guide</a> &raquo;</li> 46 <li><a href="user.html" accesskey="U">User Guide</a> &raquo;</li>
47 </ul>47 </ul>
48 </div> 48 </div>
@@ -155,7 +155,7 @@
155 <li class="right" >155 <li class="right" >
156 <a href="transformations.html" title="Transformations"156 <a href="transformations.html" title="Transformations"
157 >previous</a> |</li>157 >previous</a> |</li>
158 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li>158 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
159 <li><a href="user.html" >User Guide</a> &raquo;</li> 159 <li><a href="user.html" >User Guide</a> &raquo;</li>
160 </ul>160 </ul>
161 </div>161 </div>
162162
=== modified file 'doc/html/require.html'
--- doc/html/require.html 2015-08-10 10:02:56 +0000
+++ doc/html/require.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>Requirements &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>Requirements &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -24,7 +24,7 @@
24 <script type="text/javascript" src="_static/underscore.js"></script>24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="copyright" title="Copyright" href="copyright.html" />26 <link rel="copyright" title="Copyright" href="copyright.html" />
27 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" />27 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
28 <link rel="next" title="Installation" href="setup.html" />28 <link rel="next" title="Installation" href="setup.html" />
29 <link rel="prev" title="Introduction" href="intro.html" /> 29 <link rel="prev" title="Introduction" href="intro.html" />
30 </head>30 </head>
@@ -41,7 +41,7 @@
41 <li class="right" >41 <li class="right" >
42 <a href="intro.html" title="Introduction"42 <a href="intro.html" title="Introduction"
43 accesskey="P">previous</a> |</li>43 accesskey="P">previous</a> |</li>
44 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 44 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
45 </ul>45 </ul>
46 </div> 46 </div>
4747
@@ -60,7 +60,7 @@
60<div class="section" id="php">60<div class="section" id="php">
61<h2>PHP<a class="headerlink" href="#php" title="Permalink to this headline">¶</a></h2>61<h2>PHP<a class="headerlink" href="#php" title="Permalink to this headline">¶</a></h2>
62<ul class="simple">62<ul class="simple">
63<li>You need PHP 5.3.0 or newer, with <tt class="docutils literal"><span class="pre">session</span></tt> support, the Standard PHP Library63<li>You need PHP 5.3.7 or newer, with <tt class="docutils literal"><span class="pre">session</span></tt> support, the Standard PHP Library
64(SPL) extension, JSON support, and the <tt class="docutils literal"><span class="pre">mbstring</span></tt> extension.</li>64(SPL) extension, JSON support, and the <tt class="docutils literal"><span class="pre">mbstring</span></tt> extension.</li>
65<li>To support uploading of ZIP files, you need the PHP <tt class="docutils literal"><span class="pre">zip</span></tt> extension.</li>65<li>To support uploading of ZIP files, you need the PHP <tt class="docutils literal"><span class="pre">zip</span></tt> extension.</li>
66<li>You need GD2 support in PHP to display inline thumbnails of JPEGs66<li>You need GD2 support in PHP to display inline thumbnails of JPEGs
@@ -155,7 +155,7 @@
155 <li class="right" >155 <li class="right" >
156 <a href="intro.html" title="Introduction"156 <a href="intro.html" title="Introduction"
157 >previous</a> |</li>157 >previous</a> |</li>
158 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 158 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
159 </ul>159 </ul>
160 </div>160 </div>
161 <div class="footer">161 <div class="footer">
162162
=== modified file 'doc/html/search.html'
--- doc/html/search.html 2015-08-10 10:02:56 +0000
+++ doc/html/search.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>Search &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>Search &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -25,7 +25,7 @@
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <script type="text/javascript" src="_static/searchtools.js"></script>26 <script type="text/javascript" src="_static/searchtools.js"></script>
27 <link rel="copyright" title="Copyright" href="copyright.html" />27 <link rel="copyright" title="Copyright" href="copyright.html" />
28 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" />28 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
29 <script type="text/javascript">29 <script type="text/javascript">
30 jQuery(function() { Search.loadIndex("searchindex.js"); });30 jQuery(function() { Search.loadIndex("searchindex.js"); });
31 </script>31 </script>
@@ -41,7 +41,7 @@
41 <li class="right" style="margin-right: 10px">41 <li class="right" style="margin-right: 10px">
42 <a href="genindex.html" title="General Index"42 <a href="genindex.html" title="General Index"
43 accesskey="I">index</a></li>43 accesskey="I">index</a></li>
44 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 44 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
45 </ul>45 </ul>
46 </div> 46 </div>
4747
@@ -89,7 +89,7 @@
89 <li class="right" style="margin-right: 10px">89 <li class="right" style="margin-right: 10px">
90 <a href="genindex.html" title="General Index"90 <a href="genindex.html" title="General Index"
91 >index</a></li>91 >index</a></li>
92 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 92 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
93 </ul>93 </ul>
94 </div>94 </div>
95 <div class="footer">95 <div class="footer">
9696
=== modified file 'doc/html/setup.html'
--- doc/html/setup.html 2015-08-10 10:02:56 +0000
+++ doc/html/setup.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>Installation &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>Installation &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -24,7 +24,7 @@
24 <script type="text/javascript" src="_static/underscore.js"></script>24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="copyright" title="Copyright" href="copyright.html" />26 <link rel="copyright" title="Copyright" href="copyright.html" />
27 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" />27 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
28 <link rel="next" title="Configuration" href="config.html" />28 <link rel="next" title="Configuration" href="config.html" />
29 <link rel="prev" title="Requirements" href="require.html" /> 29 <link rel="prev" title="Requirements" href="require.html" />
30 </head>30 </head>
@@ -41,7 +41,7 @@
41 <li class="right" >41 <li class="right" >
42 <a href="require.html" title="Requirements"42 <a href="require.html" title="Requirements"
43 accesskey="P">previous</a> |</li>43 accesskey="P">previous</a> |</li>
44 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 44 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
45 </ul>45 </ul>
46 </div> 46 </div>
4747
@@ -896,7 +896,7 @@
896 <li class="right" >896 <li class="right" >
897 <a href="require.html" title="Requirements"897 <a href="require.html" title="Requirements"
898 >previous</a> |</li>898 >previous</a> |</li>
899 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 899 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
900 </ul>900 </ul>
901 </div>901 </div>
902 <div class="footer">902 <div class="footer">
903903
=== modified file 'doc/html/transformations.html'
--- doc/html/transformations.html 2015-08-10 10:02:56 +0000
+++ doc/html/transformations.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>Transformations &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>Transformations &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -24,7 +24,7 @@
24 <script type="text/javascript" src="_static/underscore.js"></script>24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="copyright" title="Copyright" href="copyright.html" />26 <link rel="copyright" title="Copyright" href="copyright.html" />
27 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" />27 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
28 <link rel="up" title="User Guide" href="user.html" />28 <link rel="up" title="User Guide" href="user.html" />
29 <link rel="next" title="User management" href="privileges.html" />29 <link rel="next" title="User management" href="privileges.html" />
30 <link rel="prev" title="User Guide" href="user.html" /> 30 <link rel="prev" title="User Guide" href="user.html" />
@@ -42,7 +42,7 @@
42 <li class="right" >42 <li class="right" >
43 <a href="user.html" title="User Guide"43 <a href="user.html" title="User Guide"
44 accesskey="P">previous</a> |</li>44 accesskey="P">previous</a> |</li>
45 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li>45 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
46 <li><a href="user.html" accesskey="U">User Guide</a> &raquo;</li> 46 <li><a href="user.html" accesskey="U">User Guide</a> &raquo;</li>
47 </ul>47 </ul>
48 </div> 48 </div>
@@ -226,7 +226,7 @@
226 <li class="right" >226 <li class="right" >
227 <a href="user.html" title="User Guide"227 <a href="user.html" title="User Guide"
228 >previous</a> |</li>228 >previous</a> |</li>
229 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li>229 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
230 <li><a href="user.html" >User Guide</a> &raquo;</li> 230 <li><a href="user.html" >User Guide</a> &raquo;</li>
231 </ul>231 </ul>
232 </div>232 </div>
233233
=== modified file 'doc/html/user.html'
--- doc/html/user.html 2015-08-10 10:02:56 +0000
+++ doc/html/user.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>User Guide &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>User Guide &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -24,7 +24,7 @@
24 <script type="text/javascript" src="_static/underscore.js"></script>24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="copyright" title="Copyright" href="copyright.html" />26 <link rel="copyright" title="Copyright" href="copyright.html" />
27 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" />27 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
28 <link rel="next" title="Transformations" href="transformations.html" />28 <link rel="next" title="Transformations" href="transformations.html" />
29 <link rel="prev" title="Configuration" href="config.html" /> 29 <link rel="prev" title="Configuration" href="config.html" />
30 </head>30 </head>
@@ -41,7 +41,7 @@
41 <li class="right" >41 <li class="right" >
42 <a href="config.html" title="Configuration"42 <a href="config.html" title="Configuration"
43 accesskey="P">previous</a> |</li>43 accesskey="P">previous</a> |</li>
44 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 44 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
45 </ul>45 </ul>
46 </div> 46 </div>
4747
@@ -126,7 +126,7 @@
126 <li class="right" >126 <li class="right" >
127 <a href="config.html" title="Configuration"127 <a href="config.html" title="Configuration"
128 >previous</a> |</li>128 >previous</a> |</li>
129 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 129 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
130 </ul>130 </ul>
131 </div>131 </div>
132 <div class="footer">132 <div class="footer">
133133
=== modified file 'doc/html/vendors.html'
--- doc/html/vendors.html 2015-08-10 10:02:56 +0000
+++ doc/html/vendors.html 2015-10-27 17:36:50 +0000
@@ -6,7 +6,7 @@
6 <head>6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 8
9 <title>Distributing and packaging phpMyAdmin &mdash; phpMyAdmin 4.4.13.1 documentation</title>9 <title>Distributing and packaging phpMyAdmin &mdash; phpMyAdmin 4.4.15.1 documentation</title>
10 10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
14 <script type="text/javascript">14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',16 URL_ROOT: './',
17 VERSION: '4.4.13.1',17 VERSION: '4.4.15.1',
18 COLLAPSE_INDEX: false,18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true20 HAS_SOURCE: true
@@ -24,7 +24,7 @@
24 <script type="text/javascript" src="_static/underscore.js"></script>24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="copyright" title="Copyright" href="copyright.html" />26 <link rel="copyright" title="Copyright" href="copyright.html" />
27 <link rel="top" title="phpMyAdmin 4.4.13.1 documentation" href="index.html" />27 <link rel="top" title="phpMyAdmin 4.4.15.1 documentation" href="index.html" />
28 <link rel="next" title="Copyright" href="copyright.html" />28 <link rel="next" title="Copyright" href="copyright.html" />
29 <link rel="prev" title="Developers Information" href="developers.html" /> 29 <link rel="prev" title="Developers Information" href="developers.html" />
30 </head>30 </head>
@@ -41,7 +41,7 @@
41 <li class="right" >41 <li class="right" >
42 <a href="developers.html" title="Developers Information"42 <a href="developers.html" title="Developers Information"
43 accesskey="P">previous</a> |</li>43 accesskey="P">previous</a> |</li>
44 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 44 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
45 </ul>45 </ul>
46 </div> 46 </div>
4747
@@ -136,7 +136,7 @@
136 <li class="right" >136 <li class="right" >
137 <a href="developers.html" title="Developers Information"137 <a href="developers.html" title="Developers Information"
138 >previous</a> |</li>138 >previous</a> |</li>
139 <li><a href="index.html">phpMyAdmin 4.4.13.1 documentation</a> &raquo;</li> 139 <li><a href="index.html">phpMyAdmin 4.4.15.1 documentation</a> &raquo;</li>
140 </ul>140 </ul>
141 </div>141 </div>
142 <div class="footer">142 <div class="footer">
143143
=== modified file 'doc/require.rst'
--- doc/require.rst 2015-05-28 15:02:54 +0000
+++ doc/require.rst 2015-10-27 17:36:50 +0000
@@ -12,7 +12,7 @@
12PHP12PHP
13---13---
1414
15* You need PHP 5.3.0 or newer, with ``session`` support, the Standard PHP Library15* You need PHP 5.3.7 or newer, with ``session`` support, the Standard PHP Library
16 (SPL) extension, JSON support, and the ``mbstring`` extension.16 (SPL) extension, JSON support, and the ``mbstring`` extension.
1717
18* To support uploading of ZIP files, you need the PHP ``zip`` extension.18* To support uploading of ZIP files, you need the PHP ``zip`` extension.
1919
=== modified file 'import.php'
--- import.php 2015-04-28 10:31:57 +0000
+++ import.php 2015-10-27 17:36:50 +0000
@@ -644,7 +644,7 @@
644 if ($import_notice) {644 if ($import_notice) {
645 $message->addString($import_notice);645 $message->addString($import_notice);
646 }646 }
647 if (isset($local_import_file)) {647 if (! empty($local_import_file)) {
648 $message->addString('(' . htmlspecialchars($local_import_file) . ')');648 $message->addString('(' . htmlspecialchars($local_import_file) . ')');
649 } else {649 } else {
650 $message->addString(650 $message->addString(
651651
=== modified file 'js/functions.js'
--- js/functions.js 2015-08-10 10:02:56 +0000
+++ js/functions.js 2015-10-27 17:36:50 +0000
@@ -144,6 +144,7 @@
144function escapeHtml(unsafe) {144function escapeHtml(unsafe) {
145 if (typeof(unsafe) != 'undefined') {145 if (typeof(unsafe) != 'undefined') {
146 return unsafe146 return unsafe
147 .toString()
147 .replace(/&/g, "&amp;")148 .replace(/&/g, "&amp;")
148 .replace(/</g, "&lt;")149 .replace(/</g, "&lt;")
149 .replace(/>/g, "&gt;")150 .replace(/>/g, "&gt;")
@@ -3811,7 +3812,7 @@
3811 * Load version information asynchronously.3812 * Load version information asynchronously.
3812 */3813 */
3813 if ($('li.jsversioncheck').length > 0) {3814 if ($('li.jsversioncheck').length > 0) {
3814 $.getJSON('version_check.php', {}, PMA_current_version);3815 $.getJSON('version_check.php', {'server' : PMA_commonParams.get('server')}, PMA_current_version);
3815 }3816 }
38163817
3817 if ($('#is_git_revision').length > 0) {3818 if ($('#is_git_revision').length > 0) {
38183819
=== modified file 'js/line_counts.php'
--- js/line_counts.php 2015-08-10 10:02:56 +0000
+++ js/line_counts.php 2015-10-27 17:36:50 +0000
@@ -27,10 +27,7 @@
27$LINE_COUNT["cross_framing_protection.js"] = 10;27$LINE_COUNT["cross_framing_protection.js"] = 10;
28$LINE_COUNT["db_operations.js"] = 157;28$LINE_COUNT["db_operations.js"] = 157;
29$LINE_COUNT["db_search.js"] = 239;29$LINE_COUNT["db_search.js"] = 239;
30$LINE_COUNT["db_tracking.js"] = 84;
31$LINE_COUNT["doclinks.js"] = 365;30$LINE_COUNT["doclinks.js"] = 365;
32$LINE_COUNT["gis_data_editor.js"] = 396;
33$LINE_COUNT["import.js"] = 167;
34$LINE_COUNT["jqplot/excanvas.js"] = 1438;31$LINE_COUNT["jqplot/excanvas.js"] = 1438;
35$LINE_COUNT["jqplot/jquery.jqplot.js"] = 11411;32$LINE_COUNT["jqplot/jquery.jqplot.js"] = 11411;
36$LINE_COUNT["jqplot/plugins/jqplot.barRenderer.js"] = 800;33$LINE_COUNT["jqplot/plugins/jqplot.barRenderer.js"] = 800;
@@ -473,13 +470,9 @@
473$LINE_COUNT["pmd/history.js"] = 813;470$LINE_COUNT["pmd/history.js"] = 813;
474$LINE_COUNT["pmd/iecanvas.js"] = 147;471$LINE_COUNT["pmd/iecanvas.js"] = 147;
475$LINE_COUNT["pmd/init.js"] = 40;472$LINE_COUNT["pmd/init.js"] = 40;
476$LINE_COUNT["pmd/move.js"] = 2003;473$LINE_COUNT["pmd/move.js"] = 2004;
477$LINE_COUNT["server_status_advisor.js"] = 93;
478$LINE_COUNT["server_status_processes.js"] = 189;
479$LINE_COUNT["server_status_queries.js"] = 34;474$LINE_COUNT["server_status_queries.js"] = 34;
480$LINE_COUNT["server_status_variables.js"] = 103;
481$LINE_COUNT["server_user_groups.js"] = 42;475$LINE_COUNT["server_user_groups.js"] = 42;
482$LINE_COUNT["server_variables.js"] = 147;
483$LINE_COUNT["sprintf.js"] = 211;476$LINE_COUNT["sprintf.js"] = 211;
484$LINE_COUNT["tbl_find_replace.js"] = 47;477$LINE_COUNT["tbl_find_replace.js"] = 47;
485$LINE_COUNT["tracekit/tracekit.js"] = 1114;478$LINE_COUNT["tracekit/tracekit.js"] = 1114;
@@ -496,9 +489,12 @@
496$LINE_COUNT["db_central_columns.js"] = 201;489$LINE_COUNT["db_central_columns.js"] = 201;
497$LINE_COUNT["db_qbe.js"] = 64;490$LINE_COUNT["db_qbe.js"] = 64;
498$LINE_COUNT["db_structure.js"] = 391;491$LINE_COUNT["db_structure.js"] = 391;
492$LINE_COUNT["db_tracking.js"] = 84;
499$LINE_COUNT["error_report.js"] = 340;493$LINE_COUNT["error_report.js"] = 340;
500$LINE_COUNT["export.js"] = 401;494$LINE_COUNT["export.js"] = 401;
501$LINE_COUNT["functions.js"] = 4571;495$LINE_COUNT["functions.js"] = 4572;
496$LINE_COUNT["gis_data_editor.js"] = 396;
497$LINE_COUNT["import.js"] = 167;
502$LINE_COUNT["indexes.js"] = 697;498$LINE_COUNT["indexes.js"] = 697;
503$LINE_COUNT["makegrid.js"] = 1962;499$LINE_COUNT["makegrid.js"] = 1962;
504$LINE_COUNT["menu-resizer.js"] = 182;500$LINE_COUNT["menu-resizer.js"] = 182;
@@ -509,13 +505,17 @@
509$LINE_COUNT["server_databases.js"] = 137;505$LINE_COUNT["server_databases.js"] = 137;
510$LINE_COUNT["server_plugins.js"] = 30;506$LINE_COUNT["server_plugins.js"] = 30;
511$LINE_COUNT["server_privileges.js"] = 451;507$LINE_COUNT["server_privileges.js"] = 451;
508$LINE_COUNT["server_status_advisor.js"] = 93;
512$LINE_COUNT["server_status_monitor.js"] = 2172;509$LINE_COUNT["server_status_monitor.js"] = 2172;
510$LINE_COUNT["server_status_processes.js"] = 189;
513$LINE_COUNT["server_status_sorter.js"] = 89;511$LINE_COUNT["server_status_sorter.js"] = 89;
512$LINE_COUNT["server_status_variables.js"] = 103;
513$LINE_COUNT["server_variables.js"] = 147;
514$LINE_COUNT["sql.js"] = 843;514$LINE_COUNT["sql.js"] = 843;
515$LINE_COUNT["tbl_change.js"] = 754;515$LINE_COUNT["tbl_change.js"] = 754;
516$LINE_COUNT["tbl_chart.js"] = 429;516$LINE_COUNT["tbl_chart.js"] = 429;
517$LINE_COUNT["tbl_gis_visualization.js"] = 353;517$LINE_COUNT["tbl_gis_visualization.js"] = 353;
518$LINE_COUNT["tbl_operations.js"] = 240;518$LINE_COUNT["tbl_operations.js"] = 243;
519$LINE_COUNT["tbl_relation.js"] = 234;519$LINE_COUNT["tbl_relation.js"] = 234;
520$LINE_COUNT["tbl_select.js"] = 395;520$LINE_COUNT["tbl_select.js"] = 395;
521$LINE_COUNT["tbl_structure.js"] = 397;521$LINE_COUNT["tbl_structure.js"] = 397;
522522
=== modified file 'js/pmd/move.js'
--- js/pmd/move.js 2015-07-02 09:19:22 +0000
+++ js/pmd/move.js 2015-10-27 17:36:50 +0000
@@ -676,6 +676,7 @@
676 };676 };
677677
678 var $form = $('<form action="db_designer.php" method="post" name="save_page" id="save_page" class="ajax"></form>')678 var $form = $('<form action="db_designer.php" method="post" name="save_page" id="save_page" class="ajax"></form>')
679 .append('<input type="hidden" name="server" value="' + server + '" />')
679 .append('<input type="hidden" name="db" value="' + db + '" />')680 .append('<input type="hidden" name="db" value="' + db + '" />')
680 .append('<input type="hidden" name="token" value="' + token + '" />')681 .append('<input type="hidden" name="token" value="' + token + '" />')
681 .append('<input type="hidden" name="operation" value="savePage" />')682 .append('<input type="hidden" name="operation" value="savePage" />')
@@ -718,7 +719,7 @@
718 };719 };
719720
720 var $msgbox = PMA_ajaxShowMessage();721 var $msgbox = PMA_ajaxShowMessage();
721 var params = 'ajax_request=true&dialog=edit&token=' + token + '&db=' + db;722 var params = 'ajax_request=true&dialog=edit&server=' + server + '&token=' + token + '&db=' + db;
722 $.get("db_designer.php", params, function (data) {723 $.get("db_designer.php", params, function (data) {
723 if (data.success === false) {724 if (data.success === false) {
724 PMA_ajaxShowMessage(data.error, false);725 PMA_ajaxShowMessage(data.error, false);
@@ -798,7 +799,7 @@
798 };799 };
799800
800 var $msgbox = PMA_ajaxShowMessage();801 var $msgbox = PMA_ajaxShowMessage();
801 var params = 'ajax_request=true&dialog=delete&token=' + token + '&db=' + db;802 var params = 'ajax_request=true&dialog=delete&server=' + server + '&token=' + token + '&db=' + db;
802 $.get("db_designer.php", params, function (data) {803 $.get("db_designer.php", params, function (data) {
803 if (data.success === false) {804 if (data.success === false) {
804 PMA_ajaxShowMessage(data.error, false);805 PMA_ajaxShowMessage(data.error, false);
@@ -897,7 +898,7 @@
897 };898 };
898899
899 var $msgbox = PMA_ajaxShowMessage();900 var $msgbox = PMA_ajaxShowMessage();
900 var params = 'ajax_request=true&dialog=save_as&token=' + token + '&db=' + db;901 var params = 'ajax_request=true&dialog=save_as&server=' + server + '&token=' + token + '&db=' + db;
901 $.get("db_designer.php", params, function (data) {902 $.get("db_designer.php", params, function (data) {
902 if (data.success === false) {903 if (data.success === false) {
903 PMA_ajaxShowMessage(data.error, false);904 PMA_ajaxShowMessage(data.error, false);
@@ -974,7 +975,7 @@
974 $(this).dialog('close');975 $(this).dialog('close');
975 };976 };
976 var $msgbox = PMA_ajaxShowMessage();977 var $msgbox = PMA_ajaxShowMessage();
977 var params = 'ajax_request=true&dialog=export&token=' + token + '&db=' + db + '&selected_page=' + selected_page;978 var params = 'ajax_request=true&dialog=export&server=' + server + '&token=' + token + '&db=' + db + '&selected_page=' + selected_page;
978 $.get("db_designer.php", params, function (data) {979 $.get("db_designer.php", params, function (data) {
979 if (data.success === false) {980 if (data.success === false) {
980 PMA_ajaxShowMessage(data.error, false);981 PMA_ajaxShowMessage(data.error, false);
@@ -1015,7 +1016,7 @@
1015 if (page !== null) {1016 if (page !== null) {
1016 param_page = '&page=' + page;1017 param_page = '&page=' + page;
1017 }1018 }
1018 $('<a href="db_designer.php?db=' + db + '&token=' + token + param_page + '"></a>')1019 $('<a href="db_designer.php?server=' + server + '&db=' + db + '&token=' + token + param_page + '"></a>')
1019 .appendTo($('#page_content'))1020 .appendTo($('#page_content'))
1020 .click();1021 .click();
1021 } else {1022 } else {
10221023
=== modified file 'js/tbl_operations.js'
--- js/tbl_operations.js 2015-04-28 10:31:57 +0000
+++ js/tbl_operations.js 2015-10-27 17:36:50 +0000
@@ -26,7 +26,10 @@
26 $.post($form.attr('action'), $form.serialize() + "&submit_copy=Go", function (data) {26 $.post($form.attr('action'), $form.serialize() + "&submit_copy=Go", function (data) {
27 if (typeof data !== 'undefined' && data.success === true) {27 if (typeof data !== 'undefined' && data.success === true) {
28 if ($form.find("input[name='switch_to_new']").prop('checked')) {28 if ($form.find("input[name='switch_to_new']").prop('checked')) {
29 PMA_commonParams.set('db', data.db);29 PMA_commonParams.set(
30 'db',
31 $form.find("select[name='target_db']").val()
32 );
30 PMA_commonParams.set(33 PMA_commonParams.set(
31 'table',34 'table',
32 $form.find("input[name='new_name']").val()35 $form.find("input[name='new_name']").val()
3336
=== modified file 'libraries/Config.class.php'
--- libraries/Config.class.php 2015-08-10 10:02:56 +0000
+++ libraries/Config.class.php 2015-10-27 17:36:50 +0000
@@ -114,7 +114,7 @@
114 */114 */
115 function checkSystem()115 function checkSystem()
116 {116 {
117 $this->set('PMA_VERSION', '4.4.13.1');117 $this->set('PMA_VERSION', '4.4.15.1');
118 /**118 /**
119 * @deprecated119 * @deprecated
120 */120 */
121121
=== modified file 'libraries/DatabaseInterface.class.php'
--- libraries/DatabaseInterface.class.php 2015-04-28 10:31:57 +0000
+++ libraries/DatabaseInterface.class.php 2015-10-27 17:36:50 +0000
@@ -228,42 +228,43 @@
228 public function convertMessage($message)228 public function convertMessage($message)
229 {229 {
230 // latin always last!230 // latin always last!
231 // @todo some values are missing,
232 // see https://mariadb.com/kb/en/mariadb/server-locale/
233
231 $encodings = array(234 $encodings = array(
232 'japanese' => 'EUC-JP', //'ujis',235 'ja' => 'EUC-JP', //'ujis',
233 'japanese-sjis' => 'Shift-JIS', //'sjis',236 'ko' => 'EUC-KR', //'euckr',
234 'korean' => 'EUC-KR', //'euckr',237 'ru' => 'KOI8-R', //'koi8r',
235 'russian' => 'KOI8-R', //'koi8r',238 'uk' => 'KOI8-U', //'koi8u',
236 'ukrainian' => 'KOI8-U', //'koi8u',239 'sr' => 'CP1250', //'cp1250',
237 'greek' => 'ISO-8859-7', //'greek',240 'et' => 'ISO-8859-13', //'latin7',
238 'serbian' => 'CP1250', //'cp1250',241 'sk' => 'ISO-8859-2', //'latin2',
239 'estonian' => 'ISO-8859-13', //'latin7',242 'cz' => 'ISO-8859-2', //'latin2',
240 'slovak' => 'ISO-8859-2', //'latin2',243 'hu' => 'ISO-8859-2', //'latin2',
241 'czech' => 'ISO-8859-2', //'latin2',244 'pl' => 'ISO-8859-2', //'latin2',
242 'hungarian' => 'ISO-8859-2', //'latin2',245 'ro' => 'ISO-8859-2', //'latin2',
243 'polish' => 'ISO-8859-2', //'latin2',246 'es' => 'CP1252', //'latin1',
244 'romanian' => 'ISO-8859-2', //'latin2',247 'sv' => 'CP1252', //'latin1',
245 'spanish' => 'CP1252', //'latin1',248 'it' => 'CP1252', //'latin1',
246 'swedish' => 'CP1252', //'latin1',249 'no' => 'CP1252', //'latin1',
247 'italian' => 'CP1252', //'latin1',250 'pt' => 'CP1252', //'latin1',
248 'norwegian-ny' => 'CP1252', //'latin1',251 'da' => 'CP1252', //'latin1',
249 'norwegian' => 'CP1252', //'latin1',252 'nl' => 'CP1252', //'latin1',
250 'portuguese' => 'CP1252', //'latin1',253 'en' => 'CP1252', //'latin1',
251 'danish' => 'CP1252', //'latin1',254 'fr' => 'CP1252', //'latin1',
252 'dutch' => 'CP1252', //'latin1',255 'de' => 'CP1252', //'latin1',
253 'english' => 'CP1252', //'latin1',
254 'french' => 'CP1252', //'latin1',
255 'german' => 'CP1252', //'latin1',
256 );256 );
257257
258 $server_language = $this->fetchValue(258 $server_language = $this->fetchValue(
259 'SHOW VARIABLES LIKE \'language\';',259 'SELECT @@lc_messages;',
260 0,260 0,
261 1261 0
262 );262 );
263
263 if ($server_language) {264 if ($server_language) {
264 $found = array();265 $found = array();
265 $match = preg_match(266 $match = preg_match(
266 '&(?:\\\|\\/)([^\\\\\/]*)(?:\\\|\\/)$&i',267 '&([a-z][a-z])_&i',
267 $server_language,268 $server_language,
268 $found269 $found
269 );270 );
@@ -321,7 +322,8 @@
321 )322 )
322 . '%\'';323 . '%\'';
323 } else {324 } else {
324 $sql_where_table = 'AND t.`TABLE_NAME` = \''325 $sql_where_table = 'AND t.`TABLE_NAME` '
326 . PMA_Util::getCollateForIS() . ' = \''
325 . PMA_Util::sqlAddSlashes($table) . '\'';327 . PMA_Util::sqlAddSlashes($table) . '\'';
326 }328 }
327 } else {329 } else {
@@ -423,7 +425,7 @@
423 `CREATE_OPTIONS` AS `Create_options`,425 `CREATE_OPTIONS` AS `Create_options`,
424 `TABLE_COMMENT` AS `Comment`426 `TABLE_COMMENT` AS `Comment`
425 FROM `information_schema`.`TABLES` t427 FROM `information_schema`.`TABLES` t
426 WHERE ' . (PMA_IS_WINDOWS ? '' : 'BINARY') . ' `TABLE_SCHEMA`428 WHERE `TABLE_SCHEMA` ' . PMA_Util::getCollateForIS() . '
427 IN (\'' . implode("', '", $this_databases) . '\')429 IN (\'' . implode("', '", $this_databases) . '\')
428 ' . $sql_where_table;430 ' . $sql_where_table;
429 }431 }
@@ -1410,8 +1412,8 @@
1410 * @param boolean $full whether to return full info or only column names1412 * @param boolean $full whether to return full info or only column names
1411 * @param mixed $link mysql link resource1413 * @param mixed $link mysql link resource
1412 *1414 *
1413 * @return false|array array indexed by column names or,1415 * @return array array indexed by column names or,
1414 * if $column is given, flat array description1416 * if $column is given, flat array description
1415 */1417 */
1416 public function getColumns($database, $table, $column = null, $full = false,1418 public function getColumns($database, $table, $column = null, $full = false,
1417 $link = null1419 $link = null
@@ -1419,7 +1421,7 @@
1419 $sql = $this->getColumnsSql($database, $table, $column, $full);1421 $sql = $this->getColumnsSql($database, $table, $column, $full);
1420 $fields = $this->fetchResult($sql, 'Field', null, $link);1422 $fields = $this->fetchResult($sql, 'Field', null, $link);
1421 if (! is_array($fields) || count($fields) == 0) {1423 if (! is_array($fields) || count($fields) == 0) {
1422 return null;1424 return array();
1423 }1425 }
1424 // Check if column is a part of multiple-column index and set its 'Key'.1426 // Check if column is a part of multiple-column index and set its 'Key'.
1425 $indexes = PMA_Index::getFromTable($table, $database);1427 $indexes = PMA_Index::getFromTable($table, $database);
14261428
=== modified file 'libraries/DisplayResults.class.php'
--- libraries/DisplayResults.class.php 2015-07-23 07:54:31 +0000
+++ libraries/DisplayResults.class.php 2015-10-27 17:36:50 +0000
@@ -3025,7 +3025,9 @@
30253025
3026 $vertical_display = $this->__get('vertical_display');3026 $vertical_display = $this->__get('vertical_display');
30273027
3028 if ($meta->numeric == 1) {3028 // in some situations (issue 11406), numeric returns 1
3029 // even for a string type
3030 if ($meta->numeric == 1 && $meta->type != 'string') {
3029 // n u m e r i c3031 // n u m e r i c
30303032
3031 $vertical_display['data'][$row_no][$i]3033 $vertical_display['data'][$row_no][$i]
30323034
=== modified file 'libraries/Scripts.class.php'
--- libraries/Scripts.class.php 2015-04-28 10:31:57 +0000
+++ libraries/Scripts.class.php 2015-10-27 17:36:50 +0000
@@ -82,12 +82,17 @@
82 }82 }
83 }83 }
84 $separator = PMA_URL_getArgSeparator();84 $separator = PMA_URL_getArgSeparator();
85 $url = 'js/get_scripts.js.php?' . implode($separator, $scripts);85 $static_scripts = '';
86 // Using chunks of 20 files to avoid too long URLs
87 $script_chunks = array_chunk($scripts, 20);
88 foreach ($script_chunks as $script_chunk) {
89 $url = 'js/get_scripts.js.php?' . implode($separator, $script_chunk);
8690
87 $static_scripts = sprintf(91 $static_scripts .= sprintf(
88 '<script data-cfasync="false" type="text/javascript" src="%s"></script>',92 '<script data-cfasync="false" type="text/javascript" src="%s"></script>',
89 htmlspecialchars($url)93 htmlspecialchars($url)
90 );94 );
95 }
91 return $first_dynamic_scripts . $static_scripts . $dynamic_scripts;96 return $first_dynamic_scripts . $static_scripts . $dynamic_scripts;
92 }97 }
9398
9499
=== modified file 'libraries/Util.class.php'
--- libraries/Util.class.php 2015-07-07 10:25:56 +0000
+++ libraries/Util.class.php 2015-10-27 17:36:50 +0000
@@ -4234,7 +4234,7 @@
4234 *4234 *
4235 * @return resource curl_handle with updated options4235 * @return resource curl_handle with updated options
4236 */4236 */
4237 public static function configureCurl(resource $curl_handle)4237 public static function configureCurl($curl_handle)
4238 {4238 {
4239 if (/*overload*/mb_strlen($GLOBALS['cfg']['ProxyUrl'])) {4239 if (/*overload*/mb_strlen($GLOBALS['cfg']['ProxyUrl'])) {
4240 curl_setopt($curl_handle, CURLOPT_PROXY, $GLOBALS['cfg']['ProxyUrl']);4240 curl_setopt($curl_handle, CURLOPT_PROXY, $GLOBALS['cfg']['ProxyUrl']);
@@ -4249,157 +4249,6 @@
4249 curl_setopt($curl_handle, CURLOPT_USERAGENT, 'phpMyAdmin/' . PMA_VERSION);4249 curl_setopt($curl_handle, CURLOPT_USERAGENT, 'phpMyAdmin/' . PMA_VERSION);
4250 return $curl_handle;4250 return $curl_handle;
4251 }4251 }
4252 /**
4253 * Returns information with latest version from phpmyadmin.net
4254 *
4255 * @return object JSON decoded object with the data
4256 */
4257 public static function getLatestVersion()
4258 {
4259 // wait 3s at most for server response, it's enough to get information
4260 // from a working server
4261 $connection_timeout = 3;
4262
4263 $response = '{}';
4264 // Get response text from phpmyadmin.net or from the session
4265 // Update cache every 6 hours
4266 if (isset($_SESSION['cache']['version_check'])
4267 && time() < $_SESSION['cache']['version_check']['timestamp'] + 3600 * 6
4268 ) {
4269 $save = false;
4270 $response = $_SESSION['cache']['version_check']['response'];
4271 } else {
4272 $save = true;
4273 $file = 'https://www.phpmyadmin.net/home_page/version.json';
4274 if (ini_get('allow_url_fopen')) {
4275 $context = array(
4276 'http' => array(
4277 'request_fulluri' => true,
4278 'timeout' => $connection_timeout,
4279 )
4280 );
4281 $context = PMA_Util::handleContext($context);
4282 if (! defined('TESTSUITE')) {
4283 session_write_close();
4284 }
4285 $response = file_get_contents(
4286 $file,
4287 false,
4288 stream_context_create($context)
4289 );
4290 } else if (function_exists('curl_init')) {
4291 $curl_handle = curl_init($file);
4292 if ($curl_handle === false) {
4293 return null;
4294 }
4295 $curl_handle = PMA_Util::configureCurl($curl_handle);
4296 curl_setopt(
4297 $curl_handle,
4298 CURLOPT_HEADER,
4299 false
4300 );
4301 curl_setopt(
4302 $curl_handle,
4303 CURLOPT_RETURNTRANSFER,
4304 true
4305 );
4306 curl_setopt(
4307 $curl_handle,
4308 CURLOPT_TIMEOUT,
4309 $connection_timeout
4310 );
4311 if (! defined('TESTSUITE')) {
4312 session_write_close();
4313 }
4314 $response = curl_exec($curl_handle);
4315 }
4316 }
4317
4318 $data = json_decode($response);
4319 if (is_object($data)
4320 && ! empty($data->version)
4321 && ! empty($data->date)
4322 && $save
4323 ) {
4324 if (! isset($_SESSION) && ! defined('TESTSUITE')) {
4325 ini_set('session.use_only_cookies', 'false');
4326 ini_set('session.use_cookies', 'false');
4327 ini_set('session.use_trans_sid', 'false');
4328 ini_set('session.cache_limiter', 'nocache');
4329 session_start();
4330 }
4331 $_SESSION['cache']['version_check'] = array(
4332 'response' => $response,
4333 'timestamp' => time()
4334 );
4335 }
4336 return $data;
4337 }
4338
4339 /**
4340 * Calculates numerical equivalent of phpMyAdmin version string
4341 *
4342 * @param string $version version
4343 *
4344 * @return mixed false on failure, integer on success
4345 */
4346 public static function versionToInt($version)
4347 {
4348 $parts = explode('-', $version);
4349 if (count($parts) > 1) {
4350 $suffix = $parts[1];
4351 } else {
4352 $suffix = '';
4353 }
4354 $parts = explode('.', $parts[0]);
4355
4356 $result = 0;
4357
4358 if (count($parts) >= 1 && is_numeric($parts[0])) {
4359 $result += 1000000 * $parts[0];
4360 }
4361
4362 if (count($parts) >= 2 && is_numeric($parts[1])) {
4363 $result += 10000 * $parts[1];
4364 }
4365
4366 if (count($parts) >= 3 && is_numeric($parts[2])) {
4367 $result += 100 * $parts[2];
4368 }
4369
4370 if (count($parts) >= 4 && is_numeric($parts[3])) {
4371 $result += 1 * $parts[3];
4372 }
4373
4374 if (!empty($suffix)) {
4375 $matches = array();
4376 if (preg_match('/^(\D+)(\d+)$/', $suffix, $matches)) {
4377 $suffix = $matches[1];
4378 $result += intval($matches[2]);
4379 }
4380 switch ($suffix) {
4381 case 'pl':
4382 $result += 60;
4383 break;
4384 case 'rc':
4385 $result += 30;
4386 break;
4387 case 'beta':
4388 $result += 20;
4389 break;
4390 case 'alpha':
4391 $result += 10;
4392 break;
4393 case 'dev':
4394 $result += 0;
4395 break;
4396 }
4397 } else {
4398 $result += 50; // for final
4399 }
4400
4401 return $result;
4402 }
44034252
4404 /**4253 /**
4405 * Add fractional seconds to time, datetime and timestamp strings.4254 * Add fractional seconds to time, datetime and timestamp strings.
@@ -4517,7 +4366,9 @@
4517 "SHOW VARIABLES LIKE 'lower_case_table_names'", 0, 14366 "SHOW VARIABLES LIKE 'lower_case_table_names'", 0, 1
4518 );4367 );
45194368
4520 if ($lowerCaseTableNames === '0') {4369 if ($lowerCaseTableNames === '0' // issue #10961
4370 || $lowerCaseTableNames === '2' // issue #11461
4371 ) {
4521 return "COLLATE utf8_bin";4372 return "COLLATE utf8_bin";
4522 }4373 }
4523 return "";4374 return "";
45244375
=== added file 'libraries/VersionInformation.php'
--- libraries/VersionInformation.php 1970-01-01 00:00:00 +0000
+++ libraries/VersionInformation.php 2015-10-27 17:36:50 +0000
@@ -0,0 +1,270 @@
1<?php
2/* vim: set expandtab sw=4 ts=4 sts=4: */
3/**
4 * Responsile for retrieving version information and notifiying about latest version
5 *
6 * @package PhpMyAdmin
7 */
8if (! defined('PHPMYADMIN')) {
9 exit;
10}
11
12/**
13 * Responsile for retrieving version information and notifiying about latest version
14 *
15 * @package PhpMyAdmin
16 *
17 */
18class VersionInformation
19{
20 /**
21 * Returns information with latest version from phpmyadmin.net
22 *
23 * @return object JSON decoded object with the data
24 */
25 public function getLatestVersion()
26 {
27 if (!$GLOBALS['cfg']['VersionCheck']) {
28 return new stdClass();
29 }
30
31 // wait 3s at most for server response, it's enough to get information
32 // from a working server
33 $connection_timeout = 3;
34
35 $response = '{}';
36 // Get response text from phpmyadmin.net or from the session
37 // Update cache every 6 hours
38 if (isset($_SESSION['cache']['version_check'])
39 && time() < $_SESSION['cache']['version_check']['timestamp'] + 3600 * 6
40 ) {
41 $save = false;
42 $response = $_SESSION['cache']['version_check']['response'];
43 } else {
44 $save = true;
45 $file = 'https://www.phpmyadmin.net/home_page/version.json';
46 if (ini_get('allow_url_fopen')) {
47 $context = array(
48 'http' => array(
49 'request_fulluri' => true,
50 'timeout' => $connection_timeout,
51 )
52 );
53 $context = PMA_Util::handleContext($context);
54 if (! defined('TESTSUITE')) {
55 session_write_close();
56 }
57 $response = file_get_contents(
58 $file,
59 false,
60 stream_context_create($context)
61 );
62 } else if (function_exists('curl_init')) {
63 $curl_handle = curl_init($file);
64 if ($curl_handle === false) {
65 return null;
66 }
67 $curl_handle = PMA_Util::configureCurl($curl_handle);
68 curl_setopt(
69 $curl_handle,
70 CURLOPT_HEADER,
71 false
72 );
73 curl_setopt(
74 $curl_handle,
75 CURLOPT_RETURNTRANSFER,
76 true
77 );
78 curl_setopt(
79 $curl_handle,
80 CURLOPT_TIMEOUT,
81 $connection_timeout
82 );
83 if (! defined('TESTSUITE')) {
84 session_write_close();
85 }
86 $response = curl_exec($curl_handle);
87 }
88 }
89
90 $data = json_decode($response);
91 if (is_object($data)
92 && ! empty($data->version)
93 && ! empty($data->date)
94 && $save
95 ) {
96 if (! isset($_SESSION) && ! defined('TESTSUITE')) {
97 ini_set('session.use_only_cookies', 'false');
98 ini_set('session.use_cookies', 'false');
99 ini_set('session.use_trans_sid', 'false');
100 ini_set('session.cache_limiter', 'nocache');
101 session_start();
102 }
103 $_SESSION['cache']['version_check'] = array(
104 'response' => $response,
105 'timestamp' => time()
106 );
107 }
108 return $data;
109 }
110
111 /**
112 * Calculates numerical equivalent of phpMyAdmin version string
113 *
114 * @param string $version version
115 *
116 * @return mixed false on failure, integer on success
117 */
118 public function versionToInt($version)
119 {
120 $parts = explode('-', $version);
121 if (count($parts) > 1) {
122 $suffix = $parts[1];
123 } else {
124 $suffix = '';
125 }
126 $parts = explode('.', $parts[0]);
127
128 $result = 0;
129
130 if (count($parts) >= 1 && is_numeric($parts[0])) {
131 $result += 1000000 * $parts[0];
132 }
133
134 if (count($parts) >= 2 && is_numeric($parts[1])) {
135 $result += 10000 * $parts[1];
136 }
137
138 if (count($parts) >= 3 && is_numeric($parts[2])) {
139 $result += 100 * $parts[2];
140 }
141
142 if (count($parts) >= 4 && is_numeric($parts[3])) {
143 $result += 1 * $parts[3];
144 }
145
146 if (!empty($suffix)) {
147 $matches = array();
148 if (preg_match('/^(\D+)(\d+)$/', $suffix, $matches)) {
149 $suffix = $matches[1];
150 $result += intval($matches[2]);
151 }
152 switch ($suffix) {
153 case 'pl':
154 $result += 60;
155 break;
156 case 'rc':
157 $result += 30;
158 break;
159 case 'beta':
160 $result += 20;
161 break;
162 case 'alpha':
163 $result += 10;
164 break;
165 case 'dev':
166 $result += 0;
167 break;
168 }
169 } else {
170 $result += 50; // for final
171 }
172
173 return $result;
174 }
175
176 /**
177 * Returns the version and date of the latest phpMyAdmin version compatible
178 * with avilable PHP and MySQL versions
179 *
180 * @param array $releases array of information related to each version
181 *
182 * @return array containing the version and date of latest compatibel version
183 */
184 public function getLatestCompatibleVersion($releases)
185 {
186 foreach ($releases as $release) {
187 $phpVersions = $release->php_versions;
188 $phpConditions = explode(",", $phpVersions);
189 foreach ($phpConditions as $phpCondition) {
190 if (! $this->evaluateVersionCondition("PHP", $phpCondition)) {
191 continue 2;
192 }
193 }
194
195 // We evalute MySQL version constraint if there are only
196 // one server configured.
197 if (count($GLOBALS['cfg']['Servers']) == 1) {
198 $mysqlVersions = $release->mysql_versions;
199 $mysqlConditions = explode(",", $mysqlVersions);
200 foreach ($mysqlConditions as $mysqlCondition) {
201 if (! $this->evaluateVersionCondition('MySQL', $mysqlCondition)) {
202 continue 2;
203 }
204 }
205 }
206
207 return array(
208 'version' => $release->version,
209 'date' => $release->date,
210 );
211 }
212
213 // no compatible version
214 return null;
215 }
216
217 /**
218 * Checks whether PHP or MySQL version meets supplied version condition
219 *
220 * @param string $type PHP or MySQL
221 * @param string $condition version condition
222 *
223 * @return boolean whether the condition is met
224 */
225 public function evaluateVersionCondition($type, $condition)
226 {
227 $operator = null;
228 $operators = array("<=", ">=", "!=", "<>", "<", ">", "="); // preserve order
229 foreach ($operators as $oneOperator) {
230 if (strpos($condition, $oneOperator) === 0) {
231 $operator = $oneOperator;
232 $version = substr($condition, strlen($oneOperator));
233 break;
234 }
235 }
236
237 $myVersion = null;
238 if ($type == 'PHP') {
239 $myVersion = $this->getPHPVersion();
240 } elseif ($type == 'MySQL') {
241 $myVersion = $this->getMySQLVersion();
242 }
243
244 if ($myVersion != null && $operator != null) {
245 return version_compare($myVersion, $version, $operator);
246 }
247 return false;
248 }
249
250 /**
251 * Returns the PHP version
252 *
253 * @return string PHP version
254 */
255 protected function getPHPVersion()
256 {
257 return PHP_VERSION;
258 }
259
260 /**
261 * Returns the MySQL version
262 *
263 * @return string MySQL version
264 */
265 protected function getMySQLVersion()
266 {
267 return PMA_Util::cacheGet('PMA_MYSQL_STR_VERSION');
268 }
269}
270?>
0\ No newline at end of file271\ No newline at end of file
1272
=== modified file 'libraries/config/messages.inc.php'
--- libraries/config/messages.inc.php 2015-05-11 11:38:33 +0000
+++ libraries/config/messages.inc.php 2015-10-27 17:36:50 +0000
@@ -360,6 +360,7 @@
360$strConfigImport_sql_compatibility_name = __('SQL compatibility mode');360$strConfigImport_sql_compatibility_name = __('SQL compatibility mode');
361$strConfigImport_sql_no_auto_value_on_zero_name361$strConfigImport_sql_no_auto_value_on_zero_name
362 = __('Do not use AUTO_INCREMENT for zero values');362 = __('Do not use AUTO_INCREMENT for zero values');
363$strConfigImport_sql_read_as_multibytes_name = __('Read as multibytes');
363$strConfigImport_xls_col_names_name = __('Column names in first row');364$strConfigImport_xls_col_names_name = __('Column names in first row');
364$strConfigImport_xlsx_col_names_name = __('Column names in first row');365$strConfigImport_xlsx_col_names_name = __('Column names in first row');
365$strConfigInitialSlidersState_name = __('Initial state for sliders');366$strConfigInitialSlidersState_name = __('Initial state for sliders');
366367
=== modified file 'libraries/dbi/DBIDummy.class.php'
--- libraries/dbi/DBIDummy.class.php 2015-04-28 10:31:57 +0000
+++ libraries/dbi/DBIDummy.class.php 2015-10-27 17:36:50 +0000
@@ -26,6 +26,10 @@
26 'result' => array(array('pma_test@localhost')),26 'result' => array(array('pma_test@localhost')),
27 ),27 ),
28 array(28 array(
29 'query' => "SHOW VARIABLES LIKE 'lower_case_table_names'",
30 'result' => array(array('lower_case_table_names', '1'))
31 ),
32 array(
29 'query' => 'SELECT 1 FROM mysql.user LIMIT 1',33 'query' => 'SELECT 1 FROM mysql.user LIMIT 1',
30 'result' => array(array('1')),34 'result' => array(array('1')),
31 ),35 ),
@@ -122,7 +126,7 @@
122 )126 )
123 ),127 ),
124 array(128 array(
125 'query' => 'SHOW VARIABLES LIKE \'language\';',129 'query' => 'SELECT @@lc_messages;',
126 'result' => array(),130 'result' => array(),
127 ),131 ),
128 array(132 array(
@@ -258,7 +262,7 @@
258 . ' `CHECKSUM` AS `Checksum`, `CREATE_OPTIONS` AS `Create_options`,'262 . ' `CHECKSUM` AS `Checksum`, `CREATE_OPTIONS` AS `Create_options`,'
259 . ' `TABLE_COMMENT` AS `Comment`'263 . ' `TABLE_COMMENT` AS `Comment`'
260 . ' FROM `information_schema`.`TABLES` t'264 . ' FROM `information_schema`.`TABLES` t'
261 . ' WHERE BINARY `TABLE_SCHEMA` IN (\'pma_test\')'265 . ' WHERE `TABLE_SCHEMA` IN (\'pma_test\')'
262 . ' AND t.`TABLE_NAME` = \'table1\' ORDER BY Name ASC',266 . ' AND t.`TABLE_NAME` = \'table1\' ORDER BY Name ASC',
263 'columns' => array(267 'columns' => array(
264 'TABLE_CATALOG', 'TABLE_SCHEMA', 'TABLE_NAME', 'TABLE_TYPE', 'ENGINE',268 'TABLE_CATALOG', 'TABLE_SCHEMA', 'TABLE_NAME', 'TABLE_TYPE', 'ENGINE',
265269
=== modified file 'libraries/language_stats.inc.php'
--- libraries/language_stats.inc.php 2015-08-10 10:02:56 +0000
+++ libraries/language_stats.inc.php 2015-10-27 17:36:50 +0000
@@ -16,7 +16,7 @@
16 'ckb' => 20,16 'ckb' => 20,
17 'cs' => 98,17 'cs' => 98,
18 'cy' => 19,18 'cy' => 19,
19 'da' => 99,19 'da' => 100,
20 'de' => 100,20 'de' => 100,
21 'el' => 100,21 'el' => 100,
22 'en_GB' => 88,22 'en_GB' => 88,
@@ -28,12 +28,12 @@
28 'fi' => 63,28 'fi' => 63,
29 'fr' => 100,29 'fr' => 100,
30 'fy' => 21,30 'fy' => 21,
31 'gl' => 76,31 'gl' => 86,
32 'he' => 18,32 'he' => 18,
33 'hi' => 41,33 'hi' => 41,
34 'hr' => 32,34 'hr' => 32,
35 'hu' => 100,35 'hu' => 99,
36 'hy' => 49,36 'hy' => 66,
37 'ia' => 69,37 'ia' => 69,
38 'id' => 76,38 'id' => 76,
39 'it' => 100,39 'it' => 100,
@@ -42,7 +42,7 @@
42 'kk' => 10,42 'kk' => 10,
43 'km' => 5,43 'km' => 5,
44 'kn' => 4,44 'kn' => 4,
45 'ko' => 81,45 'ko' => 82,
46 'ksh' => 1,46 'ksh' => 1,
47 'ky' => 1,47 'ky' => 1,
48 'li' => 1,48 'li' => 1,
@@ -58,15 +58,15 @@
58 'pa' => 2,58 'pa' => 2,
59 'pl' => 86,59 'pl' => 86,
60 'pt' => 59,60 'pt' => 59,
61 'pt_BR' => 100,61 'pt_BR' => 99,
62 'ro' => 59,62 'ro' => 59,
63 'ru' => 99,63 'ru' => 99,
64 'si' => 65,64 'si' => 65,
65 'sk' => 85,65 'sk' => 85,
66 'sl' => 100,66 'sl' => 100,
67 'sq' => 99,67 'sq' => 100,
68 'sr' => 25,68 'sr' => 25,
69 'sr@latin' => 50,69 'sr@latin' => 49,
70 'sv' => 88,70 'sv' => 88,
71 'ta' => 38,71 'ta' => 38,
72 'te' => 10,72 'te' => 10,
@@ -81,7 +81,7 @@
81 'uz@latin' => 35,81 'uz@latin' => 35,
82 'vi' => 2,82 'vi' => 2,
83 'vls' => 3,83 'vls' => 3,
84 'zh_CN' => 80,84 'zh_CN' => 82,
85 'zh_TW' => 99,85 'zh_TW' => 99,
86);86);
87?>87?>
8888
=== modified file 'libraries/phpseclib/Crypt/AES.php'
--- libraries/phpseclib/Crypt/AES.php 2015-04-28 10:31:57 +0000
+++ libraries/phpseclib/Crypt/AES.php 2015-10-27 17:36:50 +0000
@@ -5,23 +5,27 @@
5 *5 *
6 * Uses mcrypt, if available/possible, and an internal implementation, otherwise.6 * Uses mcrypt, if available/possible, and an internal implementation, otherwise.
7 *7 *
8 * PHP versions 4 and 58 * PHP version 5
9 *9 *
10 * If {@link Crypt_AES::setKeyLength() setKeyLength()} isn't called, it'll be calculated from10 * NOTE: Since AES.php is (for compatibility and phpseclib-historical reasons) virtually
11 * {@link Crypt_AES::setKey() setKey()}. ie. if the key is 128-bits, the key length will be 128-bits. If it's 136-bits11 * just a wrapper to Rijndael.php you may consider using Rijndael.php instead of
12 * it'll be null-padded to 192-bits and 192 bits will be the key length until {@link Crypt_AES::setKey() setKey()}12 * to save one include_once().
13 *
14 * If {@link \phpseclib\Crypt\AES::setKeyLength() setKeyLength()} isn't called, it'll be calculated from
15 * {@link \phpseclib\Crypt\AES::setKey() setKey()}. ie. if the key is 128-bits, the key length will be 128-bits. If it's 136-bits
16 * it'll be null-padded to 192-bits and 192 bits will be the key length until {@link \phpseclib\Crypt\AES::setKey() setKey()}
13 * is called, again, at which point, it'll be recalculated.17 * is called, again, at which point, it'll be recalculated.
14 *18 *
15 * Since Crypt_AES extends Crypt_Rijndael, some functions are available to be called that, in the context of AES, don't19 * Since \phpseclib\Crypt\AES extends \phpseclib\Crypt\Rijndael, some functions are available to be called that, in the context of AES, don't
16 * make a whole lot of sense. {@link Crypt_AES::setBlockLength() setBlockLength()}, for instance. Calling that function,20 * make a whole lot of sense. {@link \phpseclib\Crypt\AES::setBlockLength() setBlockLength()}, for instance. Calling that function,
17 * however possible, won't do anything (AES has a fixed block length whereas Rijndael has a variable one).21 * however possible, won't do anything (AES has a fixed block length whereas Rijndael has a variable one).
18 *22 *
19 * Here's a short example of how to use this library:23 * Here's a short example of how to use this library:
20 * <code>24 * <code>
21 * <?php25 * <?php
22 * include 'Crypt/AES.php';26 * include 'vendor/autoload.php';
23 *27 *
24 * $aes = new Crypt_AES();28 * $aes = new \phpseclib\Crypt\AES();
25 *29 *
26 * $aes->setKey('abcdefghijklmnop');30 * $aes->setKey('abcdefghijklmnop');
27 *31 *
@@ -35,145 +39,33 @@
35 * ?>39 * ?>
36 * </code>40 * </code>
37 *41 *
38 * LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy
39 * of this software and associated documentation files (the "Software"), to deal
40 * in the Software without restriction, including without limitation the rights
41 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
42 * copies of the Software, and to permit persons to whom the Software is
43 * furnished to do so, subject to the following conditions:
44 *
45 * The above copyright notice and this permission notice shall be included in
46 * all copies or substantial portions of the Software.
47 *
48 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
49 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
50 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
51 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
52 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
53 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
54 * THE SOFTWARE.
55 *
56 * @category Crypt42 * @category Crypt
57 * @package Crypt_AES43 * @package AES
58 * @author Jim Wigginton <terrafrost@php.net>44 * @author Jim Wigginton <terrafrost@php.net>
59 * @copyright MMVIII Jim Wigginton45 * @copyright 2008 Jim Wigginton
60 * @license http://www.opensource.org/licenses/mit-license.html MIT License46 * @license http://www.opensource.org/licenses/mit-license.html MIT License
61 * @link http://phpseclib.sourceforge.net47 * @link http://phpseclib.sourceforge.net
62 */48 */
6349
64/**50namespace phpseclib\Crypt;
65 * Include Crypt_Rijndael51
66 */52use phpseclib\Crypt\Rijndael;
67if (!class_exists('Crypt_Rijndael')) {
68 include_once 'Rijndael.php';
69}
70
71/**#@+
72 * @access public
73 * @see Crypt_AES::encrypt()
74 * @see Crypt_AES::decrypt()
75 */
76/**
77 * Encrypt / decrypt using the Counter mode.
78 *
79 * Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.
80 *
81 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Counter_.28CTR.29
82 */
83define('CRYPT_AES_MODE_CTR', CRYPT_MODE_CTR);
84/**
85 * Encrypt / decrypt using the Electronic Code Book mode.
86 *
87 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29
88 */
89define('CRYPT_AES_MODE_ECB', CRYPT_MODE_ECB);
90/**
91 * Encrypt / decrypt using the Code Book Chaining mode.
92 *
93 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher-block_chaining_.28CBC.29
94 */
95define('CRYPT_AES_MODE_CBC', CRYPT_MODE_CBC);
96/**
97 * Encrypt / decrypt using the Cipher Feedback mode.
98 *
99 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher_feedback_.28CFB.29
100 */
101define('CRYPT_AES_MODE_CFB', CRYPT_MODE_CFB);
102/**
103 * Encrypt / decrypt using the Cipher Feedback mode.
104 *
105 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Output_feedback_.28OFB.29
106 */
107define('CRYPT_AES_MODE_OFB', CRYPT_MODE_OFB);
108/**#@-*/
109
110/**#@+
111 * @access private
112 * @see Crypt_AES::Crypt_AES()
113 */
114/**
115 * Toggles the internal implementation
116 */
117define('CRYPT_AES_MODE_INTERNAL', CRYPT_MODE_INTERNAL);
118/**
119 * Toggles the mcrypt implementation
120 */
121define('CRYPT_AES_MODE_MCRYPT', CRYPT_MODE_MCRYPT);
122/**#@-*/
12353
124/**54/**
125 * Pure-PHP implementation of AES.55 * Pure-PHP implementation of AES.
126 *56 *
127 * @package Crypt_AES57 * @package AES
128 * @author Jim Wigginton <terrafrost@php.net>58 * @author Jim Wigginton <terrafrost@php.net>
129 * @access public59 * @access public
130 */60 */
131class Crypt_AES extends Crypt_Rijndael61class AES extends Rijndael
132{62{
133 /**63 /**
134 * The namespace used by the cipher for its constants.
135 *
136 * @see Crypt_Base::const_namespace
137 * @var String
138 * @access private
139 */
140 var $const_namespace = 'AES';
141
142 /**
143 * Default Constructor.
144 *
145 * Determines whether or not the mcrypt extension should be used.
146 *
147 * $mode could be:
148 *
149 * - CRYPT_AES_MODE_ECB
150 *
151 * - CRYPT_AES_MODE_CBC
152 *
153 * - CRYPT_AES_MODE_CTR
154 *
155 * - CRYPT_AES_MODE_CFB
156 *
157 * - CRYPT_AES_MODE_OFB
158 *
159 * If not explicitly set, CRYPT_AES_MODE_CBC will be used.
160 *
161 * @see Crypt_Rijndael::Crypt_Rijndael()
162 * @see Crypt_Base::Crypt_Base()
163 * @param optional Integer $mode
164 * @access public
165 */
166 function Crypt_AES($mode = CRYPT_AES_MODE_CBC)
167 {
168 parent::Crypt_Rijndael($mode);
169 }
170
171 /**
172 * Dummy function64 * Dummy function
173 *65 *
174 * Since Crypt_AES extends Crypt_Rijndael, this function is, technically, available, but it doesn't do anything.66 * Since \phpseclib\Crypt\AES extends \phpseclib\Crypt\Rijndael, this function is, technically, available, but it doesn't do anything.
175 *67 *
176 * @see Crypt_Rijndael::setBlockLength()68 * @see \phpseclib\Crypt\Rijndael::setBlockLength()
177 * @access public69 * @access public
178 * @param Integer $length70 * @param Integer $length
179 */71 */
@@ -181,4 +73,56 @@
181 {73 {
182 return;74 return;
183 }75 }
76
77 /**
78 * Sets the key length
79 *
80 * Valid key lengths are 128, 192, and 256. If the length is less than 128, it will be rounded up to
81 * 128. If the length is greater than 128 and invalid, it will be rounded down to the closest valid amount.
82 *
83 * @see \phpseclib\Crypt\Rijndael:setKeyLength()
84 * @access public
85 * @param Integer $length
86 */
87 function setKeyLength($length)
88 {
89 switch ($length) {
90 case 160:
91 $length = 192;
92 break;
93 case 224:
94 $length = 256;
95 }
96 parent::setKeyLength($length);
97 }
98
99 /**
100 * Sets the key.
101 *
102 * Rijndael supports five different key lengths, AES only supports three.
103 *
104 * @see \phpseclib\Crypt\Rijndael:setKey()
105 * @see setKeyLength()
106 * @access public
107 * @param String $key
108 */
109 function setKey($key)
110 {
111 parent::setKey($key);
112
113 if (!$this->explicit_key_length) {
114 $length = strlen($key);
115 switch (true) {
116 case $length <= 16:
117 $this->key_size = 16;
118 break;
119 case $length <= 24:
120 $this->key_size = 24;
121 break;
122 default:
123 $this->key_size = 32;
124 }
125 $this->_setEngine();
126 }
127 }
184}128}
185129
=== modified file 'libraries/phpseclib/Crypt/Base.php'
--- libraries/phpseclib/Crypt/Base.php 2015-04-28 10:31:57 +0000
+++ libraries/phpseclib/Crypt/Base.php 2015-10-27 17:36:50 +0000
@@ -1,14 +1,14 @@
1<?php1<?php
22
3/**3/**
4 * Base Class for all Crypt_* cipher classes4 * Base Class for all \phpseclib\Crypt\* cipher classes
5 *5 *
6 * PHP versions 4 and 56 * PHP version 5
7 *7 *
8 * Internally for phpseclib developers:8 * Internally for phpseclib developers:
9 * If you plan to add a new cipher class, please note following rules:9 * If you plan to add a new cipher class, please note following rules:
10 *10 *
11 * - The new Crypt_* cipher class should extend Crypt_Base11 * - The new \phpseclib\Crypt\* cipher class should extend \phpseclib\Crypt\Base
12 *12 *
13 * - Following methods are then required to be overridden/overloaded:13 * - Following methods are then required to be overridden/overloaded:
14 *14 *
@@ -20,110 +20,107 @@
20 *20 *
21 * - All other methods are optional to be overridden/overloaded21 * - All other methods are optional to be overridden/overloaded
22 *22 *
23 * - Look at the source code of the current ciphers how they extend Crypt_Base23 * - Look at the source code of the current ciphers how they extend \phpseclib\Crypt\Base
24 * and take one of them as a start up for the new cipher class.24 * and take one of them as a start up for the new cipher class.
25 *25 *
26 * - Please read all the other comments/notes/hints here also for each class var/method26 * - Please read all the other comments/notes/hints here also for each class var/method
27 *27 *
28 * LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy
29 * of this software and associated documentation files (the "Software"), to deal
30 * in the Software without restriction, including without limitation the rights
31 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32 * copies of the Software, and to permit persons to whom the Software is
33 * furnished to do so, subject to the following conditions:
34 *
35 * The above copyright notice and this permission notice shall be included in
36 * all copies or substantial portions of the Software.
37 *
38 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
42 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
44 * THE SOFTWARE.
45 *
46 * @category Crypt28 * @category Crypt
47 * @package Crypt_Base29 * @package Base
48 * @author Jim Wigginton <terrafrost@php.net>30 * @author Jim Wigginton <terrafrost@php.net>
49 * @author Hans-Juergen Petrich <petrich@tronic-media.com>31 * @author Hans-Juergen Petrich <petrich@tronic-media.com>
50 * @copyright MMVII Jim Wigginton32 * @copyright 2007 Jim Wigginton
51 * @license http://www.opensource.org/licenses/mit-license.html MIT License33 * @license http://www.opensource.org/licenses/mit-license.html MIT License
52 * @link http://phpseclib.sourceforge.net34 * @link http://phpseclib.sourceforge.net
53 */35 */
5436
55/**#@+37namespace phpseclib\Crypt;
56 * @access public38
57 * @see Crypt_Base::encrypt()39use phpseclib\Crypt\Hash;
58 * @see Crypt_Base::decrypt()40
59 */41/**
60/**42 * Base Class for all \phpseclib\Crypt\* cipher classes
61 * Encrypt / decrypt using the Counter mode.43 *
62 *44 * @package Base
63 * Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.
64 *
65 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Counter_.28CTR.29
66 */
67define('CRYPT_MODE_CTR', -1);
68/**
69 * Encrypt / decrypt using the Electronic Code Book mode.
70 *
71 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29
72 */
73define('CRYPT_MODE_ECB', 1);
74/**
75 * Encrypt / decrypt using the Code Book Chaining mode.
76 *
77 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher-block_chaining_.28CBC.29
78 */
79define('CRYPT_MODE_CBC', 2);
80/**
81 * Encrypt / decrypt using the Cipher Feedback mode.
82 *
83 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher_feedback_.28CFB.29
84 */
85define('CRYPT_MODE_CFB', 3);
86/**
87 * Encrypt / decrypt using the Output Feedback mode.
88 *
89 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Output_feedback_.28OFB.29
90 */
91define('CRYPT_MODE_OFB', 4);
92/**
93 * Encrypt / decrypt using streaming mode.
94 *
95 */
96define('CRYPT_MODE_STREAM', 5);
97/**#@-*/
98
99/**#@+
100 * @access private
101 * @see Crypt_Base::Crypt_Base()
102 */
103/**
104 * Base value for the internal implementation $engine switch
105 */
106define('CRYPT_MODE_INTERNAL', 1);
107/**
108 * Base value for the mcrypt implementation $engine switch
109 */
110define('CRYPT_MODE_MCRYPT', 2);
111/**#@-*/
112
113/**
114 * Base Class for all Crypt_* cipher classes
115 *
116 * @package Crypt_Base
117 * @author Jim Wigginton <terrafrost@php.net>45 * @author Jim Wigginton <terrafrost@php.net>
118 * @author Hans-Juergen Petrich <petrich@tronic-media.com>46 * @author Hans-Juergen Petrich <petrich@tronic-media.com>
119 * @access public
120 */47 */
121class Crypt_Base48abstract class Base
122{49{
50 /**#@+
51 * @access public
52 * @see \phpseclib\Crypt\Base::encrypt()
53 * @see \phpseclib\Crypt\Base::decrypt()
54 */
55 /**
56 * Encrypt / decrypt using the Counter mode.
57 *
58 * Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.
59 *
60 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Counter_.28CTR.29
61 */
62 const MODE_CTR = -1;
63 /**
64 * Encrypt / decrypt using the Electronic Code Book mode.
65 *
66 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29
67 */
68 const MODE_ECB = 1;
69 /**
70 * Encrypt / decrypt using the Code Book Chaining mode.
71 *
72 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher-block_chaining_.28CBC.29
73 */
74 const MODE_CBC = 2;
75 /**
76 * Encrypt / decrypt using the Cipher Feedback mode.
77 *
78 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher_feedback_.28CFB.29
79 */
80 const MODE_CFB = 3;
81 /**
82 * Encrypt / decrypt using the Output Feedback mode.
83 *
84 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Output_feedback_.28OFB.29
85 */
86 const MODE_OFB = 4;
87 /**
88 * Encrypt / decrypt using streaming mode.
89 */
90 const MODE_STREAM = 5;
91 /**#@-*/
92
93 /**
94 * Whirlpool available flag
95 *
96 * @see \phpseclib\Crypt\Base::_hashInlineCryptFunction()
97 * @var Boolean
98 * @access private
99 */
100 static $WHIRLPOOL_AVAILABLE;
101
102 /**#@+
103 * @access private
104 * @see \phpseclib\Crypt\Base::__construct()
105 */
106 /**
107 * Base value for the internal implementation $engine switch
108 */
109 const ENGINE_INTERNAL = 1;
110 /**
111 * Base value for the mcrypt implementation $engine switch
112 */
113 const ENGINE_MCRYPT = 2;
114 /**
115 * Base value for the mcrypt implementation $engine switch
116 */
117 const ENGINE_OPENSSL = 3;
118 /**#@-*/
119
123 /**120 /**
124 * The Encryption Mode121 * The Encryption Mode
125 *122 *
126 * @see Crypt_Base::Crypt_Base()123 * @see \phpseclib\Crypt\Base::__construct()
127 * @var Integer124 * @var Integer
128 * @access private125 * @access private
129 */126 */
@@ -140,7 +137,7 @@
140 /**137 /**
141 * The Key138 * The Key
142 *139 *
143 * @see Crypt_Base::setKey()140 * @see \phpseclib\Crypt\Base::setKey()
144 * @var String141 * @var String
145 * @access private142 * @access private
146 */143 */
@@ -149,7 +146,7 @@
149 /**146 /**
150 * The Initialization Vector147 * The Initialization Vector
151 *148 *
152 * @see Crypt_Base::setIV()149 * @see \phpseclib\Crypt\Base::setIV()
153 * @var String150 * @var String
154 * @access private151 * @access private
155 */152 */
@@ -158,8 +155,8 @@
158 /**155 /**
159 * A "sliding" Initialization Vector156 * A "sliding" Initialization Vector
160 *157 *
161 * @see Crypt_Base::enableContinuousBuffer()158 * @see \phpseclib\Crypt\Base::enableContinuousBuffer()
162 * @see Crypt_Base::_clearBuffers()159 * @see \phpseclib\Crypt\Base::_clearBuffers()
163 * @var String160 * @var String
164 * @access private161 * @access private
165 */162 */
@@ -168,8 +165,8 @@
168 /**165 /**
169 * A "sliding" Initialization Vector166 * A "sliding" Initialization Vector
170 *167 *
171 * @see Crypt_Base::enableContinuousBuffer()168 * @see \phpseclib\Crypt\Base::enableContinuousBuffer()
172 * @see Crypt_Base::_clearBuffers()169 * @see \phpseclib\Crypt\Base::_clearBuffers()
173 * @var String170 * @var String
174 * @access private171 * @access private
175 */172 */
@@ -178,7 +175,7 @@
178 /**175 /**
179 * Continuous Buffer status176 * Continuous Buffer status
180 *177 *
181 * @see Crypt_Base::enableContinuousBuffer()178 * @see \phpseclib\Crypt\Base::enableContinuousBuffer()
182 * @var Boolean179 * @var Boolean
183 * @access private180 * @access private
184 */181 */
@@ -187,8 +184,8 @@
187 /**184 /**
188 * Encryption buffer for CTR, OFB and CFB modes185 * Encryption buffer for CTR, OFB and CFB modes
189 *186 *
190 * @see Crypt_Base::encrypt()187 * @see \phpseclib\Crypt\Base::encrypt()
191 * @see Crypt_Base::_clearBuffers()188 * @see \phpseclib\Crypt\Base::_clearBuffers()
192 * @var Array189 * @var Array
193 * @access private190 * @access private
194 */191 */
@@ -197,8 +194,8 @@
197 /**194 /**
198 * Decryption buffer for CTR, OFB and CFB modes195 * Decryption buffer for CTR, OFB and CFB modes
199 *196 *
200 * @see Crypt_Base::decrypt()197 * @see \phpseclib\Crypt\Base::decrypt()
201 * @see Crypt_Base::_clearBuffers()198 * @see \phpseclib\Crypt\Base::_clearBuffers()
202 * @var Array199 * @var Array
203 * @access private200 * @access private
204 */201 */
@@ -210,7 +207,7 @@
210 * The mcrypt resource can be recreated every time something needs to be created or it can be created just once.207 * The mcrypt resource can be recreated every time something needs to be created or it can be created just once.
211 * Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode.208 * Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode.
212 *209 *
213 * @see Crypt_Base::encrypt()210 * @see \phpseclib\Crypt\Base::encrypt()
214 * @var Resource211 * @var Resource
215 * @access private212 * @access private
216 */213 */
@@ -222,7 +219,7 @@
222 * The mcrypt resource can be recreated every time something needs to be created or it can be created just once.219 * The mcrypt resource can be recreated every time something needs to be created or it can be created just once.
223 * Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode.220 * Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode.
224 *221 *
225 * @see Crypt_Base::decrypt()222 * @see \phpseclib\Crypt\Base::decrypt()
226 * @var Resource223 * @var Resource
227 * @access private224 * @access private
228 */225 */
@@ -231,8 +228,8 @@
231 /**228 /**
232 * Does the enmcrypt resource need to be (re)initialized?229 * Does the enmcrypt resource need to be (re)initialized?
233 *230 *
234 * @see Crypt_Twofish::setKey()231 * @see \phpseclib\Crypt\Twofish::setKey()
235 * @see Crypt_Twofish::setIV()232 * @see \phpseclib\Crypt\Twofish::setIV()
236 * @var Boolean233 * @var Boolean
237 * @access private234 * @access private
238 */235 */
@@ -241,8 +238,8 @@
241 /**238 /**
242 * Does the demcrypt resource need to be (re)initialized?239 * Does the demcrypt resource need to be (re)initialized?
243 *240 *
244 * @see Crypt_Twofish::setKey()241 * @see \phpseclib\Crypt\Twofish::setKey()
245 * @see Crypt_Twofish::setIV()242 * @see \phpseclib\Crypt\Twofish::setIV()
246 * @var Boolean243 * @var Boolean
247 * @access private244 * @access private
248 */245 */
@@ -259,9 +256,9 @@
259 * use a separate ECB-mode mcrypt resource.256 * use a separate ECB-mode mcrypt resource.
260 *257 *
261 * @link http://phpseclib.sourceforge.net/cfb-demo.phps258 * @link http://phpseclib.sourceforge.net/cfb-demo.phps
262 * @see Crypt_Base::encrypt()259 * @see \phpseclib\Crypt\Base::encrypt()
263 * @see Crypt_Base::decrypt()260 * @see \phpseclib\Crypt\Base::decrypt()
264 * @see Crypt_Base::_setupMcrypt()261 * @see \phpseclib\Crypt\Base::_setupMcrypt()
265 * @var Resource262 * @var Resource
266 * @access private263 * @access private
267 */264 */
@@ -271,7 +268,7 @@
271 * Optimizing value while CFB-encrypting268 * Optimizing value while CFB-encrypting
272 *269 *
273 * Only relevant if $continuousBuffer enabled270 * Only relevant if $continuousBuffer enabled
274 * and $engine == CRYPT_MODE_MCRYPT271 * and $engine == self::ENGINE_MCRYPT
275 *272 *
276 * It's faster to re-init $enmcrypt if273 * It's faster to re-init $enmcrypt if
277 * $buffer bytes > $cfb_init_len than274 * $buffer bytes > $cfb_init_len than
@@ -283,7 +280,7 @@
283 * which, typically, depends on the complexity280 * which, typically, depends on the complexity
284 * on its internaly Key-expanding algorithm.281 * on its internaly Key-expanding algorithm.
285 *282 *
286 * @see Crypt_Base::encrypt()283 * @see \phpseclib\Crypt\Base::encrypt()
287 * @var Integer284 * @var Integer
288 * @access private285 * @access private
289 */286 */
@@ -303,7 +300,7 @@
303 /**300 /**
304 * Padding status301 * Padding status
305 *302 *
306 * @see Crypt_Base::enablePadding()303 * @see \phpseclib\Crypt\Base::enablePadding()
307 * @var Boolean304 * @var Boolean
308 * @access private305 * @access private
309 */306 */
@@ -312,7 +309,7 @@
312 /**309 /**
313 * Is the mode one that is paddable?310 * Is the mode one that is paddable?
314 *311 *
315 * @see Crypt_Base::Crypt_Base()312 * @see \phpseclib\Crypt\Base::__construct()
316 * @var Boolean313 * @var Boolean
317 * @access private314 * @access private
318 */315 */
@@ -323,39 +320,68 @@
323 * which will be determined automatically on __construct()320 * which will be determined automatically on __construct()
324 *321 *
325 * Currently available $engines are:322 * Currently available $engines are:
326 * - CRYPT_MODE_MCRYPT (fast, php-extension: mcrypt, extension_loaded('mcrypt') required)323 * - self::ENGINE_OPENSSL (very fast, php-extension: openssl, extension_loaded('openssl') required)
327 * - CRYPT_MODE_INTERNAL (slower, pure php-engine, no php-extension required)324 * - self::ENGINE_MCRYPT (fast, php-extension: mcrypt, extension_loaded('mcrypt') required)
328 *325 * - self::ENGINE_INTERNAL (slower, pure php-engine, no php-extension required)
329 * In the pipeline... maybe. But currently not available:326 *
330 * - CRYPT_MODE_OPENSSL (very fast, php-extension: openssl, extension_loaded('openssl') required)327 * @see \phpseclib\Crypt\Base::_setEngine()
331 *328 * @see \phpseclib\Crypt\Base::encrypt()
332 * If possible, CRYPT_MODE_MCRYPT will be used for each cipher.329 * @see \phpseclib\Crypt\Base::decrypt()
333 * Otherwise CRYPT_MODE_INTERNAL
334 *
335 * @see Crypt_Base::encrypt()
336 * @see Crypt_Base::decrypt()
337 * @var Integer330 * @var Integer
338 * @access private331 * @access private
339 */332 */
340 var $engine;333 var $engine;
341334
342 /**335 /**
336 * Holds the preferred crypt engine
337 *
338 * @see \phpseclib\Crypt\Base::_setEngine()
339 * @see \phpseclib\Crypt\Base::setPreferredEngine()
340 * @var Integer
341 * @access private
342 */
343 var $preferredEngine;
344
345 /**
343 * The mcrypt specific name of the cipher346 * The mcrypt specific name of the cipher
344 *347 *
345 * Only used if $engine == CRYPT_MODE_MCRYPT348 * Only used if $engine == self::ENGINE_MCRYPT
346 *349 *
347 * @link http://www.php.net/mcrypt_module_open350 * @link http://www.php.net/mcrypt_module_open
348 * @link http://www.php.net/mcrypt_list_algorithms351 * @link http://www.php.net/mcrypt_list_algorithms
349 * @see Crypt_Base::_setupMcrypt()352 * @see \phpseclib\Crypt\Base::_setupMcrypt()
350 * @var String353 * @var String
351 * @access private354 * @access private
352 */355 */
353 var $cipher_name_mcrypt;356 var $cipher_name_mcrypt;
354357
355 /**358 /**
359 * The openssl specific name of the cipher
360 *
361 * Only used if $engine == CRYPT_ENGINE_OPENSSL
362 *
363 * @link http://www.php.net/openssl-get-cipher-methods
364 * @var String
365 * @access private
366 */
367 var $cipher_name_openssl;
368
369 /**
370 * The openssl specific name of the cipher in ECB mode
371 *
372 * If OpenSSL does not support the mode we're trying to use (CTR)
373 * it can still be emulated with ECB mode.
374 *
375 * @link http://www.php.net/openssl-get-cipher-methods
376 * @var String
377 * @access private
378 */
379 var $cipher_name_openssl_ecb;
380
381 /**
356 * The default password key_size used by setPassword()382 * The default password key_size used by setPassword()
357 *383 *
358 * @see Crypt_Base::setPassword()384 * @see \phpseclib\Crypt\Base::setPassword()
359 * @var Integer385 * @var Integer
360 * @access private386 * @access private
361 */387 */
@@ -364,45 +390,22 @@
364 /**390 /**
365 * The default salt used by setPassword()391 * The default salt used by setPassword()
366 *392 *
367 * @see Crypt_Base::setPassword()393 * @see \phpseclib\Crypt\Base::setPassword()
368 * @var String394 * @var String
369 * @access private395 * @access private
370 */396 */
371 var $password_default_salt = 'phpseclib/salt';397 var $password_default_salt = 'phpseclib/salt';
372398
373 /**399 /**
374 * The namespace used by the cipher for its constants.
375 *
376 * ie: AES.php is using CRYPT_AES_MODE_* for its constants
377 * so $const_namespace is AES
378 *
379 * DES.php is using CRYPT_DES_MODE_* for its constants
380 * so $const_namespace is DES... and so on
381 *
382 * All CRYPT_<$const_namespace>_MODE_* are aliases of
383 * the generic CRYPT_MODE_* constants, so both could be used
384 * for each cipher.
385 *
386 * Example:
387 * $aes = new Crypt_AES(CRYPT_AES_MODE_CFB); // $aes will operate in cfb mode
388 * $aes = new Crypt_AES(CRYPT_MODE_CFB); // identical
389 *
390 * @see Crypt_Base::Crypt_Base()
391 * @var String
392 * @access private
393 */
394 var $const_namespace;
395
396 /**
397 * The name of the performance-optimized callback function400 * The name of the performance-optimized callback function
398 *401 *
399 * Used by encrypt() / decrypt()402 * Used by encrypt() / decrypt()
400 * only if $engine == CRYPT_MODE_INTERNAL403 * only if $engine == self::ENGINE_INTERNAL
401 *404 *
402 * @see Crypt_Base::encrypt()405 * @see \phpseclib\Crypt\Base::encrypt()
403 * @see Crypt_Base::decrypt()406 * @see \phpseclib\Crypt\Base::decrypt()
404 * @see Crypt_Base::_setupInlineCrypt()407 * @see \phpseclib\Crypt\Base::_setupInlineCrypt()
405 * @see Crypt_Base::$use_inline_crypt408 * @see \phpseclib\Crypt\Base::$use_inline_crypt
406 * @var Callback409 * @var Callback
407 * @access private410 * @access private
408 */411 */
@@ -411,84 +414,78 @@
411 /**414 /**
412 * Holds whether performance-optimized $inline_crypt() can/should be used.415 * Holds whether performance-optimized $inline_crypt() can/should be used.
413 *416 *
414 * @see Crypt_Base::encrypt()417 * @see \phpseclib\Crypt\Base::encrypt()
415 * @see Crypt_Base::decrypt()418 * @see \phpseclib\Crypt\Base::decrypt()
416 * @see Crypt_Base::inline_crypt419 * @see \phpseclib\Crypt\Base::inline_crypt
417 * @var mixed420 * @var mixed
418 * @access private421 * @access private
419 */422 */
420 var $use_inline_crypt;423 var $use_inline_crypt;
421424
422 /**425 /**
426 * If OpenSSL can be used in ECB but not in CTR we can emulate CTR
427 *
428 * @see \phpseclib\Crypt\Base::_openssl_ctr_process()
429 * @var Boolean
430 * @access private
431 */
432 var $openssl_emulate_ctr = false;
433
434 /**
435 * Determines what options are passed to openssl_encrypt/decrypt
436 *
437 * @see \phpseclib\Crypt\Base::isValidEngine()
438 * @var mixed
439 * @access private
440 */
441 var $openssl_options;
442
443 /**
423 * Default Constructor.444 * Default Constructor.
424 *445 *
425 * Determines whether or not the mcrypt extension should be used.446 * Determines whether or not the mcrypt extension should be used.
426 *447 *
427 * $mode could be:448 * $mode could be:
428 *449 *
429 * - CRYPT_MODE_ECB450 * - self::MODE_ECB
430 *451 *
431 * - CRYPT_MODE_CBC452 * - self::MODE_CBC
432 *453 *
433 * - CRYPT_MODE_CTR454 * - self::MODE_CTR
434 *455 *
435 * - CRYPT_MODE_CFB456 * - self::MODE_CFB
436 *457 *
437 * - CRYPT_MODE_OFB458 * - self::MODE_OFB
438 *459 *
439 * (or the alias constants of the chosen cipher, for example for AES: CRYPT_AES_MODE_ECB or CRYPT_AES_MODE_CBC ...)460 * (or the alias constants of the chosen cipher, for example for AES: CRYPT_AES_MODE_ECB or CRYPT_AES_MODE_CBC ...)
440 *461 *
441 * If not explicitly set, CRYPT_MODE_CBC will be used.462 * If not explicitly set, self::MODE_CBC will be used.
442 *463 *
443 * @param optional Integer $mode464 * @param optional Integer $mode
444 * @access public465 * @access public
445 */466 */
446 function Crypt_Base($mode = CRYPT_MODE_CBC)467 function __construct($mode = self::MODE_CBC)
447 {468 {
448 $const_crypt_mode = 'CRYPT_' . $this->const_namespace . '_MODE';
449
450 // Determining the availibility of mcrypt support for the cipher
451 if (!defined($const_crypt_mode)) {
452 switch (true) {
453 case extension_loaded('mcrypt') && in_array($this->cipher_name_mcrypt, mcrypt_list_algorithms()):
454 define($const_crypt_mode, CRYPT_MODE_MCRYPT);
455 break;
456 default:
457 define($const_crypt_mode, CRYPT_MODE_INTERNAL);
458 }
459 }
460
461 // Determining which internal $engine should be used.
462 // The fastes possible first.
463 switch (true) {
464 case empty($this->cipher_name_mcrypt): // The cipher module has no mcrypt-engine support at all so we force CRYPT_MODE_INTERNAL
465 $this->engine = CRYPT_MODE_INTERNAL;
466 break;
467 case constant($const_crypt_mode) == CRYPT_MODE_MCRYPT:
468 $this->engine = CRYPT_MODE_MCRYPT;
469 break;
470 default:
471 $this->engine = CRYPT_MODE_INTERNAL;
472 }
473
474 // $mode dependent settings469 // $mode dependent settings
475 switch ($mode) {470 switch ($mode) {
476 case CRYPT_MODE_ECB:471 case self::MODE_ECB:
477 $this->paddable = true;472 $this->paddable = true;
478 $this->mode = $mode;473 $this->mode = self::MODE_ECB;
479 break;474 break;
480 case CRYPT_MODE_CTR:475 case self::MODE_CTR:
481 case CRYPT_MODE_CFB:476 case self::MODE_CFB:
482 case CRYPT_MODE_OFB:477 case self::MODE_OFB:
483 case CRYPT_MODE_STREAM:478 case self::MODE_STREAM:
484 $this->mode = $mode;479 $this->mode = $mode;
485 break;480 break;
486 case CRYPT_MODE_CBC:481 case self::MODE_CBC:
487 default:482 default:
488 $this->paddable = true;483 $this->paddable = true;
489 $this->mode = CRYPT_MODE_CBC;484 $this->mode = self::MODE_CBC;
490 }485 }
491486
487 $this->_setEngine();
488
492 // Determining whether inline crypting can be used by the cipher489 // Determining whether inline crypting can be used by the cipher
493 if ($this->use_inline_crypt !== false && function_exists('create_function')) {490 if ($this->use_inline_crypt !== false && function_exists('create_function')) {
494 $this->use_inline_crypt = true;491 $this->use_inline_crypt = true;
@@ -498,17 +495,16 @@
498 /**495 /**
499 * Sets the initialization vector. (optional)496 * Sets the initialization vector. (optional)
500 *497 *
501 * SetIV is not required when CRYPT_MODE_ECB (or ie for AES: CRYPT_AES_MODE_ECB) is being used. If not explicitly set, it'll be assumed498 * SetIV is not required when self::MODE_ECB (or ie for AES: \phpseclib\Crypt\AES::MODE_ECB) is being used. If not explicitly set, it'll be assumed
502 * to be all zero's.499 * to be all zero's.
503 *500 *
504 * Note: Could, but not must, extend by the child Crypt_* class
505 *
506 * @access public501 * @access public
507 * @param String $iv502 * @param String $iv
503 * @internal Can be overwritten by a sub class, but does not have to be
508 */504 */
509 function setIV($iv)505 function setIV($iv)
510 {506 {
511 if ($this->mode == CRYPT_MODE_ECB) {507 if ($this->mode == self::MODE_ECB) {
512 return;508 return;
513 }509 }
514510
@@ -526,39 +522,39 @@
526 *522 *
527 * If the key is not explicitly set, it'll be assumed to be all null bytes.523 * If the key is not explicitly set, it'll be assumed to be all null bytes.
528 *524 *
529 * Note: Could, but not must, extend by the child Crypt_* class
530 *
531 * @access public525 * @access public
532 * @param String $key526 * @param String $key
527 * @internal Could, but not must, extend by the child Crypt_* class
533 */528 */
534 function setKey($key)529 function setKey($key)
535 {530 {
536 $this->key = $key;531 $this->key = $key;
537 $this->changed = true;532 $this->changed = true;
533 $this->_setEngine();
538 }534 }
539535
540 /**536 /**
541 * Sets the password.537 * Sets the password.
542 *538 *
543 * Depending on what $method is set to, setPassword()'s (optional) parameters are as follows:539 * Depending on what $method is set to, setPassword()'s (optional) parameters are as follows:
544 * {@link http://en.wikipedia.org/wiki/PBKDF2 pbkdf2}:540 * {@link http://en.wikipedia.org/wiki/PBKDF2 pbkdf2} or pbkdf1:
545 * $hash, $salt, $count, $dkLen541 * $hash, $salt, $count, $dkLen
546 *542 *
547 * Where $hash (default = sha1) currently supports the following hashes: see: Crypt/Hash.php543 * Where $hash (default = sha1) currently supports the following hashes: see: Crypt/Hash.php
548 *544 *
549 * Note: Could, but not must, extend by the child Crypt_* class
550 *
551 * @see Crypt/Hash.php545 * @see Crypt/Hash.php
552 * @param String $password546 * @param String $password
553 * @param optional String $method547 * @param optional String $method
548 * @return Boolean
554 * @access public549 * @access public
550 * @internal Could, but not must, extend by the child Crypt_* class
555 */551 */
556 function setPassword($password, $method = 'pbkdf2')552 function setPassword($password, $method = 'pbkdf2')
557 {553 {
558 $key = '';554 $key = '';
559555
560 switch ($method) {556 switch ($method) {
561 default: // 'pbkdf2'557 default: // 'pbkdf2' or 'pbkdf1'
562 $func_args = func_get_args();558 $func_args = func_get_args();
563559
564 // Hash function560 // Hash function
@@ -572,19 +568,37 @@
572 $count = isset($func_args[4]) ? $func_args[4] : 1000;568 $count = isset($func_args[4]) ? $func_args[4] : 1000;
573569
574 // Keylength570 // Keylength
575 $dkLen = isset($func_args[5]) ? $func_args[5] : $this->password_key_size;571 if (isset($func_args[5])) {
572 $dkLen = $func_args[5];
573 } else {
574 $dkLen = $method == 'pbkdf1' ? 2 * $this->password_key_size : $this->password_key_size;
575 }
576576
577 // Determining if php[>=5.5.0]'s hash_pbkdf2() function avail- and useable
578 switch (true) {577 switch (true) {
578 case $method == 'pbkdf1':
579 $hashObj = new Hash();
580 $hashObj->setHash($hash);
581 if ($dkLen > $hashObj->getLength()) {
582 user_error('Derived key too long');
583 return false;
584 }
585 $t = $password . $salt;
586 for ($i = 0; $i < $count; ++$i) {
587 $t = $hashObj->hash($t);
588 }
589 $key = substr($t, 0, $dkLen);
590
591 $this->setKey(substr($key, 0, $dkLen >> 1));
592 $this->setIV(substr($key, $dkLen >> 1));
593
594 return true;
595 // Determining if php[>=5.5.0]'s hash_pbkdf2() function avail- and useable
579 case !function_exists('hash_pbkdf2'):596 case !function_exists('hash_pbkdf2'):
580 case !function_exists('hash_algos'):597 case !function_exists('hash_algos'):
581 case !in_array($hash, hash_algos()):598 case !in_array($hash, hash_algos()):
582 if (!class_exists('Crypt_Hash')) {
583 include_once 'Crypt/Hash.php';
584 }
585 $i = 1;599 $i = 1;
586 while (strlen($key) < $dkLen) {600 while (strlen($key) < $dkLen) {
587 $hmac = new Crypt_Hash();601 $hmac = new Hash();
588 $hmac->setHash($hash);602 $hmac->setHash($hash);
589 $hmac->setKey($password);603 $hmac->setKey($password);
590 $f = $u = $hmac->hash($salt . pack('N', $i++));604 $f = $u = $hmac->hash($salt . pack('N', $i++));
@@ -602,6 +616,8 @@
602 }616 }
603617
604 $this->setKey($key);618 $this->setKey($key);
619
620 return true;
605 }621 }
606622
607 /**623 /**
@@ -618,16 +634,91 @@
618 * strlen($plaintext) will still need to be a multiple of the block size, however, arbitrary values can be added to make it that634 * strlen($plaintext) will still need to be a multiple of the block size, however, arbitrary values can be added to make it that
619 * length.635 * length.
620 *636 *
621 * Note: Could, but not must, extend by the child Crypt_* class637 * @see \phpseclib\Crypt\Base::decrypt()
622 *
623 * @see Crypt_Base::decrypt()
624 * @access public638 * @access public
625 * @param String $plaintext639 * @param String $plaintext
626 * @return String $cipertext640 * @return String $ciphertext
641 * @internal Could, but not must, extend by the child Crypt_* class
627 */642 */
628 function encrypt($plaintext)643 function encrypt($plaintext)
629 {644 {
630 if ($this->engine == CRYPT_MODE_MCRYPT) {645 if ($this->paddable) {
646 $plaintext = $this->_pad($plaintext);
647 }
648
649 if ($this->engine === self::ENGINE_OPENSSL) {
650 if ($this->changed) {
651 $this->_clearBuffers();
652 $this->changed = false;
653 }
654 switch ($this->mode) {
655 case self::MODE_STREAM:
656 return openssl_encrypt($plaintext, $this->cipher_name_openssl, $this->key, $this->openssl_options);
657 case self::MODE_ECB:
658 $result = openssl_encrypt($plaintext, $this->cipher_name_openssl, $this->key, $this->openssl_options);
659 return !defined('OPENSSL_RAW_DATA') ? substr($result, 0, -$this->block_size) : $result;
660 case self::MODE_CBC:
661 $result = openssl_encrypt($plaintext, $this->cipher_name_openssl, $this->key, $this->openssl_options, $this->encryptIV);
662 if ($this->continuousBuffer) {
663 $this->encryptIV = substr($result, -$this->block_size);
664 }
665 return !defined('OPENSSL_RAW_DATA') ? substr($result, 0, -$this->block_size) : $result;
666 case self::MODE_CTR:
667 return $this->_openssl_ctr_process($plaintext, $this->encryptIV, $this->enbuffer);
668 case self::MODE_CFB:
669 // cfb loosely routines inspired by openssl's:
670 // {@link http://cvs.openssl.org/fileview?f=openssl/crypto/modes/cfb128.c&v=1.3.2.2.2.1}
671 $ciphertext = '';
672 if ($this->continuousBuffer) {
673 $iv = &$this->encryptIV;
674 $pos = &$this->enbuffer['pos'];
675 } else {
676 $iv = $this->encryptIV;
677 $pos = 0;
678 }
679 $len = strlen($plaintext);
680 $i = 0;
681 if ($pos) {
682 $orig_pos = $pos;
683 $max = $this->block_size - $pos;
684 if ($len >= $max) {
685 $i = $max;
686 $len-= $max;
687 $pos = 0;
688 } else {
689 $i = $len;
690 $pos+= $len;
691 $len = 0;
692 }
693 // ie. $i = min($max, $len), $len-= $i, $pos+= $i, $pos%= $blocksize
694 $ciphertext = substr($iv, $orig_pos) ^ $plaintext;
695 $iv = substr_replace($iv, $ciphertext, $orig_pos, $i);
696 $plaintext = substr($plaintext, $i);
697 }
698
699 $overflow = $len % $this->block_size;
700
701 if ($overflow) {
702 $ciphertext.= openssl_encrypt(substr($plaintext, 0, -$overflow) . str_repeat("\0", $this->block_size), $this->cipher_name_openssl, $this->key, $this->openssl_options, $iv);
703 $iv = $this->_string_pop($ciphertext, $this->block_size);
704
705 $size = $len - $overflow;
706 $block = $iv ^ substr($plaintext, -$overflow);
707 $iv = substr_replace($iv, $block, 0, $overflow);
708 $ciphertext.= $block;
709 $pos = $overflow;
710 } elseif ($len) {
711 $ciphertext = openssl_encrypt($plaintext, $this->cipher_name_openssl, $this->key, $this->openssl_options, $iv);
712 $iv = substr($ciphertext, -$this->block_size);
713 }
714
715 return $ciphertext;
716 case self::MODE_OFB:
717 return $this->_openssl_ofb_process($plaintext, $this->encryptIV, $this->enbuffer);
718 }
719 }
720
721 if ($this->engine === self::ENGINE_MCRYPT) {
631 if ($this->changed) {722 if ($this->changed) {
632 $this->_setupMcrypt();723 $this->_setupMcrypt();
633 $this->changed = false;724 $this->changed = false;
@@ -640,7 +731,7 @@
640 // re: {@link http://phpseclib.sourceforge.net/cfb-demo.phps}731 // re: {@link http://phpseclib.sourceforge.net/cfb-demo.phps}
641 // using mcrypt's default handing of CFB the above would output two different things. using phpseclib's732 // using mcrypt's default handing of CFB the above would output two different things. using phpseclib's
642 // rewritten CFB implementation the above outputs the same thing twice.733 // rewritten CFB implementation the above outputs the same thing twice.
643 if ($this->mode == CRYPT_MODE_CFB && $this->continuousBuffer) {734 if ($this->mode == self::MODE_CFB && $this->continuousBuffer) {
644 $block_size = $this->block_size;735 $block_size = $this->block_size;
645 $iv = &$this->encryptIV;736 $iv = &$this->encryptIV;
646 $pos = &$this->enbuffer['pos'];737 $pos = &$this->enbuffer['pos'];
@@ -693,10 +784,6 @@
693 return $ciphertext;784 return $ciphertext;
694 }785 }
695786
696 if ($this->paddable) {
697 $plaintext = $this->_pad($plaintext);
698 }
699
700 $ciphertext = mcrypt_generic($this->enmcrypt, $plaintext);787 $ciphertext = mcrypt_generic($this->enmcrypt, $plaintext);
701788
702 if (!$this->continuousBuffer) {789 if (!$this->continuousBuffer) {
@@ -714,20 +801,17 @@
714 $inline = $this->inline_crypt;801 $inline = $this->inline_crypt;
715 return $inline('encrypt', $this, $plaintext);802 return $inline('encrypt', $this, $plaintext);
716 }803 }
717 if ($this->paddable) {
718 $plaintext = $this->_pad($plaintext);
719 }
720804
721 $buffer = &$this->enbuffer;805 $buffer = &$this->enbuffer;
722 $block_size = $this->block_size;806 $block_size = $this->block_size;
723 $ciphertext = '';807 $ciphertext = '';
724 switch ($this->mode) {808 switch ($this->mode) {
725 case CRYPT_MODE_ECB:809 case self::MODE_ECB:
726 for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {810 for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {
727 $ciphertext.= $this->_encryptBlock(substr($plaintext, $i, $block_size));811 $ciphertext.= $this->_encryptBlock(substr($plaintext, $i, $block_size));
728 }812 }
729 break;813 break;
730 case CRYPT_MODE_CBC:814 case self::MODE_CBC:
731 $xor = $this->encryptIV;815 $xor = $this->encryptIV;
732 for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {816 for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {
733 $block = substr($plaintext, $i, $block_size);817 $block = substr($plaintext, $i, $block_size);
@@ -739,32 +823,34 @@
739 $this->encryptIV = $xor;823 $this->encryptIV = $xor;
740 }824 }
741 break;825 break;
742 case CRYPT_MODE_CTR:826 case self::MODE_CTR:
743 $xor = $this->encryptIV;827 $xor = $this->encryptIV;
744 if (strlen($buffer['encrypted'])) {828 if (strlen($buffer['ciphertext'])) {
745 for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {829 for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {
746 $block = substr($plaintext, $i, $block_size);830 $block = substr($plaintext, $i, $block_size);
747 if (strlen($block) > strlen($buffer['encrypted'])) {831 if (strlen($block) > strlen($buffer['ciphertext'])) {
748 $buffer['encrypted'].= $this->_encryptBlock($this->_generateXor($xor, $block_size));832 $buffer['ciphertext'].= $this->_encryptBlock($xor);
749 }833 }
750 $key = $this->_stringShift($buffer['encrypted'], $block_size);834 $this->_increment_str($xor);
835 $key = $this->_string_shift($buffer['ciphertext'], $block_size);
751 $ciphertext.= $block ^ $key;836 $ciphertext.= $block ^ $key;
752 }837 }
753 } else {838 } else {
754 for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {839 for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {
755 $block = substr($plaintext, $i, $block_size);840 $block = substr($plaintext, $i, $block_size);
756 $key = $this->_encryptBlock($this->_generateXor($xor, $block_size));841 $key = $this->_encryptBlock($xor);
842 $this->_increment_str($xor);
757 $ciphertext.= $block ^ $key;843 $ciphertext.= $block ^ $key;
758 }844 }
759 }845 }
760 if ($this->continuousBuffer) {846 if ($this->continuousBuffer) {
761 $this->encryptIV = $xor;847 $this->encryptIV = $xor;
762 if ($start = strlen($plaintext) % $block_size) {848 if ($start = strlen($plaintext) % $block_size) {
763 $buffer['encrypted'] = substr($key, $start) . $buffer['encrypted'];849 $buffer['ciphertext'] = substr($key, $start) . $buffer['ciphertext'];
764 }850 }
765 }851 }
766 break;852 break;
767 case CRYPT_MODE_CFB:853 case self::MODE_CFB:
768 // cfb loosely routines inspired by openssl's:854 // cfb loosely routines inspired by openssl's:
769 // {@link http://cvs.openssl.org/fileview?f=openssl/crypto/modes/cfb128.c&v=1.3.2.2.2.1}855 // {@link http://cvs.openssl.org/fileview?f=openssl/crypto/modes/cfb128.c&v=1.3.2.2.2.1}
770 if ($this->continuousBuffer) {856 if ($this->continuousBuffer) {
@@ -806,7 +892,7 @@
806 $pos = $len;892 $pos = $len;
807 }893 }
808 break;894 break;
809 case CRYPT_MODE_OFB:895 case self::MODE_OFB:
810 $xor = $this->encryptIV;896 $xor = $this->encryptIV;
811 if (strlen($buffer['xor'])) {897 if (strlen($buffer['xor'])) {
812 for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {898 for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {
@@ -815,7 +901,7 @@
815 $xor = $this->_encryptBlock($xor);901 $xor = $this->_encryptBlock($xor);
816 $buffer['xor'].= $xor;902 $buffer['xor'].= $xor;
817 }903 }
818 $key = $this->_stringShift($buffer['xor'], $block_size);904 $key = $this->_string_shift($buffer['xor'], $block_size);
819 $ciphertext.= $block ^ $key;905 $ciphertext.= $block ^ $key;
820 }906 }
821 } else {907 } else {
@@ -832,7 +918,7 @@
832 }918 }
833 }919 }
834 break;920 break;
835 case CRYPT_MODE_STREAM:921 case self::MODE_STREAM:
836 $ciphertext = $this->_encryptBlock($plaintext);922 $ciphertext = $this->_encryptBlock($plaintext);
837 break;923 break;
838 }924 }
@@ -846,16 +932,101 @@
846 * If strlen($ciphertext) is not a multiple of the block size, null bytes will be added to the end of the string until932 * If strlen($ciphertext) is not a multiple of the block size, null bytes will be added to the end of the string until
847 * it is.933 * it is.
848 *934 *
849 * Note: Could, but not must, extend by the child Crypt_* class935 * @see \phpseclib\Crypt\Base::encrypt()
850 *
851 * @see Crypt_Base::encrypt()
852 * @access public936 * @access public
853 * @param String $ciphertext937 * @param String $ciphertext
854 * @return String $plaintext938 * @return String $plaintext
939 * @internal Could, but not must, extend by the child Crypt_* class
855 */940 */
856 function decrypt($ciphertext)941 function decrypt($ciphertext)
857 {942 {
858 if ($this->engine == CRYPT_MODE_MCRYPT) {943 if ($this->paddable) {
944 // we pad with chr(0) since that's what mcrypt_generic does. to quote from {@link http://www.php.net/function.mcrypt-generic}:
945 // "The data is padded with "\0" to make sure the length of the data is n * blocksize."
946 $ciphertext = str_pad($ciphertext, strlen($ciphertext) + ($this->block_size - strlen($ciphertext) % $this->block_size) % $this->block_size, chr(0));
947 }
948
949 if ($this->engine === self::ENGINE_OPENSSL) {
950 if ($this->changed) {
951 $this->_clearBuffers();
952 $this->changed = false;
953 }
954 switch ($this->mode) {
955 case self::MODE_STREAM:
956 $plaintext = openssl_decrypt($ciphertext, $this->cipher_name_openssl, $this->key, $this->openssl_options);
957 break;
958 case self::MODE_ECB:
959 if (!defined('OPENSSL_RAW_DATA')) {
960 $ciphetext.= openssl_encrypt('', $this->cipher_name_openssl_ecb, $this->key, true);
961 }
962 $plaintext = openssl_decrypt($ciphertext, $this->cipher_name_openssl, $this->key, $this->openssl_options);
963 break;
964 case self::MODE_CBC:
965 if (!defined('OPENSSL_RAW_DATA')) {
966 $padding = str_repeat(chr($this->block_size), $this->block_size) ^ substr($ciphertext, -$this->block_size);
967 $ciphertext.= substr(openssl_encrypt($padding, $this->cipher_name_openssl_ecb, $this->key, true), 0, $this->block_size);
968 }
969 $plaintext = openssl_decrypt($ciphertext, $this->cipher_name_openssl, $this->key, $this->openssl_options, $this->decryptIV);
970 if ($this->continuousBuffer) {
971 $this->decryptIV = substr($ciphertext, -$this->block_size);
972 }
973 break;
974 case self::MODE_CTR:
975 $plaintext = $this->_openssl_ctr_process($ciphertext, $this->decryptIV, $this->debuffer);
976 break;
977 case self::MODE_CFB:
978 // cfb loosely routines inspired by openssl's:
979 // {@link http://cvs.openssl.org/fileview?f=openssl/crypto/modes/cfb128.c&v=1.3.2.2.2.1}
980 $plaintext = '';
981 if ($this->continuousBuffer) {
982 $iv = &$this->decryptIV;
983 $pos = &$this->buffer['pos'];
984 } else {
985 $iv = $this->decryptIV;
986 $pos = 0;
987 }
988 $len = strlen($ciphertext);
989 $i = 0;
990 if ($pos) {
991 $orig_pos = $pos;
992 $max = $this->block_size - $pos;
993 if ($len >= $max) {
994 $i = $max;
995 $len-= $max;
996 $pos = 0;
997 } else {
998 $i = $len;
999 $pos+= $len;
1000 $len = 0;
1001 }
1002 // ie. $i = min($max, $len), $len-= $i, $pos+= $i, $pos%= $this->blocksize
1003 $plaintext = substr($iv, $orig_pos) ^ $ciphertext;
1004 $iv = substr_replace($iv, substr($ciphertext, 0, $i), $orig_pos, $i);
1005 $ciphertext = substr($ciphertext, $i);
1006 }
1007 $overflow = $len % $this->block_size;
1008 if ($overflow) {
1009 $plaintext.= openssl_decrypt(substr($ciphertext, 0, -$overflow), $this->cipher_name_openssl, $this->key, $this->openssl_options, $iv);
1010 if ($len - $overflow) {
1011 $iv = substr($ciphertext, -$overflow - $this->block_size, -$overflow);
1012 }
1013 $iv = openssl_encrypt(str_repeat("\0", $this->block_size), $this->cipher_name_openssl, $this->key, $this->openssl_options, $iv);
1014 $plaintext.= $iv ^ substr($ciphertext, -$overflow);
1015 $iv = substr_replace($iv, substr($ciphertext, -$overflow), 0, $overflow);
1016 $pos = $overflow;
1017 } elseif ($len) {
1018 $plaintext.= openssl_decrypt($ciphertext, $this->cipher_name_openssl, $this->key, $this->openssl_options, $iv);
1019 $iv = substr($ciphertext, -$this->block_size);
1020 }
1021 break;
1022 case self::MODE_OFB:
1023 $plaintext = $this->_openssl_ofb_process($ciphertext, $this->decryptIV, $this->debuffer);
1024 }
1025
1026 return $this->paddable ? $this->_unpad($plaintext) : $plaintext;
1027 }
1028
1029 if ($this->engine === self::ENGINE_MCRYPT) {
859 $block_size = $this->block_size;1030 $block_size = $this->block_size;
860 if ($this->changed) {1031 if ($this->changed) {
861 $this->_setupMcrypt();1032 $this->_setupMcrypt();
@@ -866,7 +1037,7 @@
866 $this->dechanged = false;1037 $this->dechanged = false;
867 }1038 }
8681039
869 if ($this->mode == CRYPT_MODE_CFB && $this->continuousBuffer) {1040 if ($this->mode == self::MODE_CFB && $this->continuousBuffer) {
870 $iv = &$this->decryptIV;1041 $iv = &$this->decryptIV;
871 $pos = &$this->debuffer['pos'];1042 $pos = &$this->debuffer['pos'];
872 $len = strlen($ciphertext);1043 $len = strlen($ciphertext);
@@ -904,12 +1075,6 @@
904 return $plaintext;1075 return $plaintext;
905 }1076 }
9061077
907 if ($this->paddable) {
908 // we pad with chr(0) since that's what mcrypt_generic does. to quote from {@link http://www.php.net/function.mcrypt-generic}:
909 // "The data is padded with "\0" to make sure the length of the data is n * blocksize."
910 $ciphertext = str_pad($ciphertext, strlen($ciphertext) + ($block_size - strlen($ciphertext) % $block_size) % $block_size, chr(0));
911 }
912
913 $plaintext = mdecrypt_generic($this->demcrypt, $ciphertext);1078 $plaintext = mdecrypt_generic($this->demcrypt, $ciphertext);
9141079
915 if (!$this->continuousBuffer) {1080 if (!$this->continuousBuffer) {
@@ -929,20 +1094,16 @@
929 }1094 }
9301095
931 $block_size = $this->block_size;1096 $block_size = $this->block_size;
932 if ($this->paddable) {
933 // we pad with chr(0) since that's what mcrypt_generic does [...]
934 $ciphertext = str_pad($ciphertext, strlen($ciphertext) + ($block_size - strlen($ciphertext) % $block_size) % $block_size, chr(0));
935 }
9361097
937 $buffer = &$this->debuffer;1098 $buffer = &$this->debuffer;
938 $plaintext = '';1099 $plaintext = '';
939 switch ($this->mode) {1100 switch ($this->mode) {
940 case CRYPT_MODE_ECB:1101 case self::MODE_ECB:
941 for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {1102 for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {
942 $plaintext.= $this->_decryptBlock(substr($ciphertext, $i, $block_size));1103 $plaintext.= $this->_decryptBlock(substr($ciphertext, $i, $block_size));
943 }1104 }
944 break;1105 break;
945 case CRYPT_MODE_CBC:1106 case self::MODE_CBC:
946 $xor = $this->decryptIV;1107 $xor = $this->decryptIV;
947 for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {1108 for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {
948 $block = substr($ciphertext, $i, $block_size);1109 $block = substr($ciphertext, $i, $block_size);
@@ -953,21 +1114,23 @@
953 $this->decryptIV = $xor;1114 $this->decryptIV = $xor;
954 }1115 }
955 break;1116 break;
956 case CRYPT_MODE_CTR:1117 case self::MODE_CTR:
957 $xor = $this->decryptIV;1118 $xor = $this->decryptIV;
958 if (strlen($buffer['ciphertext'])) {1119 if (strlen($buffer['ciphertext'])) {
959 for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {1120 for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {
960 $block = substr($ciphertext, $i, $block_size);1121 $block = substr($ciphertext, $i, $block_size);
961 if (strlen($block) > strlen($buffer['ciphertext'])) {1122 if (strlen($block) > strlen($buffer['ciphertext'])) {
962 $buffer['ciphertext'].= $this->_encryptBlock($this->_generateXor($xor, $block_size));1123 $buffer['ciphertext'].= $this->_encryptBlock($xor);
1124 $this->_increment_str($xor);
963 }1125 }
964 $key = $this->_stringShift($buffer['ciphertext'], $block_size);1126 $key = $this->_string_shift($buffer['ciphertext'], $block_size);
965 $plaintext.= $block ^ $key;1127 $plaintext.= $block ^ $key;
966 }1128 }
967 } else {1129 } else {
968 for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {1130 for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {
969 $block = substr($ciphertext, $i, $block_size);1131 $block = substr($ciphertext, $i, $block_size);
970 $key = $this->_encryptBlock($this->_generateXor($xor, $block_size));1132 $key = $this->_encryptBlock($xor);
1133 $this->_increment_str($xor);
971 $plaintext.= $block ^ $key;1134 $plaintext.= $block ^ $key;
972 }1135 }
973 }1136 }
@@ -978,7 +1141,7 @@
978 }1141 }
979 }1142 }
980 break;1143 break;
981 case CRYPT_MODE_CFB:1144 case self::MODE_CFB:
982 if ($this->continuousBuffer) {1145 if ($this->continuousBuffer) {
983 $iv = &$this->decryptIV;1146 $iv = &$this->decryptIV;
984 $pos = &$buffer['pos'];1147 $pos = &$buffer['pos'];
@@ -1019,7 +1182,7 @@
1019 $pos = $len;1182 $pos = $len;
1020 }1183 }
1021 break;1184 break;
1022 case CRYPT_MODE_OFB:1185 case self::MODE_OFB:
1023 $xor = $this->decryptIV;1186 $xor = $this->decryptIV;
1024 if (strlen($buffer['xor'])) {1187 if (strlen($buffer['xor'])) {
1025 for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {1188 for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {
@@ -1028,7 +1191,7 @@
1028 $xor = $this->_encryptBlock($xor);1191 $xor = $this->_encryptBlock($xor);
1029 $buffer['xor'].= $xor;1192 $buffer['xor'].= $xor;
1030 }1193 }
1031 $key = $this->_stringShift($buffer['xor'], $block_size);1194 $key = $this->_string_shift($buffer['xor'], $block_size);
1032 $plaintext.= $block ^ $key;1195 $plaintext.= $block ^ $key;
1033 }1196 }
1034 } else {1197 } else {
@@ -1045,7 +1208,7 @@
1045 }1208 }
1046 }1209 }
1047 break;1210 break;
1048 case CRYPT_MODE_STREAM:1211 case self::MODE_STREAM:
1049 $plaintext = $this->_decryptBlock($ciphertext);1212 $plaintext = $this->_decryptBlock($ciphertext);
1050 break;1213 break;
1051 }1214 }
@@ -1053,6 +1216,178 @@
1053 }1216 }
10541217
1055 /**1218 /**
1219 * OpenSSL CTR Processor
1220 *
1221 * PHP's OpenSSL bindings do not operate in continuous mode so we'll wrap around it. Since the keystream
1222 * for CTR is the same for both encrypting and decrypting this function is re-used by both Crypt_Base::encrypt()
1223 * and Crypt_Base::decrypt(). Also, OpenSSL doesn't implement CTR for all of it's symmetric ciphers so this
1224 * function will emulate CTR with ECB when necesary.
1225 *
1226 * @see Crypt_Base::encrypt()
1227 * @see Crypt_Base::decrypt()
1228 * @param String $plaintext
1229 * @param String $encryptIV
1230 * @param Array $buffer
1231 * @return String
1232 * @access private
1233 */
1234 function _openssl_ctr_process($plaintext, &$encryptIV, &$buffer)
1235 {
1236 $ciphertext = '';
1237
1238 $block_size = $this->block_size;
1239 $key = $this->key;
1240
1241 if ($this->openssl_emulate_ctr) {
1242 $xor = $encryptIV;
1243 if (strlen($buffer['ciphertext'])) {
1244 for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {
1245 $block = substr($plaintext, $i, $block_size);
1246 if (strlen($block) > strlen($buffer['ciphertext'])) {
1247 $result = openssl_encrypt($xor, $this->cipher_name_openssl_ecb, $key, $this->openssl_options);
1248 $result = !defined('OPENSSL_RAW_DATA') ? substr($result, 0, -$this->block_size) : $result;
1249 $buffer['ciphertext'].= $result;
1250 }
1251 $this->_increment_str($xor);
1252 $otp = $this->_string_shift($buffer['ciphertext'], $block_size);
1253 $ciphertext.= $block ^ $otp;
1254 }
1255 } else {
1256 for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {
1257 $block = substr($plaintext, $i, $block_size);
1258 $otp = openssl_encrypt($xor, $this->cipher_name_openssl_ecb, $key, $this->openssl_options);
1259 $otp = !defined('OPENSSL_RAW_DATA') ? substr($otp, 0, -$this->block_size) : $otp;
1260 $this->_increment_str($xor);
1261 $ciphertext.= $block ^ $otp;
1262 }
1263 }
1264 if ($this->continuousBuffer) {
1265 $encryptIV = $xor;
1266 if ($start = strlen($plaintext) % $block_size) {
1267 $buffer['ciphertext'] = substr($key, $start) . $buffer['ciphertext'];
1268 }
1269 }
1270
1271 return $ciphertext;
1272 }
1273
1274 if (strlen($buffer['ciphertext'])) {
1275 $ciphertext = $plaintext ^ $this->_string_shift($buffer['ciphertext'], strlen($plaintext));
1276 $plaintext = substr($plaintext, strlen($ciphertext));
1277
1278 if (!strlen($plaintext)) {
1279 return $ciphertext;
1280 }
1281 }
1282
1283 $overflow = strlen($plaintext) % $block_size;
1284 if ($overflow) {
1285 $plaintext2 = $this->_string_pop($plaintext, $overflow); // ie. trim $plaintext to a multiple of $block_size and put rest of $plaintext in $plaintext2
1286 $encrypted = openssl_encrypt($plaintext . str_repeat("\0", $block_size), $this->cipher_name_openssl, $key, $this->openssl_options, $encryptIV);
1287 $temp = $this->_string_pop($encrypted, $block_size);
1288 $ciphertext.= $encrypted . ($plaintext2 ^ $temp);
1289 if ($this->continuousBuffer) {
1290 $buffer['ciphertext'] = substr($temp, $overflow);
1291 $encryptIV = $temp;
1292 }
1293 } elseif (!strlen($buffer['ciphertext'])) {
1294 $ciphertext.= openssl_encrypt($plaintext . str_repeat("\0", $block_size), $this->cipher_name_openssl, $key, $this->openssl_options, $encryptIV);
1295 $temp = $this->_string_pop($ciphertext, $block_size);
1296 if ($this->continuousBuffer) {
1297 $encryptIV = $temp;
1298 }
1299 }
1300 if ($this->continuousBuffer) {
1301 if (!defined('OPENSSL_RAW_DATA')) {
1302 $encryptIV.= openssl_encrypt('', $this->cipher_name_openssl_ecb, $key, $this->openssl_options);
1303 }
1304 $encryptIV = openssl_decrypt($encryptIV, $this->cipher_name_openssl_ecb, $key, $this->openssl_options);
1305 if ($overflow) {
1306 $this->_increment_str($encryptIV);
1307 }
1308 }
1309
1310 return $ciphertext;
1311 }
1312
1313 /**
1314 * OpenSSL OFB Processor
1315 *
1316 * PHP's OpenSSL bindings do not operate in continuous mode so we'll wrap around it. Since the keystream
1317 * for OFB is the same for both encrypting and decrypting this function is re-used by both Crypt_Base::encrypt()
1318 * and Crypt_Base::decrypt().
1319 *
1320 * @see Crypt_Base::encrypt()
1321 * @see Crypt_Base::decrypt()
1322 * @param String $plaintext
1323 * @param String $encryptIV
1324 * @param Array $buffer
1325 * @return String
1326 * @access private
1327 */
1328 function _openssl_ofb_process($plaintext, &$encryptIV, &$buffer)
1329 {
1330 if (strlen($buffer['xor'])) {
1331 $ciphertext = $plaintext ^ $buffer['xor'];
1332 $buffer['xor'] = substr($buffer['xor'], strlen($ciphertext));
1333 $plaintext = substr($plaintext, strlen($ciphertext));
1334 } else {
1335 $ciphertext = '';
1336 }
1337
1338 $block_size = $this->block_size;
1339
1340 $len = strlen($plaintext);
1341 $key = $this->key;
1342 $overflow = $len % $block_size;
1343
1344 if (strlen($plaintext)) {
1345 if ($overflow) {
1346 $ciphertext.= openssl_encrypt(substr($plaintext, 0, -$overflow) . str_repeat("\0", $block_size), $this->cipher_name_openssl, $key, $this->openssl_options, $encryptIV);
1347 $xor = $this->_string_pop($ciphertext, $block_size);
1348 if ($this->continuousBuffer) {
1349 $encryptIV = $xor;
1350 }
1351 $ciphertext.= $this->_string_shift($xor, $overflow) ^ substr($plaintext, -$overflow);
1352 if ($this->continuousBuffer) {
1353 $buffer['xor'] = $xor;
1354 }
1355 } else {
1356 $ciphertext = openssl_encrypt($plaintext, $this->cipher_name_openssl, $key, $this->openssl_options, $encryptIV);
1357 if ($this->continuousBuffer) {
1358 $encryptIV = substr($ciphertext, -$block_size) ^ substr($plaintext, -$block_size);
1359 }
1360 }
1361 }
1362
1363 return $ciphertext;
1364 }
1365
1366 /**
1367 * phpseclib <-> OpenSSL Mode Mapper
1368 *
1369 * May need to be overwritten by classes extending this one in some cases
1370 *
1371 * @return Integer
1372 * @access private
1373 */
1374 function _openssl_translate_mode()
1375 {
1376 switch ($this->mode) {
1377 case self::MODE_ECB:
1378 return 'ecb';
1379 case self::MODE_CBC:
1380 return 'cbc';
1381 case self::MODE_CTR:
1382 return 'ctr';
1383 case self::MODE_CFB:
1384 return 'cfb';
1385 case self::MODE_OFB:
1386 return 'ofb';
1387 }
1388 }
1389
1390 /**
1056 * Pad "packets".1391 * Pad "packets".
1057 *1392 *
1058 * Block ciphers working by encrypting between their specified [$this->]block_size at a time1393 * Block ciphers working by encrypting between their specified [$this->]block_size at a time
@@ -1064,7 +1399,7 @@
1064 * away characters that shouldn't be stripped away. (SSH knows how many bytes are added because the length is1399 * away characters that shouldn't be stripped away. (SSH knows how many bytes are added because the length is
1065 * transmitted separately)1400 * transmitted separately)
1066 *1401 *
1067 * @see Crypt_Base::disablePadding()1402 * @see \phpseclib\Crypt\Base::disablePadding()
1068 * @access public1403 * @access public
1069 */1404 */
1070 function enablePadding()1405 function enablePadding()
@@ -1075,7 +1410,7 @@
1075 /**1410 /**
1076 * Do not pad packets.1411 * Do not pad packets.
1077 *1412 *
1078 * @see Crypt_Base::enablePadding()1413 * @see \phpseclib\Crypt\Base::enablePadding()
1079 * @access public1414 * @access public
1080 */1415 */
1081 function disablePadding()1416 function disablePadding()
@@ -1112,23 +1447,24 @@
1112 * outputs. The reason is due to the fact that the initialization vector's change after every encryption /1447 * outputs. The reason is due to the fact that the initialization vector's change after every encryption /
1113 * decryption round when the continuous buffer is enabled. When it's disabled, they remain constant.1448 * decryption round when the continuous buffer is enabled. When it's disabled, they remain constant.
1114 *1449 *
1115 * Put another way, when the continuous buffer is enabled, the state of the Crypt_*() object changes after each1450 * Put another way, when the continuous buffer is enabled, the state of the \phpseclib\Crypt\*() object changes after each
1116 * encryption / decryption round, whereas otherwise, it'd remain constant. For this reason, it's recommended that1451 * encryption / decryption round, whereas otherwise, it'd remain constant. For this reason, it's recommended that
1117 * continuous buffers not be used. They do offer better security and are, in fact, sometimes required (SSH uses them),1452 * continuous buffers not be used. They do offer better security and are, in fact, sometimes required (SSH uses them),
1118 * however, they are also less intuitive and more likely to cause you problems.1453 * however, they are also less intuitive and more likely to cause you problems.
1119 *1454 *
1120 * Note: Could, but not must, extend by the child Crypt_* class1455 * @see \phpseclib\Crypt\Base::disableContinuousBuffer()
1121 *
1122 * @see Crypt_Base::disableContinuousBuffer()
1123 * @access public1456 * @access public
1457 * @internal Could, but not must, extend by the child Crypt_* class
1124 */1458 */
1125 function enableContinuousBuffer()1459 function enableContinuousBuffer()
1126 {1460 {
1127 if ($this->mode == CRYPT_MODE_ECB) {1461 if ($this->mode == self::MODE_ECB) {
1128 return;1462 return;
1129 }1463 }
11301464
1131 $this->continuousBuffer = true;1465 $this->continuousBuffer = true;
1466
1467 $this->_setEngine();
1132 }1468 }
11331469
1134 /**1470 /**
@@ -1136,14 +1472,13 @@
1136 *1472 *
1137 * The default behavior.1473 * The default behavior.
1138 *1474 *
1139 * Note: Could, but not must, extend by the child Crypt_* class1475 * @see \phpseclib\Crypt\Base::enableContinuousBuffer()
1140 *
1141 * @see Crypt_Base::enableContinuousBuffer()
1142 * @access public1476 * @access public
1477 * @internal Could, but not must, extend by the child Crypt_* class
1143 */1478 */
1144 function disableContinuousBuffer()1479 function disableContinuousBuffer()
1145 {1480 {
1146 if ($this->mode == CRYPT_MODE_ECB) {1481 if ($this->mode == self::MODE_ECB) {
1147 return;1482 return;
1148 }1483 }
1149 if (!$this->continuousBuffer) {1484 if (!$this->continuousBuffer) {
@@ -1152,56 +1487,191 @@
11521487
1153 $this->continuousBuffer = false;1488 $this->continuousBuffer = false;
1154 $this->changed = true;1489 $this->changed = true;
1490
1491 $this->_setEngine();
1492 }
1493
1494 /**
1495 * Test for engine validity
1496 *
1497 * @see \phpseclib\Crypt\Base::Crypt_Base()
1498 * @param Integer $engine
1499 * @access public
1500 * @return Boolean
1501 */
1502 function isValidEngine($engine)
1503 {
1504 switch ($engine) {
1505 case self::ENGINE_OPENSSL:
1506 if ($this->mode == self::MODE_STREAM && $this->continuousBuffer) {
1507 return false;
1508 }
1509 $this->openssl_emulate_ctr = false;
1510 $result = $this->cipher_name_openssl &&
1511 extension_loaded('openssl') &&
1512 // PHP 5.3.0 - 5.3.2 did not let you set IV's
1513 version_compare(PHP_VERSION, '5.3.3', '>=');
1514 if (!$result) {
1515 return false;
1516 }
1517
1518 // prior to PHP 5.4.0 OPENSSL_RAW_DATA and OPENSSL_ZERO_PADDING were not defined. instead of expecting an integer
1519 // $options openssl_encrypt expected a boolean $raw_data.
1520 if (!defined('OPENSSL_RAW_DATA')) {
1521 $this->openssl_options = true;
1522 } else {
1523 $this->openssl_options = OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING;
1524 }
1525
1526 $methods = openssl_get_cipher_methods();
1527 if (in_array($this->cipher_name_openssl, $methods)) {
1528 return true;
1529 }
1530 // not all of openssl's symmetric cipher's support ctr. for those
1531 // that don't we'll emulate it
1532 switch ($this->mode) {
1533 case self::MODE_CTR:
1534 if (in_array($this->cipher_name_openssl_ecb, $methods)) {
1535 $this->openssl_emulate_ctr = true;
1536 return true;
1537 }
1538 }
1539 return false;
1540 case self::ENGINE_MCRYPT:
1541 return $this->cipher_name_mcrypt &&
1542 extension_loaded('mcrypt') &&
1543 in_array($this->cipher_name_mcrypt, mcrypt_list_algorithms());
1544 case self::ENGINE_INTERNAL:
1545 return true;
1546 }
1547
1548 return false;
1549 }
1550
1551 /**
1552 * Sets the preferred crypt engine
1553 *
1554 * Currently, $engine could be:
1555 *
1556 * - \phpseclib\Crypt\Base::ENGINE_OPENSSL [very fast]
1557 *
1558 * - \phpseclib\Crypt\Base::ENGINE_MCRYPT [fast]
1559 *
1560 * - \phpseclib\Crypt\Base::ENGINE_INTERNAL [slow]
1561 *
1562 * If the preferred crypt engine is not available the fastest available one will be used
1563 *
1564 * @see \phpseclib\Crypt\Base::Crypt_Base()
1565 * @param Integer $engine
1566 * @access public
1567 */
1568 function setPreferredEngine($engine)
1569 {
1570 switch ($engine) {
1571 //case self::ENGINE_OPENSSL;
1572 case self::ENGINE_MCRYPT:
1573 case self::ENGINE_INTERNAL:
1574 $this->preferredEngine = $engine;
1575 break;
1576 default:
1577 $this->preferredEngine = self::ENGINE_OPENSSL;
1578 }
1579
1580 $this->_setEngine();
1581 }
1582
1583 /**
1584 * Returns the engine currently being utilized
1585 *
1586 * @see \phpseclib\Crypt\Base::_setEngine()
1587 * @access public
1588 */
1589 function getEngine()
1590 {
1591 return $this->engine;
1592 }
1593
1594 /**
1595 * Sets the engine as appropriate
1596 *
1597 * @see \phpseclib\Crypt\Base::Crypt_Base()
1598 * @access private
1599 */
1600 function _setEngine()
1601 {
1602 $this->engine = null;
1603
1604 $candidateEngines = array(
1605 $this->preferredEngine,
1606 self::ENGINE_OPENSSL,
1607 self::ENGINE_MCRYPT
1608 );
1609 foreach ($candidateEngines as $engine) {
1610 if ($this->isValidEngine($engine)) {
1611 $this->engine = $engine;
1612 break;
1613 }
1614 }
1615 if (!$this->engine) {
1616 $this->engine = self::ENGINE_INTERNAL;
1617 }
1618
1619 if ($this->engine != self::ENGINE_MCRYPT && $this->enmcrypt) {
1620 // Closing the current mcrypt resource(s). _mcryptSetup() will, if needed,
1621 // (re)open them with the module named in $this->cipher_name_mcrypt
1622 mcrypt_module_close($this->enmcrypt);
1623 mcrypt_module_close($this->demcrypt);
1624 $this->enmcrypt = null;
1625 $this->demcrypt = null;
1626
1627 if ($this->ecb) {
1628 mcrypt_module_close($this->ecb);
1629 $this->ecb = null;
1630 }
1631 }
1632
1633 $this->changed = true;
1155 }1634 }
11561635
1157 /**1636 /**
1158 * Encrypts a block1637 * Encrypts a block
1159 *1638 *
1160 * Note: Must extend by the child Crypt_* class1639 * Note: Must be extended by the child \phpseclib\Crypt\* class
1161 *1640 *
1162 * @access private1641 * @access private
1163 * @param String $in1642 * @param String $in
1164 * @return String1643 * @return String
1165 */1644 */
1166 function _encryptBlock($in)1645 abstract function _encryptBlock($in);
1167 {
1168 user_error((version_compare(PHP_VERSION, '5.0.0', '>=') ? __METHOD__ : __FUNCTION__) . '() must extend by class ' . get_class($this), E_USER_ERROR);
1169 }
11701646
1171 /**1647 /**
1172 * Decrypts a block1648 * Decrypts a block
1173 *1649 *
1174 * Note: Must extend by the child Crypt_* class1650 * Note: Must be extended by the child \phpseclib\Crypt\* class
1175 *1651 *
1176 * @access private1652 * @access private
1177 * @param String $in1653 * @param String $in
1178 * @return String1654 * @return String
1179 */1655 */
1180 function _decryptBlock($in)1656 abstract function _decryptBlock($in);
1181 {
1182 user_error((version_compare(PHP_VERSION, '5.0.0', '>=') ? __METHOD__ : __FUNCTION__) . '() must extend by class ' . get_class($this), E_USER_ERROR);
1183 }
11841657
1185 /**1658 /**
1186 * Setup the key (expansion)1659 * Setup the key (expansion)
1187 *1660 *
1188 * Only used if $engine == CRYPT_MODE_INTERNAL1661 * Only used if $engine == self::ENGINE_INTERNAL
1189 *1662 *
1190 * Note: Must extend by the child Crypt_* class1663 * Note: Must extend by the child \phpseclib\Crypt\* class
1191 *1664 *
1192 * @see Crypt_Base::_setup()1665 * @see \phpseclib\Crypt\Base::_setup()
1193 * @access private1666 * @access private
1194 */1667 */
1195 function _setupKey()1668 abstract function _setupKey();
1196 {
1197 user_error((version_compare(PHP_VERSION, '5.0.0', '>=') ? __METHOD__ : __FUNCTION__) . '() must extend by class ' . get_class($this), E_USER_ERROR);
1198 }
11991669
1200 /**1670 /**
1201 * Setup the CRYPT_MODE_INTERNAL $engine1671 * Setup the self::ENGINE_INTERNAL $engine
1202 *1672 *
1203 * (re)init, if necessary, the internal cipher $engine and flush all $buffers1673 * (re)init, if necessary, the internal cipher $engine and flush all $buffers
1204 * Used (only) if $engine == CRYPT_MODE_INTERNAL1674 * Used (only) if $engine == self::ENGINE_INTERNAL
1205 *1675 *
1206 * _setup() will be called each time if $changed === true1676 * _setup() will be called each time if $changed === true
1207 * typically this happens when using one or more of following public methods:1677 * typically this happens when using one or more of following public methods:
@@ -1214,14 +1684,12 @@
1214 *1684 *
1215 * - First run of encrypt() / decrypt() with no init-settings1685 * - First run of encrypt() / decrypt() with no init-settings
1216 *1686 *
1217 * Internally: _setup() is called always before(!) en/decryption.
1218 *
1219 * Note: Could, but not must, extend by the child Crypt_* class
1220 *
1221 * @see setKey()1687 * @see setKey()
1222 * @see setIV()1688 * @see setIV()
1223 * @see disableContinuousBuffer()1689 * @see disableContinuousBuffer()
1224 * @access private1690 * @access private
1691 * @internal _setup() is always called before en/decryption.
1692 * @internal Could, but not must, extend by the child Crypt_* class
1225 */1693 */
1226 function _setup()1694 function _setup()
1227 {1695 {
@@ -1234,10 +1702,10 @@
1234 }1702 }
12351703
1236 /**1704 /**
1237 * Setup the CRYPT_MODE_MCRYPT $engine1705 * Setup the self::ENGINE_MCRYPT $engine
1238 *1706 *
1239 * (re)init, if necessary, the (ext)mcrypt resources and flush all $buffers1707 * (re)init, if necessary, the (ext)mcrypt resources and flush all $buffers
1240 * Used (only) if $engine = CRYPT_MODE_MCRYPT1708 * Used (only) if $engine = self::ENGINE_MCRYPT
1241 *1709 *
1242 * _setupMcrypt() will be called each time if $changed === true1710 * _setupMcrypt() will be called each time if $changed === true
1243 * typically this happens when using one or more of following public methods:1711 * typically this happens when using one or more of following public methods:
@@ -1250,13 +1718,11 @@
1250 *1718 *
1251 * - First run of encrypt() / decrypt()1719 * - First run of encrypt() / decrypt()
1252 *1720 *
1253 *
1254 * Note: Could, but not must, extend by the child Crypt_* class
1255 *
1256 * @see setKey()1721 * @see setKey()
1257 * @see setIV()1722 * @see setIV()
1258 * @see disableContinuousBuffer()1723 * @see disableContinuousBuffer()
1259 * @access private1724 * @access private
1725 * @internal Could, but not must, extend by the child Crypt_* class
1260 */1726 */
1261 function _setupMcrypt()1727 function _setupMcrypt()
1262 {1728 {
@@ -1265,12 +1731,12 @@
12651731
1266 if (!isset($this->enmcrypt)) {1732 if (!isset($this->enmcrypt)) {
1267 static $mcrypt_modes = array(1733 static $mcrypt_modes = array(
1268 CRYPT_MODE_CTR => 'ctr',1734 self::MODE_CTR => 'ctr',
1269 CRYPT_MODE_ECB => MCRYPT_MODE_ECB,1735 self::MODE_ECB => MCRYPT_MODE_ECB,
1270 CRYPT_MODE_CBC => MCRYPT_MODE_CBC,1736 self::MODE_CBC => MCRYPT_MODE_CBC,
1271 CRYPT_MODE_CFB => 'ncfb',1737 self::MODE_CFB => 'ncfb',
1272 CRYPT_MODE_OFB => MCRYPT_MODE_NOFB,1738 self::MODE_OFB => MCRYPT_MODE_NOFB,
1273 CRYPT_MODE_STREAM => MCRYPT_MODE_STREAM,1739 self::MODE_STREAM => MCRYPT_MODE_STREAM,
1274 );1740 );
12751741
1276 $this->demcrypt = mcrypt_module_open($this->cipher_name_mcrypt, '', $mcrypt_modes[$this->mode], '');1742 $this->demcrypt = mcrypt_module_open($this->cipher_name_mcrypt, '', $mcrypt_modes[$this->mode], '');
@@ -1279,13 +1745,13 @@
1279 // we need the $ecb mcrypt resource (only) in MODE_CFB with enableContinuousBuffer()1745 // we need the $ecb mcrypt resource (only) in MODE_CFB with enableContinuousBuffer()
1280 // to workaround mcrypt's broken ncfb implementation in buffered mode1746 // to workaround mcrypt's broken ncfb implementation in buffered mode
1281 // see: {@link http://phpseclib.sourceforge.net/cfb-demo.phps}1747 // see: {@link http://phpseclib.sourceforge.net/cfb-demo.phps}
1282 if ($this->mode == CRYPT_MODE_CFB) {1748 if ($this->mode == self::MODE_CFB) {
1283 $this->ecb = mcrypt_module_open($this->cipher_name_mcrypt, '', MCRYPT_MODE_ECB, '');1749 $this->ecb = mcrypt_module_open($this->cipher_name_mcrypt, '', MCRYPT_MODE_ECB, '');
1284 }1750 }
12851751
1286 } // else should mcrypt_generic_deinit be called?1752 } // else should mcrypt_generic_deinit be called?
12871753
1288 if ($this->mode == CRYPT_MODE_CFB) {1754 if ($this->mode == self::MODE_CFB) {
1289 mcrypt_generic_init($this->ecb, $this->key, str_repeat("\0", $this->block_size));1755 mcrypt_generic_init($this->ecb, $this->key, str_repeat("\0", $this->block_size));
1290 }1756 }
1291 }1757 }
@@ -1300,7 +1766,7 @@
1300 * If padding is disabled and $text is not a multiple of the blocksize, the string will be padded regardless1766 * If padding is disabled and $text is not a multiple of the blocksize, the string will be padded regardless
1301 * and padding will, hence forth, be enabled.1767 * and padding will, hence forth, be enabled.
1302 *1768 *
1303 * @see Crypt_Base::_unpad()1769 * @see \phpseclib\Crypt\Base::_unpad()
1304 * @param String $text1770 * @param String $text
1305 * @access private1771 * @access private
1306 * @return String1772 * @return String
@@ -1329,7 +1795,7 @@
1329 * If padding is enabled and the reported padding length is invalid the encryption key will be assumed to be wrong1795 * If padding is enabled and the reported padding length is invalid the encryption key will be assumed to be wrong
1330 * and false will be returned.1796 * and false will be returned.
1331 *1797 *
1332 * @see Crypt_Base::_pad()1798 * @see \phpseclib\Crypt\Base::_pad()
1333 * @param String $text1799 * @param String $text
1334 * @access private1800 * @access private
1335 * @return String1801 * @return String
@@ -1356,14 +1822,12 @@
1356 * after disableContinuousBuffer() or on cipher $engine (re)init1822 * after disableContinuousBuffer() or on cipher $engine (re)init
1357 * ie after setKey() or setIV()1823 * ie after setKey() or setIV()
1358 *1824 *
1359 * Note: Could, but not must, extend by the child Crypt_* class
1360 *
1361 * @access public1825 * @access public
1826 * @internal Could, but not must, extend by the child Crypt_* class
1362 */1827 */
1363 function _clearBuffers()1828 function _clearBuffers()
1364 {1829 {
1365 $this->enbuffer = array('encrypted' => '', 'xor' => '', 'pos' => 0, 'enmcrypt_init' => true);1830 $this->enbuffer = $this->debuffer = array('ciphertext' => '', 'xor' => '', 'pos' => 0, 'enmcrypt_init' => true);
1366 $this->debuffer = array('ciphertext' => '', 'xor' => '', 'pos' => 0, 'demcrypt_init' => true);
13671831
1368 // mcrypt's handling of invalid's $iv:1832 // mcrypt's handling of invalid's $iv:
1369 // $this->encryptIV = $this->decryptIV = strlen($this->iv) == $this->block_size ? $this->iv : str_repeat("\0", $this->block_size);1833 // $this->encryptIV = $this->decryptIV = strlen($this->iv) == $this->block_size ? $this->iv : str_repeat("\0", $this->block_size);
@@ -1380,7 +1844,7 @@
1380 * @access private1844 * @access private
1381 * @return String1845 * @return String
1382 */1846 */
1383 function _stringShift(&$string, $index = 1)1847 function _string_shift(&$string, $index = 1)
1384 {1848 {
1385 $substr = substr($string, 0, $index);1849 $substr = substr($string, 0, $index);
1386 $string = substr($string, $index);1850 $string = substr($string, $index);
@@ -1388,43 +1852,57 @@
1388 }1852 }
13891853
1390 /**1854 /**
1391 * Generate CTR XOR encryption key1855 * String Pop
1392 *1856 *
1393 * Encrypt the output of this and XOR it against the ciphertext / plaintext to get the1857 * Inspired by array_pop
1394 * plaintext / ciphertext in CTR mode.1858 *
1395 *1859 * @param String $string
1396 * @see Crypt_Base::decrypt()1860 * @param optional Integer $index
1397 * @see Crypt_Base::encrypt()1861 * @access private
1398 * @param String $iv1862 * @return String
1399 * @param Integer $length1863 */
1400 * @access private1864 function _string_pop(&$string, $index = 1)
1401 * @return String $xor1865 {
1402 */1866 $substr = substr($string, -$index);
1403 function _generateXor(&$iv, $length)1867 $string = substr($string, 0, -$index);
1404 {1868 return $substr;
1405 $xor = '';1869 }
1406 $block_size = $this->block_size;1870
1407 $num_blocks = floor(($length + ($block_size - 1)) / $block_size);1871 /**
1408 for ($i = 0; $i < $num_blocks; $i++) {1872 * Increment the current string
1409 $xor.= $iv;1873 *
1410 for ($j = 4; $j <= $block_size; $j+= 4) {1874 * @see \phpseclib\Crypt\Base::decrypt()
1411 $temp = substr($iv, -$j, 4);1875 * @see \phpseclib\Crypt\Base::encrypt()
1412 switch ($temp) {1876 * @param String $var
1413 case "\xFF\xFF\xFF\xFF":1877 * @access private
1414 $iv = substr_replace($iv, "\x00\x00\x00\x00", -$j, 4);1878 */
1415 break;1879 function _increment_str(&$var)
1416 case "\x7F\xFF\xFF\xFF":1880 {
1417 $iv = substr_replace($iv, "\x80\x00\x00\x00", -$j, 4);1881 for ($i = 4; $i <= strlen($var); $i+= 4) {
1418 break 2;1882 $temp = substr($var, -$i, 4);
1419 default:1883 switch ($temp) {
1420 extract(unpack('Ncount', $temp));1884 case "\xFF\xFF\xFF\xFF":
1421 $iv = substr_replace($iv, pack('N', $count + 1), -$j, 4);1885 $var = substr_replace($var, "\x00\x00\x00\x00", -$i, 4);
1422 break 2;1886 break;
1423 }1887 case "\x7F\xFF\xFF\xFF":
1888 $var = substr_replace($var, "\x80\x00\x00\x00", -$i, 4);
1889 return;
1890 default:
1891 $temp = unpack('Nnum', $temp);
1892 $var = substr_replace($var, pack('N', $temp['num'] + 1), -$i, 4);
1893 return;
1424 }1894 }
1425 }1895 }
14261896
1427 return $xor;1897 $remainder = strlen($var) % 4;
1898
1899 if ($remainder == 0) {
1900 return;
1901 }
1902
1903 $temp = unpack('Nnum', str_pad(substr($var, 0, $remainder), 4, "\0", STR_PAD_LEFT));
1904 $temp = substr(pack('N', $temp['num'] + 1), -$remainder);
1905 $var = substr_replace($var, $temp, 0, $remainder);
1428 }1906 }
14291907
1430 /**1908 /**
@@ -1437,7 +1915,7 @@
1437 *1915 *
1438 * _setupInlineCrypt() would be called only if:1916 * _setupInlineCrypt() would be called only if:
1439 *1917 *
1440 * - $engine == CRYPT_MODE_INTERNAL and1918 * - $engine == self::ENGINE_INTERNAL and
1441 *1919 *
1442 * - $use_inline_crypt === true1920 * - $use_inline_crypt === true
1443 *1921 *
@@ -1472,7 +1950,7 @@
1472 * - short (as good as possible)1950 * - short (as good as possible)
1473 *1951 *
1474 * Note: - _setupInlineCrypt() is using _createInlineCryptFunction() to create the full callback function code.1952 * Note: - _setupInlineCrypt() is using _createInlineCryptFunction() to create the full callback function code.
1475 * - In case of using inline crypting, _setupInlineCrypt() must extend by the child Crypt_* class.1953 * - In case of using inline crypting, _setupInlineCrypt() must extend by the child \phpseclib\Crypt\* class.
1476 * - The following variable names are reserved:1954 * - The following variable names are reserved:
1477 * - $_* (all variable names prefixed with an underscore)1955 * - $_* (all variable names prefixed with an underscore)
1478 * - $self (object reference to it self. Do not use $this, but $self instead)1956 * - $self (object reference to it self. Do not use $this, but $self instead)
@@ -1480,19 +1958,18 @@
1480 * - The callback function should not use the 'return' statement, but en/decrypt'ing the content of $in only1958 * - The callback function should not use the 'return' statement, but en/decrypt'ing the content of $in only
1481 *1959 *
1482 *1960 *
1483 * @see Crypt_Base::_setup()1961 * @see \phpseclib\Crypt\Base::_setup()
1484 * @see Crypt_Base::_createInlineCryptFunction()1962 * @see \phpseclib\Crypt\Base::_createInlineCryptFunction()
1485 * @see Crypt_Base::encrypt()1963 * @see \phpseclib\Crypt\Base::encrypt()
1486 * @see Crypt_Base::decrypt()1964 * @see \phpseclib\Crypt\Base::decrypt()
1487 * @access private1965 * @access private
1966 * @internal If a Crypt_* class providing inline crypting it must extend _setupInlineCrypt()
1488 */1967 */
1489 function _setupInlineCrypt()1968 function _setupInlineCrypt()
1490 {1969 {
1491 // If a Crypt_* class providing inline crypting it must extend _setupInlineCrypt()1970 // If, for any reason, an extending \phpseclib\Crypt\Base() \phpseclib\Crypt\* class
1492
1493 // If, for any reason, an extending Crypt_Base() Crypt_* class
1494 // not using inline crypting then it must be ensured that: $this->use_inline_crypt = false1971 // not using inline crypting then it must be ensured that: $this->use_inline_crypt = false
1495 // ie in the class var declaration of $use_inline_crypt in general for the Crypt_* class,1972 // ie in the class var declaration of $use_inline_crypt in general for the \phpseclib\Crypt\* class,
1496 // in the constructor at object instance-time1973 // in the constructor at object instance-time
1497 // or, if it's runtime-specific, at runtime1974 // or, if it's runtime-specific, at runtime
14981975
@@ -1589,7 +2066,7 @@
1589 * +----------------------------------------------------------------------------------------------+2066 * +----------------------------------------------------------------------------------------------+
1590 * </code>2067 * </code>
1591 *2068 *
1592 * See also the Crypt_*::_setupInlineCrypt()'s for2069 * See also the \phpseclib\Crypt\*::_setupInlineCrypt()'s for
1593 * productive inline $cipher_code's how they works.2070 * productive inline $cipher_code's how they works.
1594 *2071 *
1595 * Structure of:2072 * Structure of:
@@ -1603,9 +2080,9 @@
1603 * );2080 * );
1604 * </code>2081 * </code>
1605 *2082 *
1606 * @see Crypt_Base::_setupInlineCrypt()2083 * @see \phpseclib\Crypt\Base::_setupInlineCrypt()
1607 * @see Crypt_Base::encrypt()2084 * @see \phpseclib\Crypt\Base::encrypt()
1608 * @see Crypt_Base::decrypt()2085 * @see \phpseclib\Crypt\Base::decrypt()
1609 * @param Array $cipher_code2086 * @param Array $cipher_code
1610 * @access private2087 * @access private
1611 * @return String (the name of the created callback function)2088 * @return String (the name of the created callback function)
@@ -1626,10 +2103,9 @@
1626 // merged with the $cipher_code algorithm2103 // merged with the $cipher_code algorithm
1627 // for encrypt- and decryption.2104 // for encrypt- and decryption.
1628 switch ($this->mode) {2105 switch ($this->mode) {
1629 case CRYPT_MODE_ECB:2106 case self::MODE_ECB:
1630 $encrypt = $init_encrypt . '2107 $encrypt = $init_encrypt . '
1631 $_ciphertext = "";2108 $_ciphertext = "";
1632 $_text = $self->_pad($_text);
1633 $_plaintext_len = strlen($_text);2109 $_plaintext_len = strlen($_text);
16342110
1635 for ($_i = 0; $_i < $_plaintext_len; $_i+= '.$block_size.') {2111 for ($_i = 0; $_i < $_plaintext_len; $_i+= '.$block_size.') {
@@ -1655,29 +2131,30 @@
1655 return $self->_unpad($_plaintext);2131 return $self->_unpad($_plaintext);
1656 ';2132 ';
1657 break;2133 break;
1658 case CRYPT_MODE_CTR:2134 case self::MODE_CTR:
1659 $encrypt = $init_encrypt . '2135 $encrypt = $init_encrypt . '
1660 $_ciphertext = "";2136 $_ciphertext = "";
1661 $_plaintext_len = strlen($_text);2137 $_plaintext_len = strlen($_text);
1662 $_xor = $self->encryptIV;2138 $_xor = $self->encryptIV;
1663 $_buffer = &$self->enbuffer;2139 $_buffer = &$self->enbuffer;
16642140 if (strlen($_buffer["ciphertext"])) {
1665 if (strlen($_buffer["encrypted"])) {
1666 for ($_i = 0; $_i < $_plaintext_len; $_i+= '.$block_size.') {2141 for ($_i = 0; $_i < $_plaintext_len; $_i+= '.$block_size.') {
1667 $_block = substr($_text, $_i, '.$block_size.');2142 $_block = substr($_text, $_i, '.$block_size.');
1668 if (strlen($_block) > strlen($_buffer["encrypted"])) {2143 if (strlen($_block) > strlen($_buffer["ciphertext"])) {
1669 $in = $self->_generateXor($_xor, '.$block_size.');2144 $in = $_xor;
1670 '.$encrypt_block.'2145 '.$encrypt_block.'
1671 $_buffer["encrypted"].= $in;2146 $self->_increment_str($_xor);
2147 $_buffer["ciphertext"].= $in;
1672 }2148 }
1673 $_key = $self->_stringShift($_buffer["encrypted"], '.$block_size.');2149 $_key = $self->_string_shift($_buffer["ciphertext"], '.$block_size.');
1674 $_ciphertext.= $_block ^ $_key;2150 $_ciphertext.= $_block ^ $_key;
1675 }2151 }
1676 } else {2152 } else {
1677 for ($_i = 0; $_i < $_plaintext_len; $_i+= '.$block_size.') {2153 for ($_i = 0; $_i < $_plaintext_len; $_i+= '.$block_size.') {
1678 $_block = substr($_text, $_i, '.$block_size.');2154 $_block = substr($_text, $_i, '.$block_size.');
1679 $in = $self->_generateXor($_xor, '.$block_size.');2155 $in = $_xor;
1680 '.$encrypt_block.'2156 '.$encrypt_block.'
2157 $self->_increment_str($_xor);
1681 $_key = $in;2158 $_key = $in;
1682 $_ciphertext.= $_block ^ $_key;2159 $_ciphertext.= $_block ^ $_key;
1683 }2160 }
@@ -1685,7 +2162,7 @@
1685 if ($self->continuousBuffer) {2162 if ($self->continuousBuffer) {
1686 $self->encryptIV = $_xor;2163 $self->encryptIV = $_xor;
1687 if ($_start = $_plaintext_len % '.$block_size.') {2164 if ($_start = $_plaintext_len % '.$block_size.') {
1688 $_buffer["encrypted"] = substr($_key, $_start) . $_buffer["encrypted"];2165 $_buffer["ciphertext"] = substr($_key, $_start) . $_buffer["ciphertext"];
1689 }2166 }
1690 }2167 }
16912168
@@ -1702,18 +2179,20 @@
1702 for ($_i = 0; $_i < $_ciphertext_len; $_i+= '.$block_size.') {2179 for ($_i = 0; $_i < $_ciphertext_len; $_i+= '.$block_size.') {
1703 $_block = substr($_text, $_i, '.$block_size.');2180 $_block = substr($_text, $_i, '.$block_size.');
1704 if (strlen($_block) > strlen($_buffer["ciphertext"])) {2181 if (strlen($_block) > strlen($_buffer["ciphertext"])) {
1705 $in = $self->_generateXor($_xor, '.$block_size.');2182 $in = $_xor;
1706 '.$encrypt_block.'2183 '.$encrypt_block.'
2184 $self->_increment_str($_xor);
1707 $_buffer["ciphertext"].= $in;2185 $_buffer["ciphertext"].= $in;
1708 }2186 }
1709 $_key = $self->_stringShift($_buffer["ciphertext"], '.$block_size.');2187 $_key = $self->_string_shift($_buffer["ciphertext"], '.$block_size.');
1710 $_plaintext.= $_block ^ $_key;2188 $_plaintext.= $_block ^ $_key;
1711 }2189 }
1712 } else {2190 } else {
1713 for ($_i = 0; $_i < $_ciphertext_len; $_i+= '.$block_size.') {2191 for ($_i = 0; $_i < $_ciphertext_len; $_i+= '.$block_size.') {
1714 $_block = substr($_text, $_i, '.$block_size.');2192 $_block = substr($_text, $_i, '.$block_size.');
1715 $in = $self->_generateXor($_xor, '.$block_size.');2193 $in = $_xor;
1716 '.$encrypt_block.'2194 '.$encrypt_block.'
2195 $self->_increment_str($_xor);
1717 $_key = $in;2196 $_key = $in;
1718 $_plaintext.= $_block ^ $_key;2197 $_plaintext.= $_block ^ $_key;
1719 }2198 }
@@ -1728,7 +2207,7 @@
1728 return $_plaintext;2207 return $_plaintext;
1729 ';2208 ';
1730 break;2209 break;
1731 case CRYPT_MODE_CFB:2210 case self::MODE_CFB:
1732 $encrypt = $init_encrypt . '2211 $encrypt = $init_encrypt . '
1733 $_ciphertext = "";2212 $_ciphertext = "";
1734 $_buffer = &$self->enbuffer;2213 $_buffer = &$self->enbuffer;
@@ -1827,7 +2306,7 @@
1827 return $_plaintext;2306 return $_plaintext;
1828 ';2307 ';
1829 break;2308 break;
1830 case CRYPT_MODE_OFB:2309 case self::MODE_OFB:
1831 $encrypt = $init_encrypt . '2310 $encrypt = $init_encrypt . '
1832 $_ciphertext = "";2311 $_ciphertext = "";
1833 $_plaintext_len = strlen($_text);2312 $_plaintext_len = strlen($_text);
@@ -1843,7 +2322,7 @@
1843 $_xor = $in;2322 $_xor = $in;
1844 $_buffer["xor"].= $_xor;2323 $_buffer["xor"].= $_xor;
1845 }2324 }
1846 $_key = $self->_stringShift($_buffer["xor"], '.$block_size.');2325 $_key = $self->_string_shift($_buffer["xor"], '.$block_size.');
1847 $_ciphertext.= $_block ^ $_key;2326 $_ciphertext.= $_block ^ $_key;
1848 }2327 }
1849 } else {2328 } else {
@@ -1879,7 +2358,7 @@
1879 $_xor = $in;2358 $_xor = $in;
1880 $_buffer["xor"].= $_xor;2359 $_buffer["xor"].= $_xor;
1881 }2360 }
1882 $_key = $self->_stringShift($_buffer["xor"], '.$block_size.');2361 $_key = $self->_string_shift($_buffer["xor"], '.$block_size.');
1883 $_plaintext.= $_block ^ $_key;2362 $_plaintext.= $_block ^ $_key;
1884 }2363 }
1885 } else {2364 } else {
@@ -1900,7 +2379,7 @@
1900 return $_plaintext;2379 return $_plaintext;
1901 ';2380 ';
1902 break;2381 break;
1903 case CRYPT_MODE_STREAM:2382 case self::MODE_STREAM:
1904 $encrypt = $init_encrypt . '2383 $encrypt = $init_encrypt . '
1905 $_ciphertext = "";2384 $_ciphertext = "";
1906 '.$encrypt_block.'2385 '.$encrypt_block.'
@@ -1912,11 +2391,10 @@
1912 return $_plaintext;2391 return $_plaintext;
1913 ';2392 ';
1914 break;2393 break;
1915 // case CRYPT_MODE_CBC:2394 // case self::MODE_CBC:
1916 default:2395 default:
1917 $encrypt = $init_encrypt . '2396 $encrypt = $init_encrypt . '
1918 $_ciphertext = "";2397 $_ciphertext = "";
1919 $_text = $self->_pad($_text);
1920 $_plaintext_len = strlen($_text);2398 $_plaintext_len = strlen($_text);
19212399
1922 $in = $self->encryptIV;2400 $in = $self->encryptIV;
@@ -1974,11 +2452,46 @@
1974 * for which $mode the lambda function was created.2452 * for which $mode the lambda function was created.
1975 *2453 *
1976 * @access private2454 * @access private
1977 * @return &Array2455 * @return Array &$functions
1978 */2456 */
1979 function &_getLambdaFunctions()2457 function &_getLambdaFunctions()
1980 {2458 {
1981 static $functions = array();2459 static $functions = array();
1982 return $functions;2460 return $functions;
1983 }2461 }
2462
2463 /**
2464 * Generates a digest from $bytes
2465 *
2466 * @see _setupInlineCrypt()
2467 * @access private
2468 * @param $bytes
2469 * @return String
2470 */
2471 function _hashInlineCryptFunction($bytes)
2472 {
2473 if (!isset(self::$WHIRLPOOL_AVAILABLE)) {
2474 self::$WHIRLPOOL_AVAILABLE = extension_loaded('hash') && in_array('whirlpool', hash_algos());
2475 }
2476
2477 $result = '';
2478 $hash = $bytes;
2479
2480 switch (true) {
2481 case self::$WHIRLPOOL_AVAILABLE:
2482 foreach (str_split($bytes, 64) as $t) {
2483 $hash = hash('whirlpool', $hash, true);
2484 $result .= $t ^ $hash;
2485 }
2486 return $result . hash('whirlpool', $hash, true);
2487 default:
2488 $len = strlen($bytes);
2489 for ($i = 0; $i < $len; $i+=20) {
2490 $t = substr($bytes, $i, 20);
2491 $hash = pack('H*', sha1($hash));
2492 $result .= $t ^ $hash;
2493 }
2494 return $result . pack('H*', sha1($hash));
2495 }
2496 }
1984}2497}
19852498
=== modified file 'libraries/phpseclib/Crypt/Random.php'
--- libraries/phpseclib/Crypt/Random.php 2015-04-28 10:31:57 +0000
+++ libraries/phpseclib/Crypt/Random.php 2015-10-27 17:36:50 +0000
@@ -3,54 +3,44 @@
3/**3/**
4 * Random Number Generator4 * Random Number Generator
5 *5 *
6 * PHP versions 4 and 56 * PHP version 5
7 *7 *
8 * Here's a short example of how to use this library:8 * Here's a short example of how to use this library:
9 * <code>9 * <code>
10 * <?php10 * <?php
11 * include 'Crypt/Random.php';11 * include 'vendor/autoload.php';
12 *12 *
13 * echo bin2hex(crypt_random_string(8));13 * echo bin2hex(\phpseclib\Crypt\Random::string(8));
14 * ?>14 * ?>
15 * </code>15 * </code>
16 *16 *
17 * LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy
18 * of this software and associated documentation files (the "Software"), to deal
19 * in the Software without restriction, including without limitation the rights
20 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
21 * copies of the Software, and to permit persons to whom the Software is
22 * furnished to do so, subject to the following conditions:
23 *
24 * The above copyright notice and this permission notice shall be included in
25 * all copies or substantial portions of the Software.
26 *
27 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
33 * THE SOFTWARE.
34 *
35 * @category Crypt17 * @category Crypt
36 * @package Crypt_Random18 * @package Random
37 * @author Jim Wigginton <terrafrost@php.net>19 * @author Jim Wigginton <terrafrost@php.net>
38 * @copyright MMVII Jim Wigginton20 * @copyright 2007 Jim Wigginton
39 * @license http://www.opensource.org/licenses/mit-license.html MIT License21 * @license http://www.opensource.org/licenses/mit-license.html MIT License
40 * @link http://phpseclib.sourceforge.net22 * @link http://phpseclib.sourceforge.net
41 */23 */
4224
43// laravel is a PHP framework that utilizes phpseclib. laravel workbenches may, independently,25namespace phpseclib\Crypt;
44// have phpseclib as a requirement as well. if you're developing such a program you may encounter26
45// a "Cannot redeclare crypt_random_string()" error.27use phpseclib\Crypt\AES;
46if (!function_exists('crypt_random_string')) {28use phpseclib\Crypt\Base;
47 /**29use phpseclib\Crypt\Blowfish;
48 * "Is Windows" test30use phpseclib\Crypt\DES;
49 *31use phpseclib\Crypt\RC4;
50 * @access private32use phpseclib\Crypt\TripleDES;
51 */33use phpseclib\Crypt\Twofish;
52 define('CRYPT_RANDOM_IS_WINDOWS', strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');34
5335/**
36 * Pure-PHP Random Number Generator
37 *
38 * @package Random
39 * @author Jim Wigginton <terrafrost@php.net>
40 * @access public
41 */
42class Random
43{
54 /**44 /**
55 * Generate a random string.45 * Generate a random string.
56 *46 *
@@ -60,11 +50,10 @@
60 *50 *
61 * @param Integer $length51 * @param Integer $length
62 * @return String52 * @return String
63 * @access public
64 */53 */
65 function crypt_random_string($length)54 public static function string($length)
66 {55 {
67 if (CRYPT_RANDOM_IS_WINDOWS) {56 if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
68 // method 1. prior to PHP 5.3 this would call rand() on windows hence the function_exists('class_alias') call.57 // method 1. prior to PHP 5.3 this would call rand() on windows hence the function_exists('class_alias') call.
69 // ie. class_alias is a function that was introduced in PHP 5.358 // ie. class_alias is a function that was introduced in PHP 5.3
70 if (function_exists('mcrypt_create_iv') && function_exists('class_alias')) {59 if (function_exists('mcrypt_create_iv') && function_exists('class_alias')) {
@@ -120,7 +109,7 @@
120 // easy to guess at. linux uses mouse clicks, keyboard timings, etc, as entropy sources, but109 // easy to guess at. linux uses mouse clicks, keyboard timings, etc, as entropy sources, but
121 // PHP isn't low level to be able to use those as sources and on a web server there's not likely110 // PHP isn't low level to be able to use those as sources and on a web server there's not likely
122 // going to be a ton of keyboard or mouse action. web servers do have one thing that we can use111 // going to be a ton of keyboard or mouse action. web servers do have one thing that we can use
123 // however. a ton of people visiting the website. obviously you don't want to base your seeding112 // however, a ton of people visiting the website. obviously you don't want to base your seeding
124 // soley on parameters a potential attacker sends but (1) not everything in $_SERVER is controlled113 // soley on parameters a potential attacker sends but (1) not everything in $_SERVER is controlled
125 // by the user and (2) this isn't just looking at the data sent by the current user - it's based114 // by the user and (2) this isn't just looking at the data sent by the current user - it's based
126 // on the data sent by all users. one user requests the page and a hash of their info is saved.115 // on the data sent by all users. one user requests the page and a hash of their info is saved.
@@ -168,9 +157,9 @@
168 ini_set('session.use_cookies', $old_use_cookies);157 ini_set('session.use_cookies', $old_use_cookies);
169 session_cache_limiter($old_session_cache_limiter);158 session_cache_limiter($old_session_cache_limiter);
170 } else {159 } else {
171 if ($_OLD_SESSION !== false) {160 if ($_OLD_SESSION !== false) {
172 $_SESSION = $_OLD_SESSION;161 $_SESSION = $_OLD_SESSION;
173 unset($_OLD_SESSION);162 unset($_OLD_SESSION);
174 } else {163 } else {
175 unset($_SESSION);164 unset($_SESSION);
176 }165 }
@@ -191,21 +180,27 @@
191 //180 //
192 // http://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator#Designs_based_on_cryptographic_primitives181 // http://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator#Designs_based_on_cryptographic_primitives
193 switch (true) {182 switch (true) {
194 case class_exists('Crypt_AES'):183 case class_exists('\phpseclib\Crypt\AES'):
195 $crypto = new Crypt_AES(CRYPT_AES_MODE_CTR);184 $crypto = new AES(Base::MODE_CTR);
196 break;185 break;
197 case class_exists('Crypt_TripleDES'):186 case class_exists('\phpseclib\Crypt\Twofish'):
198 $crypto = new Crypt_TripleDES(CRYPT_DES_MODE_CTR);187 $crypto = new Twofish(Base::MODE_CTR);
199 break;188 break;
200 case class_exists('Crypt_DES'):189 case class_exists('\phpseclib\Crypt\Blowfish'):
201 $crypto = new Crypt_DES(CRYPT_DES_MODE_CTR);190 $crypto = new Blowfish(Base::MODE_CTR);
202 break;191 break;
203 case class_exists('Crypt_RC4'):192 case class_exists('\phpseclib\Crypt\TripleDES'):
204 $crypto = new Crypt_RC4();193 $crypto = new TripleDES(Base::MODE_CTR);
194 break;
195 case class_exists('\phpseclib\Crypt\DES'):
196 $crypto = new DES(Base::MODE_CTR);
197 break;
198 case class_exists('\phpseclib\Crypt\RC4'):
199 $crypto = new RC4();
205 break;200 break;
206 default:201 default:
207 $crypto = $seed;202 user_error(__CLASS__ . ' requires at least one symmetric cipher be loaded');
208 return crypt_random_string($length);203 return false;
209 }204 }
210205
211 $crypto->setKey($key);206 $crypto->setKey($key);
@@ -213,37 +208,21 @@
213 $crypto->enableContinuousBuffer();208 $crypto->enableContinuousBuffer();
214 }209 }
215210
216 if (is_string($crypto)) {
217 // the following is based off of ANSI X9.31:
218 //
219 // http://csrc.nist.gov/groups/STM/cavp/documents/rng/931rngext.pdf
220 //
221 // OpenSSL uses that same standard for it's random numbers:
222 //
223 // http://www.opensource.apple.com/source/OpenSSL/OpenSSL-38/openssl/fips-1.0/rand/fips_rand.c
224 // (do a search for "ANS X9.31 A.2.4")
225 //
226 // ANSI X9.31 recommends ciphers be used and phpseclib does use them if they're available (see
227 // later on in the code) but if they're not we'll use sha1
228 $result = '';
229 while (strlen($result) < $length) { // each loop adds 20 bytes
230 // microtime() isn't packed as "densely" as it could be but then neither is that the idea.
231 // the idea is simply to ensure that each "block" has a unique element to it.
232 $i = pack('H*', sha1(microtime()));
233 $r = pack('H*', sha1($i ^ $v));
234 $v = pack('H*', sha1($r ^ $i));
235 $result.= $r;
236 }
237 return substr($result, 0, $length);
238 }
239
240 //return $crypto->encrypt(str_repeat("\0", $length));211 //return $crypto->encrypt(str_repeat("\0", $length));
241212
213 // the following is based off of ANSI X9.31:
214 //
215 // http://csrc.nist.gov/groups/STM/cavp/documents/rng/931rngext.pdf
216 //
217 // OpenSSL uses that same standard for it's random numbers:
218 //
219 // http://www.opensource.apple.com/source/OpenSSL/OpenSSL-38/openssl/fips-1.0/rand/fips_rand.c
220 // (do a search for "ANS X9.31 A.2.4")
242 $result = '';221 $result = '';
243 while (strlen($result) < $length) {222 while (strlen($result) < $length) {
244 $i = $crypto->encrypt(microtime());223 $i = $crypto->encrypt(microtime()); // strlen(microtime()) == 21
245 $r = $crypto->encrypt($i ^ $v);224 $r = $crypto->encrypt($i ^ $v); // strlen($v) == 20
246 $v = $crypto->encrypt($r ^ $i);225 $v = $crypto->encrypt($r ^ $i); // strlen($r) == 20
247 $result.= $r;226 $result.= $r;
248 }227 }
249 return substr($result, 0, $length);228 return substr($result, 0, $length);
250229
=== modified file 'libraries/phpseclib/Crypt/Rijndael.php'
--- libraries/phpseclib/Crypt/Rijndael.php 2015-04-28 10:31:57 +0000
+++ libraries/phpseclib/Crypt/Rijndael.php 2015-10-27 17:36:50 +0000
@@ -5,13 +5,13 @@
5 *5 *
6 * Uses mcrypt, if available/possible, and an internal implementation, otherwise.6 * Uses mcrypt, if available/possible, and an internal implementation, otherwise.
7 *7 *
8 * PHP versions 4 and 58 * PHP version 5
9 *9 *
10 * If {@link Crypt_Rijndael::setBlockLength() setBlockLength()} isn't called, it'll be assumed to be 128 bits. If10 * If {@link \phpseclib\Crypt\Rijndael::setBlockLength() setBlockLength()} isn't called, it'll be assumed to be 128 bits. If
11 * {@link Crypt_Rijndael::setKeyLength() setKeyLength()} isn't called, it'll be calculated from11 * {@link \phpseclib\Crypt\Rijndael::setKeyLength() setKeyLength()} isn't called, it'll be calculated from
12 * {@link Crypt_Rijndael::setKey() setKey()}. ie. if the key is 128-bits, the key length will be 128-bits. If it's12 * {@link \phpseclib\Crypt\Rijndael::setKey() setKey()}. ie. if the key is 128-bits, the key length will be 128-bits. If it's
13 * 136-bits it'll be null-padded to 192-bits and 192 bits will be the key length until13 * 136-bits it'll be null-padded to 192-bits and 192 bits will be the key length until
14 * {@link Crypt_Rijndael::setKey() setKey()} is called, again, at which point, it'll be recalculated.14 * {@link \phpseclib\Crypt\Rijndael::setKey() setKey()} is called, again, at which point, it'll be recalculated.
15 *15 *
16 * Not all Rijndael implementations may support 160-bits or 224-bits as the block length / key length. mcrypt, for example,16 * Not all Rijndael implementations may support 160-bits or 224-bits as the block length / key length. mcrypt, for example,
17 * does not. AES, itself, only supports block lengths of 128 and key lengths of 128, 192, and 256.17 * does not. AES, itself, only supports block lengths of 128 and key lengths of 128, 192, and 256.
@@ -28,9 +28,9 @@
28 * Here's a short example of how to use this library:28 * Here's a short example of how to use this library:
29 * <code>29 * <code>
30 * <?php30 * <?php
31 * include 'Crypt/Rijndael.php';31 * include 'vendor/autoload.php';
32 *32 *
33 * $rijndael = new Crypt_Rijndael();33 * $rijndael = new \phpseclib\Crypt\Rijndael();
34 *34 *
35 * $rijndael->setKey('abcdefghijklmnop');35 * $rijndael->setKey('abcdefghijklmnop');
36 *36 *
@@ -44,133 +44,48 @@
44 * ?>44 * ?>
45 * </code>45 * </code>
46 *46 *
47 * LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy
48 * of this software and associated documentation files (the "Software"), to deal
49 * in the Software without restriction, including without limitation the rights
50 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
51 * copies of the Software, and to permit persons to whom the Software is
52 * furnished to do so, subject to the following conditions:
53 *
54 * The above copyright notice and this permission notice shall be included in
55 * all copies or substantial portions of the Software.
56 *
57 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
58 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
59 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
60 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
61 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
62 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
63 * THE SOFTWARE.
64 *
65 * @category Crypt47 * @category Crypt
66 * @package Crypt_Rijndael48 * @package Rijndael
67 * @author Jim Wigginton <terrafrost@php.net>49 * @author Jim Wigginton <terrafrost@php.net>
68 * @copyright MMVIII Jim Wigginton50 * @copyright 2008 Jim Wigginton
69 * @license http://www.opensource.org/licenses/mit-license.html MIT License51 * @license http://www.opensource.org/licenses/mit-license.html MIT License
70 * @link http://phpseclib.sourceforge.net52 * @link http://phpseclib.sourceforge.net
71 */53 */
7254
73/**55namespace phpseclib\Crypt;
74 * Include Crypt_Base56
75 *57use phpseclib\Crypt\Base;
76 * Base cipher class
77 */
78if (!class_exists('Crypt_Base')) {
79 include_once 'Base.php';
80}
81
82/**#@+
83 * @access public
84 * @see Crypt_Rijndael::encrypt()
85 * @see Crypt_Rijndael::decrypt()
86 */
87/**
88 * Encrypt / decrypt using the Counter mode.
89 *
90 * Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.
91 *
92 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Counter_.28CTR.29
93 */
94define('CRYPT_RIJNDAEL_MODE_CTR', CRYPT_MODE_CTR);
95/**
96 * Encrypt / decrypt using the Electronic Code Book mode.
97 *
98 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29
99 */
100define('CRYPT_RIJNDAEL_MODE_ECB', CRYPT_MODE_ECB);
101/**
102 * Encrypt / decrypt using the Code Book Chaining mode.
103 *
104 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher-block_chaining_.28CBC.29
105 */
106define('CRYPT_RIJNDAEL_MODE_CBC', CRYPT_MODE_CBC);
107/**
108 * Encrypt / decrypt using the Cipher Feedback mode.
109 *
110 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher_feedback_.28CFB.29
111 */
112define('CRYPT_RIJNDAEL_MODE_CFB', CRYPT_MODE_CFB);
113/**
114 * Encrypt / decrypt using the Cipher Feedback mode.
115 *
116 * @link http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Output_feedback_.28OFB.29
117 */
118define('CRYPT_RIJNDAEL_MODE_OFB', CRYPT_MODE_OFB);
119/**#@-*/
120
121/**#@+
122 * @access private
123 * @see Crypt_Rijndael::Crypt_Rijndael()
124 */
125/**
126 * Toggles the internal implementation
127 */
128define('CRYPT_RIJNDAEL_MODE_INTERNAL', CRYPT_MODE_INTERNAL);
129/**
130 * Toggles the mcrypt implementation
131 */
132define('CRYPT_RIJNDAEL_MODE_MCRYPT', CRYPT_MODE_MCRYPT);
133/**#@-*/
13458
135/**59/**
136 * Pure-PHP implementation of Rijndael.60 * Pure-PHP implementation of Rijndael.
137 *61 *
138 * @package Crypt_Rijndael62 * @package Rijndael
139 * @author Jim Wigginton <terrafrost@php.net>63 * @author Jim Wigginton <terrafrost@php.net>
140 * @access public64 * @access public
141 */65 */
142class Crypt_Rijndael extends Crypt_Base66class Rijndael extends Base
143{67{
144 /**68 /**
145 * The default password key_size used by setPassword()69 * The default password key_size used by setPassword()
146 *70 *
147 * @see Crypt_Base::password_key_size71 * @see \phpseclib\Crypt\Base::password_key_size
148 * @see Crypt_Base::setPassword()72 * @see \phpseclib\Crypt\Base::setPassword()
149 * @var Integer73 * @var Integer
150 * @access private74 * @access private
151 */75 */
152 var $password_key_size = 16;76 var $password_key_size = 16;
15377
154 /**78 /**
155 * The namespace used by the cipher for its constants.
156 *
157 * @see Crypt_Base::const_namespace
158 * @var String
159 * @access private
160 */
161 var $const_namespace = 'RIJNDAEL';
162
163 /**
164 * The mcrypt specific name of the cipher79 * The mcrypt specific name of the cipher
165 *80 *
166 * Mcrypt is useable for 128/192/256-bit $block_size/$key_size. For 160/224 not.81 * Mcrypt is useable for 128/192/256-bit $block_size/$key_size. For 160/224 not.
167 * Crypt_Rijndael determines automatically whether mcrypt is useable82 * \phpseclib\Crypt\Rijndael determines automatically whether mcrypt is useable
168 * or not for the current $block_size/$key_size.83 * or not for the current $block_size/$key_size.
169 * In case of, $cipher_name_mcrypt will be set dynamically at run time accordingly.84 * In case of, $cipher_name_mcrypt will be set dynamically at run time accordingly.
170 *85 *
171 * @see Crypt_Base::cipher_name_mcrypt86 * @see \phpseclib\Crypt\Base::cipher_name_mcrypt
172 * @see Crypt_Base::engine87 * @see \phpseclib\Crypt\Base::engine
173 * @see _setupEngine()88 * @see isValidEngine()
174 * @var String89 * @var String
175 * @access private90 * @access private
176 */91 */
@@ -179,8 +94,8 @@
179 /**94 /**
180 * The default salt used by setPassword()95 * The default salt used by setPassword()
181 *96 *
182 * @see Crypt_Base::password_default_salt97 * @see \phpseclib\Crypt\Base::password_default_salt
183 * @see Crypt_Base::setPassword()98 * @see \phpseclib\Crypt\Base::setPassword()
184 * @var String99 * @var String
185 * @access private100 * @access private
186 */101 */
@@ -223,7 +138,6 @@
223 * because the encryption / decryption / key schedule creation requires this number and not $block_size. We could138 * because the encryption / decryption / key schedule creation requires this number and not $block_size. We could
224 * derive this from $block_size or vice versa, but that'd mean we'd have to do multiple shift operations, so in lieu139 * derive this from $block_size or vice versa, but that'd mean we'd have to do multiple shift operations, so in lieu
225 * of that, we'll just precompute it once.140 * of that, we'll just precompute it once.
226 *
227 */141 */
228 var $Nb = 4;142 var $Nb = 4;
229143
@@ -276,432 +190,27 @@
276 var $kl;190 var $kl;
277191
278 /**192 /**
279 * Precomputed mixColumns table
280 *
281 * According to <http://csrc.nist.gov/archive/aes/rijndael/Rijndael-ammended.pdf#page=19> (section 5.2.1),
282 * precomputed tables can be used in the mixColumns phase. in that example, they're assigned t0...t3, so
283 * those are the names we'll use.
284 *
285 * @see Crypt_Rijndael:_encryptBlock()
286 * @see Crypt_Rijndael:_decryptBlock()
287 * @var Array
288 * @access private
289 */
290 var $t0 = array(
291 0xC66363A5, 0xF87C7C84, 0xEE777799, 0xF67B7B8D, 0xFFF2F20D, 0xD66B6BBD, 0xDE6F6FB1, 0x91C5C554,
292 0x60303050, 0x02010103, 0xCE6767A9, 0x562B2B7D, 0xE7FEFE19, 0xB5D7D762, 0x4DABABE6, 0xEC76769A,
293 0x8FCACA45, 0x1F82829D, 0x89C9C940, 0xFA7D7D87, 0xEFFAFA15, 0xB25959EB, 0x8E4747C9, 0xFBF0F00B,
294 0x41ADADEC, 0xB3D4D467, 0x5FA2A2FD, 0x45AFAFEA, 0x239C9CBF, 0x53A4A4F7, 0xE4727296, 0x9BC0C05B,
295 0x75B7B7C2, 0xE1FDFD1C, 0x3D9393AE, 0x4C26266A, 0x6C36365A, 0x7E3F3F41, 0xF5F7F702, 0x83CCCC4F,
296 0x6834345C, 0x51A5A5F4, 0xD1E5E534, 0xF9F1F108, 0xE2717193, 0xABD8D873, 0x62313153, 0x2A15153F,
297 0x0804040C, 0x95C7C752, 0x46232365, 0x9DC3C35E, 0x30181828, 0x379696A1, 0x0A05050F, 0x2F9A9AB5,
298 0x0E070709, 0x24121236, 0x1B80809B, 0xDFE2E23D, 0xCDEBEB26, 0x4E272769, 0x7FB2B2CD, 0xEA75759F,
299 0x1209091B, 0x1D83839E, 0x582C2C74, 0x341A1A2E, 0x361B1B2D, 0xDC6E6EB2, 0xB45A5AEE, 0x5BA0A0FB,
300 0xA45252F6, 0x763B3B4D, 0xB7D6D661, 0x7DB3B3CE, 0x5229297B, 0xDDE3E33E, 0x5E2F2F71, 0x13848497,
301 0xA65353F5, 0xB9D1D168, 0x00000000, 0xC1EDED2C, 0x40202060, 0xE3FCFC1F, 0x79B1B1C8, 0xB65B5BED,
302 0xD46A6ABE, 0x8DCBCB46, 0x67BEBED9, 0x7239394B, 0x944A4ADE, 0x984C4CD4, 0xB05858E8, 0x85CFCF4A,
303 0xBBD0D06B, 0xC5EFEF2A, 0x4FAAAAE5, 0xEDFBFB16, 0x864343C5, 0x9A4D4DD7, 0x66333355, 0x11858594,
304 0x8A4545CF, 0xE9F9F910, 0x04020206, 0xFE7F7F81, 0xA05050F0, 0x783C3C44, 0x259F9FBA, 0x4BA8A8E3,
305 0xA25151F3, 0x5DA3A3FE, 0x804040C0, 0x058F8F8A, 0x3F9292AD, 0x219D9DBC, 0x70383848, 0xF1F5F504,
306 0x63BCBCDF, 0x77B6B6C1, 0xAFDADA75, 0x42212163, 0x20101030, 0xE5FFFF1A, 0xFDF3F30E, 0xBFD2D26D,
307 0x81CDCD4C, 0x180C0C14, 0x26131335, 0xC3ECEC2F, 0xBE5F5FE1, 0x359797A2, 0x884444CC, 0x2E171739,
308 0x93C4C457, 0x55A7A7F2, 0xFC7E7E82, 0x7A3D3D47, 0xC86464AC, 0xBA5D5DE7, 0x3219192B, 0xE6737395,
309 0xC06060A0, 0x19818198, 0x9E4F4FD1, 0xA3DCDC7F, 0x44222266, 0x542A2A7E, 0x3B9090AB, 0x0B888883,
310 0x8C4646CA, 0xC7EEEE29, 0x6BB8B8D3, 0x2814143C, 0xA7DEDE79, 0xBC5E5EE2, 0x160B0B1D, 0xADDBDB76,
311 0xDBE0E03B, 0x64323256, 0x743A3A4E, 0x140A0A1E, 0x924949DB, 0x0C06060A, 0x4824246C, 0xB85C5CE4,
312 0x9FC2C25D, 0xBDD3D36E, 0x43ACACEF, 0xC46262A6, 0x399191A8, 0x319595A4, 0xD3E4E437, 0xF279798B,
313 0xD5E7E732, 0x8BC8C843, 0x6E373759, 0xDA6D6DB7, 0x018D8D8C, 0xB1D5D564, 0x9C4E4ED2, 0x49A9A9E0,
314 0xD86C6CB4, 0xAC5656FA, 0xF3F4F407, 0xCFEAEA25, 0xCA6565AF, 0xF47A7A8E, 0x47AEAEE9, 0x10080818,
315 0x6FBABAD5, 0xF0787888, 0x4A25256F, 0x5C2E2E72, 0x381C1C24, 0x57A6A6F1, 0x73B4B4C7, 0x97C6C651,
316 0xCBE8E823, 0xA1DDDD7C, 0xE874749C, 0x3E1F1F21, 0x964B4BDD, 0x61BDBDDC, 0x0D8B8B86, 0x0F8A8A85,
317 0xE0707090, 0x7C3E3E42, 0x71B5B5C4, 0xCC6666AA, 0x904848D8, 0x06030305, 0xF7F6F601, 0x1C0E0E12,
318 0xC26161A3, 0x6A35355F, 0xAE5757F9, 0x69B9B9D0, 0x17868691, 0x99C1C158, 0x3A1D1D27, 0x279E9EB9,
319 0xD9E1E138, 0xEBF8F813, 0x2B9898B3, 0x22111133, 0xD26969BB, 0xA9D9D970, 0x078E8E89, 0x339494A7,
320 0x2D9B9BB6, 0x3C1E1E22, 0x15878792, 0xC9E9E920, 0x87CECE49, 0xAA5555FF, 0x50282878, 0xA5DFDF7A,
321 0x038C8C8F, 0x59A1A1F8, 0x09898980, 0x1A0D0D17, 0x65BFBFDA, 0xD7E6E631, 0x844242C6, 0xD06868B8,
322 0x824141C3, 0x299999B0, 0x5A2D2D77, 0x1E0F0F11, 0x7BB0B0CB, 0xA85454FC, 0x6DBBBBD6, 0x2C16163A
323 );
324
325 /**
326 * Precomputed mixColumns table
327 *
328 * @see Crypt_Rijndael:_encryptBlock()
329 * @see Crypt_Rijndael:_decryptBlock()
330 * @var Array
331 * @access private
332 */
333 var $t1 = array(
334 0xA5C66363, 0x84F87C7C, 0x99EE7777, 0x8DF67B7B, 0x0DFFF2F2, 0xBDD66B6B, 0xB1DE6F6F, 0x5491C5C5,
335 0x50603030, 0x03020101, 0xA9CE6767, 0x7D562B2B, 0x19E7FEFE, 0x62B5D7D7, 0xE64DABAB, 0x9AEC7676,
336 0x458FCACA, 0x9D1F8282, 0x4089C9C9, 0x87FA7D7D, 0x15EFFAFA, 0xEBB25959, 0xC98E4747, 0x0BFBF0F0,
337 0xEC41ADAD, 0x67B3D4D4, 0xFD5FA2A2, 0xEA45AFAF, 0xBF239C9C, 0xF753A4A4, 0x96E47272, 0x5B9BC0C0,
338 0xC275B7B7, 0x1CE1FDFD, 0xAE3D9393, 0x6A4C2626, 0x5A6C3636, 0x417E3F3F, 0x02F5F7F7, 0x4F83CCCC,
339 0x5C683434, 0xF451A5A5, 0x34D1E5E5, 0x08F9F1F1, 0x93E27171, 0x73ABD8D8, 0x53623131, 0x3F2A1515,
340 0x0C080404, 0x5295C7C7, 0x65462323, 0x5E9DC3C3, 0x28301818, 0xA1379696, 0x0F0A0505, 0xB52F9A9A,
341 0x090E0707, 0x36241212, 0x9B1B8080, 0x3DDFE2E2, 0x26CDEBEB, 0x694E2727, 0xCD7FB2B2, 0x9FEA7575,
342 0x1B120909, 0x9E1D8383, 0x74582C2C, 0x2E341A1A, 0x2D361B1B, 0xB2DC6E6E, 0xEEB45A5A, 0xFB5BA0A0,
343 0xF6A45252, 0x4D763B3B, 0x61B7D6D6, 0xCE7DB3B3, 0x7B522929, 0x3EDDE3E3, 0x715E2F2F, 0x97138484,
344 0xF5A65353, 0x68B9D1D1, 0x00000000, 0x2CC1EDED, 0x60402020, 0x1FE3FCFC, 0xC879B1B1, 0xEDB65B5B,
345 0xBED46A6A, 0x468DCBCB, 0xD967BEBE, 0x4B723939, 0xDE944A4A, 0xD4984C4C, 0xE8B05858, 0x4A85CFCF,
346 0x6BBBD0D0, 0x2AC5EFEF, 0xE54FAAAA, 0x16EDFBFB, 0xC5864343, 0xD79A4D4D, 0x55663333, 0x94118585,
347 0xCF8A4545, 0x10E9F9F9, 0x06040202, 0x81FE7F7F, 0xF0A05050, 0x44783C3C, 0xBA259F9F, 0xE34BA8A8,
348 0xF3A25151, 0xFE5DA3A3, 0xC0804040, 0x8A058F8F, 0xAD3F9292, 0xBC219D9D, 0x48703838, 0x04F1F5F5,
349 0xDF63BCBC, 0xC177B6B6, 0x75AFDADA, 0x63422121, 0x30201010, 0x1AE5FFFF, 0x0EFDF3F3, 0x6DBFD2D2,
350 0x4C81CDCD, 0x14180C0C, 0x35261313, 0x2FC3ECEC, 0xE1BE5F5F, 0xA2359797, 0xCC884444, 0x392E1717,
351 0x5793C4C4, 0xF255A7A7, 0x82FC7E7E, 0x477A3D3D, 0xACC86464, 0xE7BA5D5D, 0x2B321919, 0x95E67373,
352 0xA0C06060, 0x98198181, 0xD19E4F4F, 0x7FA3DCDC, 0x66442222, 0x7E542A2A, 0xAB3B9090, 0x830B8888,
353 0xCA8C4646, 0x29C7EEEE, 0xD36BB8B8, 0x3C281414, 0x79A7DEDE, 0xE2BC5E5E, 0x1D160B0B, 0x76ADDBDB,
354 0x3BDBE0E0, 0x56643232, 0x4E743A3A, 0x1E140A0A, 0xDB924949, 0x0A0C0606, 0x6C482424, 0xE4B85C5C,
355 0x5D9FC2C2, 0x6EBDD3D3, 0xEF43ACAC, 0xA6C46262, 0xA8399191, 0xA4319595, 0x37D3E4E4, 0x8BF27979,
356 0x32D5E7E7, 0x438BC8C8, 0x596E3737, 0xB7DA6D6D, 0x8C018D8D, 0x64B1D5D5, 0xD29C4E4E, 0xE049A9A9,
357 0xB4D86C6C, 0xFAAC5656, 0x07F3F4F4, 0x25CFEAEA, 0xAFCA6565, 0x8EF47A7A, 0xE947AEAE, 0x18100808,
358 0xD56FBABA, 0x88F07878, 0x6F4A2525, 0x725C2E2E, 0x24381C1C, 0xF157A6A6, 0xC773B4B4, 0x5197C6C6,
359 0x23CBE8E8, 0x7CA1DDDD, 0x9CE87474, 0x213E1F1F, 0xDD964B4B, 0xDC61BDBD, 0x860D8B8B, 0x850F8A8A,
360 0x90E07070, 0x427C3E3E, 0xC471B5B5, 0xAACC6666, 0xD8904848, 0x05060303, 0x01F7F6F6, 0x121C0E0E,
361 0xA3C26161, 0x5F6A3535, 0xF9AE5757, 0xD069B9B9, 0x91178686, 0x5899C1C1, 0x273A1D1D, 0xB9279E9E,
362 0x38D9E1E1, 0x13EBF8F8, 0xB32B9898, 0x33221111, 0xBBD26969, 0x70A9D9D9, 0x89078E8E, 0xA7339494,
363 0xB62D9B9B, 0x223C1E1E, 0x92158787, 0x20C9E9E9, 0x4987CECE, 0xFFAA5555, 0x78502828, 0x7AA5DFDF,
364 0x8F038C8C, 0xF859A1A1, 0x80098989, 0x171A0D0D, 0xDA65BFBF, 0x31D7E6E6, 0xC6844242, 0xB8D06868,
365 0xC3824141, 0xB0299999, 0x775A2D2D, 0x111E0F0F, 0xCB7BB0B0, 0xFCA85454, 0xD66DBBBB, 0x3A2C1616
366 );
367
368 /**
369 * Precomputed mixColumns table
370 *
371 * @see Crypt_Rijndael:_encryptBlock()
372 * @see Crypt_Rijndael:_decryptBlock()
373 * @var Array
374 * @access private
375 */
376 var $t2 = array(
377 0x63A5C663, 0x7C84F87C, 0x7799EE77, 0x7B8DF67B, 0xF20DFFF2, 0x6BBDD66B, 0x6FB1DE6F, 0xC55491C5,
378 0x30506030, 0x01030201, 0x67A9CE67, 0x2B7D562B, 0xFE19E7FE, 0xD762B5D7, 0xABE64DAB, 0x769AEC76,
379 0xCA458FCA, 0x829D1F82, 0xC94089C9, 0x7D87FA7D, 0xFA15EFFA, 0x59EBB259, 0x47C98E47, 0xF00BFBF0,
380 0xADEC41AD, 0xD467B3D4, 0xA2FD5FA2, 0xAFEA45AF, 0x9CBF239C, 0xA4F753A4, 0x7296E472, 0xC05B9BC0,
381 0xB7C275B7, 0xFD1CE1FD, 0x93AE3D93, 0x266A4C26, 0x365A6C36, 0x3F417E3F, 0xF702F5F7, 0xCC4F83CC,
382 0x345C6834, 0xA5F451A5, 0xE534D1E5, 0xF108F9F1, 0x7193E271, 0xD873ABD8, 0x31536231, 0x153F2A15,
383 0x040C0804, 0xC75295C7, 0x23654623, 0xC35E9DC3, 0x18283018, 0x96A13796, 0x050F0A05, 0x9AB52F9A,
384 0x07090E07, 0x12362412, 0x809B1B80, 0xE23DDFE2, 0xEB26CDEB, 0x27694E27, 0xB2CD7FB2, 0x759FEA75,
385 0x091B1209, 0x839E1D83, 0x2C74582C, 0x1A2E341A, 0x1B2D361B, 0x6EB2DC6E, 0x5AEEB45A, 0xA0FB5BA0,
386 0x52F6A452, 0x3B4D763B, 0xD661B7D6, 0xB3CE7DB3, 0x297B5229, 0xE33EDDE3, 0x2F715E2F, 0x84971384,
387 0x53F5A653, 0xD168B9D1, 0x00000000, 0xED2CC1ED, 0x20604020, 0xFC1FE3FC, 0xB1C879B1, 0x5BEDB65B,
388 0x6ABED46A, 0xCB468DCB, 0xBED967BE, 0x394B7239, 0x4ADE944A, 0x4CD4984C, 0x58E8B058, 0xCF4A85CF,
389 0xD06BBBD0, 0xEF2AC5EF, 0xAAE54FAA, 0xFB16EDFB, 0x43C58643, 0x4DD79A4D, 0x33556633, 0x85941185,
390 0x45CF8A45, 0xF910E9F9, 0x02060402, 0x7F81FE7F, 0x50F0A050, 0x3C44783C, 0x9FBA259F, 0xA8E34BA8,
391 0x51F3A251, 0xA3FE5DA3, 0x40C08040, 0x8F8A058F, 0x92AD3F92, 0x9DBC219D, 0x38487038, 0xF504F1F5,
392 0xBCDF63BC, 0xB6C177B6, 0xDA75AFDA, 0x21634221, 0x10302010, 0xFF1AE5FF, 0xF30EFDF3, 0xD26DBFD2,
393 0xCD4C81CD, 0x0C14180C, 0x13352613, 0xEC2FC3EC, 0x5FE1BE5F, 0x97A23597, 0x44CC8844, 0x17392E17,
394 0xC45793C4, 0xA7F255A7, 0x7E82FC7E, 0x3D477A3D, 0x64ACC864, 0x5DE7BA5D, 0x192B3219, 0x7395E673,
395 0x60A0C060, 0x81981981, 0x4FD19E4F, 0xDC7FA3DC, 0x22664422, 0x2A7E542A, 0x90AB3B90, 0x88830B88,
396 0x46CA8C46, 0xEE29C7EE, 0xB8D36BB8, 0x143C2814, 0xDE79A7DE, 0x5EE2BC5E, 0x0B1D160B, 0xDB76ADDB,
397 0xE03BDBE0, 0x32566432, 0x3A4E743A, 0x0A1E140A, 0x49DB9249, 0x060A0C06, 0x246C4824, 0x5CE4B85C,
398 0xC25D9FC2, 0xD36EBDD3, 0xACEF43AC, 0x62A6C462, 0x91A83991, 0x95A43195, 0xE437D3E4, 0x798BF279,
399 0xE732D5E7, 0xC8438BC8, 0x37596E37, 0x6DB7DA6D, 0x8D8C018D, 0xD564B1D5, 0x4ED29C4E, 0xA9E049A9,
400 0x6CB4D86C, 0x56FAAC56, 0xF407F3F4, 0xEA25CFEA, 0x65AFCA65, 0x7A8EF47A, 0xAEE947AE, 0x08181008,
401 0xBAD56FBA, 0x7888F078, 0x256F4A25, 0x2E725C2E, 0x1C24381C, 0xA6F157A6, 0xB4C773B4, 0xC65197C6,
402 0xE823CBE8, 0xDD7CA1DD, 0x749CE874, 0x1F213E1F, 0x4BDD964B, 0xBDDC61BD, 0x8B860D8B, 0x8A850F8A,
403 0x7090E070, 0x3E427C3E, 0xB5C471B5, 0x66AACC66, 0x48D89048, 0x03050603, 0xF601F7F6, 0x0E121C0E,
404 0x61A3C261, 0x355F6A35, 0x57F9AE57, 0xB9D069B9, 0x86911786, 0xC15899C1, 0x1D273A1D, 0x9EB9279E,
405 0xE138D9E1, 0xF813EBF8, 0x98B32B98, 0x11332211, 0x69BBD269, 0xD970A9D9, 0x8E89078E, 0x94A73394,
406 0x9BB62D9B, 0x1E223C1E, 0x87921587, 0xE920C9E9, 0xCE4987CE, 0x55FFAA55, 0x28785028, 0xDF7AA5DF,
407 0x8C8F038C, 0xA1F859A1, 0x89800989, 0x0D171A0D, 0xBFDA65BF, 0xE631D7E6, 0x42C68442, 0x68B8D068,
408 0x41C38241, 0x99B02999, 0x2D775A2D, 0x0F111E0F, 0xB0CB7BB0, 0x54FCA854, 0xBBD66DBB, 0x163A2C16
409 );
410
411 /**
412 * Precomputed mixColumns table
413 *
414 * @see Crypt_Rijndael:_encryptBlock()
415 * @see Crypt_Rijndael:_decryptBlock()
416 * @var Array
417 * @access private
418 */
419 var $t3 = array(
420 0x6363A5C6, 0x7C7C84F8, 0x777799EE, 0x7B7B8DF6, 0xF2F20DFF, 0x6B6BBDD6, 0x6F6FB1DE, 0xC5C55491,
421 0x30305060, 0x01010302, 0x6767A9CE, 0x2B2B7D56, 0xFEFE19E7, 0xD7D762B5, 0xABABE64D, 0x76769AEC,
422 0xCACA458F, 0x82829D1F, 0xC9C94089, 0x7D7D87FA, 0xFAFA15EF, 0x5959EBB2, 0x4747C98E, 0xF0F00BFB,
423 0xADADEC41, 0xD4D467B3, 0xA2A2FD5F, 0xAFAFEA45, 0x9C9CBF23, 0xA4A4F753, 0x727296E4, 0xC0C05B9B,
424 0xB7B7C275, 0xFDFD1CE1, 0x9393AE3D, 0x26266A4C, 0x36365A6C, 0x3F3F417E, 0xF7F702F5, 0xCCCC4F83,
425 0x34345C68, 0xA5A5F451, 0xE5E534D1, 0xF1F108F9, 0x717193E2, 0xD8D873AB, 0x31315362, 0x15153F2A,
426 0x04040C08, 0xC7C75295, 0x23236546, 0xC3C35E9D, 0x18182830, 0x9696A137, 0x05050F0A, 0x9A9AB52F,
427 0x0707090E, 0x12123624, 0x80809B1B, 0xE2E23DDF, 0xEBEB26CD, 0x2727694E, 0xB2B2CD7F, 0x75759FEA,
428 0x09091B12, 0x83839E1D, 0x2C2C7458, 0x1A1A2E34, 0x1B1B2D36, 0x6E6EB2DC, 0x5A5AEEB4, 0xA0A0FB5B,
429 0x5252F6A4, 0x3B3B4D76, 0xD6D661B7, 0xB3B3CE7D, 0x29297B52, 0xE3E33EDD, 0x2F2F715E, 0x84849713,
430 0x5353F5A6, 0xD1D168B9, 0x00000000, 0xEDED2CC1, 0x20206040, 0xFCFC1FE3, 0xB1B1C879, 0x5B5BEDB6,
431 0x6A6ABED4, 0xCBCB468D, 0xBEBED967, 0x39394B72, 0x4A4ADE94, 0x4C4CD498, 0x5858E8B0, 0xCFCF4A85,
432 0xD0D06BBB, 0xEFEF2AC5, 0xAAAAE54F, 0xFBFB16ED, 0x4343C586, 0x4D4DD79A, 0x33335566, 0x85859411,
433 0x4545CF8A, 0xF9F910E9, 0x02020604, 0x7F7F81FE, 0x5050F0A0, 0x3C3C4478, 0x9F9FBA25, 0xA8A8E34B,
434 0x5151F3A2, 0xA3A3FE5D, 0x4040C080, 0x8F8F8A05, 0x9292AD3F, 0x9D9DBC21, 0x38384870, 0xF5F504F1,
435 0xBCBCDF63, 0xB6B6C177, 0xDADA75AF, 0x21216342, 0x10103020, 0xFFFF1AE5, 0xF3F30EFD, 0xD2D26DBF,
436 0xCDCD4C81, 0x0C0C1418, 0x13133526, 0xECEC2FC3, 0x5F5FE1BE, 0x9797A235, 0x4444CC88, 0x1717392E,
437 0xC4C45793, 0xA7A7F255, 0x7E7E82FC, 0x3D3D477A, 0x6464ACC8, 0x5D5DE7BA, 0x19192B32, 0x737395E6,
438 0x6060A0C0, 0x81819819, 0x4F4FD19E, 0xDCDC7FA3, 0x22226644, 0x2A2A7E54, 0x9090AB3B, 0x8888830B,
439 0x4646CA8C, 0xEEEE29C7, 0xB8B8D36B, 0x14143C28, 0xDEDE79A7, 0x5E5EE2BC, 0x0B0B1D16, 0xDBDB76AD,
440 0xE0E03BDB, 0x32325664, 0x3A3A4E74, 0x0A0A1E14, 0x4949DB92, 0x06060A0C, 0x24246C48, 0x5C5CE4B8,
441 0xC2C25D9F, 0xD3D36EBD, 0xACACEF43, 0x6262A6C4, 0x9191A839, 0x9595A431, 0xE4E437D3, 0x79798BF2,
442 0xE7E732D5, 0xC8C8438B, 0x3737596E, 0x6D6DB7DA, 0x8D8D8C01, 0xD5D564B1, 0x4E4ED29C, 0xA9A9E049,
443 0x6C6CB4D8, 0x5656FAAC, 0xF4F407F3, 0xEAEA25CF, 0x6565AFCA, 0x7A7A8EF4, 0xAEAEE947, 0x08081810,
444 0xBABAD56F, 0x787888F0, 0x25256F4A, 0x2E2E725C, 0x1C1C2438, 0xA6A6F157, 0xB4B4C773, 0xC6C65197,
445 0xE8E823CB, 0xDDDD7CA1, 0x74749CE8, 0x1F1F213E, 0x4B4BDD96, 0xBDBDDC61, 0x8B8B860D, 0x8A8A850F,
446 0x707090E0, 0x3E3E427C, 0xB5B5C471, 0x6666AACC, 0x4848D890, 0x03030506, 0xF6F601F7, 0x0E0E121C,
447 0x6161A3C2, 0x35355F6A, 0x5757F9AE, 0xB9B9D069, 0x86869117, 0xC1C15899, 0x1D1D273A, 0x9E9EB927,
448 0xE1E138D9, 0xF8F813EB, 0x9898B32B, 0x11113322, 0x6969BBD2, 0xD9D970A9, 0x8E8E8907, 0x9494A733,
449 0x9B9BB62D, 0x1E1E223C, 0x87879215, 0xE9E920C9, 0xCECE4987, 0x5555FFAA, 0x28287850, 0xDFDF7AA5,
450 0x8C8C8F03, 0xA1A1F859, 0x89898009, 0x0D0D171A, 0xBFBFDA65, 0xE6E631D7, 0x4242C684, 0x6868B8D0,
451 0x4141C382, 0x9999B029, 0x2D2D775A, 0x0F0F111E, 0xB0B0CB7B, 0x5454FCA8, 0xBBBBD66D, 0x16163A2C
452 );
453
454 /**
455 * Precomputed invMixColumns table
456 *
457 * @see Crypt_Rijndael:_encryptBlock()
458 * @see Crypt_Rijndael:_decryptBlock()
459 * @var Array
460 * @access private
461 */
462 var $dt0 = array(
463 0x51F4A750, 0x7E416553, 0x1A17A4C3, 0x3A275E96, 0x3BAB6BCB, 0x1F9D45F1, 0xACFA58AB, 0x4BE30393,
464 0x2030FA55, 0xAD766DF6, 0x88CC7691, 0xF5024C25, 0x4FE5D7FC, 0xC52ACBD7, 0x26354480, 0xB562A38F,
465 0xDEB15A49, 0x25BA1B67, 0x45EA0E98, 0x5DFEC0E1, 0xC32F7502, 0x814CF012, 0x8D4697A3, 0x6BD3F9C6,
466 0x038F5FE7, 0x15929C95, 0xBF6D7AEB, 0x955259DA, 0xD4BE832D, 0x587421D3, 0x49E06929, 0x8EC9C844,
467 0x75C2896A, 0xF48E7978, 0x99583E6B, 0x27B971DD, 0xBEE14FB6, 0xF088AD17, 0xC920AC66, 0x7DCE3AB4,
468 0x63DF4A18, 0xE51A3182, 0x97513360, 0x62537F45, 0xB16477E0, 0xBB6BAE84, 0xFE81A01C, 0xF9082B94,
469 0x70486858, 0x8F45FD19, 0x94DE6C87, 0x527BF8B7, 0xAB73D323, 0x724B02E2, 0xE31F8F57, 0x6655AB2A,
470 0xB2EB2807, 0x2FB5C203, 0x86C57B9A, 0xD33708A5, 0x302887F2, 0x23BFA5B2, 0x02036ABA, 0xED16825C,
471 0x8ACF1C2B, 0xA779B492, 0xF307F2F0, 0x4E69E2A1, 0x65DAF4CD, 0x0605BED5, 0xD134621F, 0xC4A6FE8A,
472 0x342E539D, 0xA2F355A0, 0x058AE132, 0xA4F6EB75, 0x0B83EC39, 0x4060EFAA, 0x5E719F06, 0xBD6E1051,
473 0x3E218AF9, 0x96DD063D, 0xDD3E05AE, 0x4DE6BD46, 0x91548DB5, 0x71C45D05, 0x0406D46F, 0x605015FF,
474 0x1998FB24, 0xD6BDE997, 0x894043CC, 0x67D99E77, 0xB0E842BD, 0x07898B88, 0xE7195B38, 0x79C8EEDB,
475 0xA17C0A47, 0x7C420FE9, 0xF8841EC9, 0x00000000, 0x09808683, 0x322BED48, 0x1E1170AC, 0x6C5A724E,
476 0xFD0EFFFB, 0x0F853856, 0x3DAED51E, 0x362D3927, 0x0A0FD964, 0x685CA621, 0x9B5B54D1, 0x24362E3A,
477 0x0C0A67B1, 0x9357E70F, 0xB4EE96D2, 0x1B9B919E, 0x80C0C54F, 0x61DC20A2, 0x5A774B69, 0x1C121A16,
478 0xE293BA0A, 0xC0A02AE5, 0x3C22E043, 0x121B171D, 0x0E090D0B, 0xF28BC7AD, 0x2DB6A8B9, 0x141EA9C8,
479 0x57F11985, 0xAF75074C, 0xEE99DDBB, 0xA37F60FD, 0xF701269F, 0x5C72F5BC, 0x44663BC5, 0x5BFB7E34,
480 0x8B432976, 0xCB23C6DC, 0xB6EDFC68, 0xB8E4F163, 0xD731DCCA, 0x42638510, 0x13972240, 0x84C61120,
481 0x854A247D, 0xD2BB3DF8, 0xAEF93211, 0xC729A16D, 0x1D9E2F4B, 0xDCB230F3, 0x0D8652EC, 0x77C1E3D0,
482 0x2BB3166C, 0xA970B999, 0x119448FA, 0x47E96422, 0xA8FC8CC4, 0xA0F03F1A, 0x567D2CD8, 0x223390EF,
483 0x87494EC7, 0xD938D1C1, 0x8CCAA2FE, 0x98D40B36, 0xA6F581CF, 0xA57ADE28, 0xDAB78E26, 0x3FADBFA4,
484 0x2C3A9DE4, 0x5078920D, 0x6A5FCC9B, 0x547E4662, 0xF68D13C2, 0x90D8B8E8, 0x2E39F75E, 0x82C3AFF5,
485 0x9F5D80BE, 0x69D0937C, 0x6FD52DA9, 0xCF2512B3, 0xC8AC993B, 0x10187DA7, 0xE89C636E, 0xDB3BBB7B,
486 0xCD267809, 0x6E5918F4, 0xEC9AB701, 0x834F9AA8, 0xE6956E65, 0xAAFFE67E, 0x21BCCF08, 0xEF15E8E6,
487 0xBAE79BD9, 0x4A6F36CE, 0xEA9F09D4, 0x29B07CD6, 0x31A4B2AF, 0x2A3F2331, 0xC6A59430, 0x35A266C0,
488 0x744EBC37, 0xFC82CAA6, 0xE090D0B0, 0x33A7D815, 0xF104984A, 0x41ECDAF7, 0x7FCD500E, 0x1791F62F,
489 0x764DD68D, 0x43EFB04D, 0xCCAA4D54, 0xE49604DF, 0x9ED1B5E3, 0x4C6A881B, 0xC12C1FB8, 0x4665517F,
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches