| Zeile 4... |
Zeile 4... |
| 4 |
*
|
4 |
*
|
| 5 |
* An open source application development framework for PHP
|
5 |
* An open source application development framework for PHP
|
| 6 |
*
|
6 |
*
|
| 7 |
* This content is released under the MIT License (MIT)
|
7 |
* This content is released under the MIT License (MIT)
|
| 8 |
*
|
8 |
*
|
| 9 |
* Copyright (c) 2014 - 2018, British Columbia Institute of Technology
|
9 |
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
| 10 |
*
|
10 |
*
|
| 11 |
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 12 |
* of this software and associated documentation files (the "Software"), to deal
|
12 |
* of this software and associated documentation files (the "Software"), to deal
|
| 13 |
* in the Software without restriction, including without limitation the rights
|
13 |
* in the Software without restriction, including without limitation the rights
|
| 14 |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| Zeile 27... |
Zeile 27... |
| 27 |
* THE SOFTWARE.
|
27 |
* THE SOFTWARE.
|
| 28 |
*
|
28 |
*
|
| 29 |
* @package CodeIgniter
|
29 |
* @package CodeIgniter
|
| 30 |
* @author EllisLab Dev Team
|
30 |
* @author EllisLab Dev Team
|
| 31 |
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
31 |
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
| 32 |
* @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
|
32 |
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
| 33 |
* @license http://opensource.org/licenses/MIT MIT License
|
33 |
* @license https://opensource.org/licenses/MIT MIT License
|
| 34 |
* @link https://codeigniter.com
|
34 |
* @link https://codeigniter.com
|
| 35 |
* @since Version 1.3.0
|
35 |
* @since Version 1.3.0
|
| 36 |
* @filesource
|
36 |
* @filesource
|
| 37 |
*/
|
37 |
*/
|
| 38 |
defined('BASEPATH') OR exit('No direct script access allowed');
|
38 |
defined('BASEPATH') OR exit('No direct script access allowed');
|
| Zeile 165... |
Zeile 165... |
| 165 |
empty($this->encrypt['ssl_cert']) OR $ssl['cert'] = $this->encrypt['ssl_cert'];
|
165 |
empty($this->encrypt['ssl_cert']) OR $ssl['cert'] = $this->encrypt['ssl_cert'];
|
| 166 |
empty($this->encrypt['ssl_ca']) OR $ssl['ca'] = $this->encrypt['ssl_ca'];
|
166 |
empty($this->encrypt['ssl_ca']) OR $ssl['ca'] = $this->encrypt['ssl_ca'];
|
| 167 |
empty($this->encrypt['ssl_capath']) OR $ssl['capath'] = $this->encrypt['ssl_capath'];
|
167 |
empty($this->encrypt['ssl_capath']) OR $ssl['capath'] = $this->encrypt['ssl_capath'];
|
| 168 |
empty($this->encrypt['ssl_cipher']) OR $ssl['cipher'] = $this->encrypt['ssl_cipher'];
|
168 |
empty($this->encrypt['ssl_cipher']) OR $ssl['cipher'] = $this->encrypt['ssl_cipher'];
|
| Zeile 169... |
Zeile 169... |
| 169 |
|
169 |
|
| 170 |
if ( ! empty($ssl))
|
170 |
if (isset($this->encrypt['ssl_verify']))
|
| - |
|
171 |
{
|
| - |
|
172 |
$client_flags |= MYSQLI_CLIENT_SSL;
|
| 171 |
{
|
173 |
|
| - |
|
174 |
if ($this->encrypt['ssl_verify'])
|
| - |
|
175 |
{
|
| - |
|
176 |
defined('MYSQLI_OPT_SSL_VERIFY_SERVER_CERT') && $this->_mysqli->options(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, TRUE);
|
| - |
|
177 |
}
|
| - |
|
178 |
// Apparently (when it exists), setting MYSQLI_OPT_SSL_VERIFY_SERVER_CERT
|
| - |
|
179 |
// to FALSE didn't do anything, so PHP 5.6.16 introduced yet another
|
| - |
|
180 |
// constant ...
|
| - |
|
181 |
//
|
| - |
|
182 |
// https://secure.php.net/ChangeLog-5.php#5.6.16
|
| - |
|
183 |
// https://bugs.php.net/bug.php?id=68344
|
| 172 |
if (isset($this->encrypt['ssl_verify']))
|
184 |
elseif (defined('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT'))
|
| 173 |
{
|
- |
|
| 174 |
if ($this->encrypt['ssl_verify'])
|
- |
|
| 175 |
{
|
- |
|
| 176 |
defined('MYSQLI_OPT_SSL_VERIFY_SERVER_CERT') && $this->_mysqli->options(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, TRUE);
|
- |
|
| 177 |
}
|
- |
|
| 178 |
// Apparently (when it exists), setting MYSQLI_OPT_SSL_VERIFY_SERVER_CERT
|
- |
|
| 179 |
// to FALSE didn't do anything, so PHP 5.6.16 introduced yet another
|
- |
|
| 180 |
// constant ...
|
- |
|
| 181 |
//
|
- |
|
| 182 |
// https://secure.php.net/ChangeLog-5.php#5.6.16
|
- |
|
| 183 |
// https://bugs.php.net/bug.php?id=68344
|
- |
|
| 184 |
elseif (defined('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT'))
|
- |
|
| 185 |
{
|
185 |
{
|
| 186 |
$client_flags |= MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT;
|
- |
|
| 187 |
}
|
186 |
$client_flags |= MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT;
|
| - |
|
187 |
}
|
| Zeile -... |
Zeile 188... |
| - |
|
188 |
}
|
| - |
|
189 |
|
| 188 |
}
|
190 |
if ( ! empty($ssl))
|
| 189 |
|
191 |
{
|
| 190 |
$client_flags |= MYSQLI_CLIENT_SSL;
|
192 |
$client_flags |= MYSQLI_CLIENT_SSL;
|
| 191 |
$this->_mysqli->ssl_set(
|
193 |
$this->_mysqli->ssl_set(
|
| 192 |
isset($ssl['key']) ? $ssl['key'] : NULL,
|
194 |
isset($ssl['key']) ? $ssl['key'] : NULL,
|
| Zeile 425... |
Zeile 427... |
| 425 |
* @param bool $prefix_limit
|
427 |
* @param bool $prefix_limit
|
| 426 |
* @return string
|
428 |
* @return string
|
| 427 |
*/
|
429 |
*/
|
| 428 |
protected function _list_tables($prefix_limit = FALSE)
|
430 |
protected function _list_tables($prefix_limit = FALSE)
|
| 429 |
{
|
431 |
{
|
| 430 |
$sql = 'SHOW TABLES FROM '.$this->escape_identifiers($this->database);
|
432 |
$sql = 'SHOW TABLES FROM '.$this->_escape_char.$this->database.$this->_escape_char;
|
| Zeile 431... |
Zeile 433... |
| 431 |
|
433 |
|
| 432 |
if ($prefix_limit !== FALSE && $this->dbprefix !== '')
|
434 |
if ($prefix_limit !== FALSE && $this->dbprefix !== '')
|
| 433 |
{
|
435 |
{
|
| 434 |
return $sql." LIKE '".$this->escape_like_str($this->dbprefix)."%'";
|
436 |
return $sql." LIKE '".$this->escape_like_str($this->dbprefix)."%'";
|