Skip to content

Commit

Permalink
* [FIX] Fixed issue when installing sysPass. Solves #272
Browse files Browse the repository at this point in the history
* [FIX] Fixed issue when retrieving HTTP headers on non-Apache environments.
  • Loading branch information
nuxsmin authored and Rubén Domínguez committed Sep 17, 2016
1 parent ad20454 commit 5b6232c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
=== ** v1.2.0.14 ===

* [FIX] Fixed issue when installing sysPass. Solves #272
* [FIX] Fixed issue when retrieving HTTP headers on non-Apache environments.

=== ** v1.2.0.13 ===

* [FIX] Fixed issue when pressing copy-to-clipboard icon.
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG-ES
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
=== ** v1.2.0.14 ===

* [FIX] Corregido error en la instalación de sysPass. Solves #272
* [FIX] Corregido error al obtener las cabeceras HTTP en entornos no-Apache.

=== ** v1.2.0.13 ===

* [FIX] Corregido error cuando se pulsaba el icono de copiar a portapapeles.
Expand Down
3 changes: 1 addition & 2 deletions inc/Installer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,7 @@ private static function createDBUser()
$query = 'CREATE USER `' . self::$_dbuser . '`@`' . self::getAdminHost() . '`';
} else {
$query = 'CREATE USER `' . self::$_dbuser . '`@`' . self::getAdminHost() . '`' .
' IDENTIFIED WITH mysql_native_password' .
' BY \'' . self::$_dbpass . '\'';
' IDENTIFIED BY \'' . self::$_dbpass . '\'';
}

try {
Expand Down
13 changes: 9 additions & 4 deletions inc/Request.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,15 @@ public static function getRequestHeaders($header = '')
{
if (!function_exists('\apache_request_headers')) {
foreach ($_SERVER as $key => $value) {
if (substr($key, 0, 5) === 'HTTP_') {
$key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($key, 5)))));
$headers[$key] = $value;
} else {
if (strpos($key, 'HTTP_') !== false) {
$parts = explode('_', substr($key, 5));

foreach ($parts as &$string) {
$string = ucwords(strtolower($string));
}

$key = implode('-', $parts);

$headers[$key] = $value;
}
}
Expand Down
2 changes: 1 addition & 1 deletion inc/Util.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ public static function curlIsAvailable()
*/
public static function getVersion($retBuild = false)
{
$version = array(1, 2, 0, '13');
$version = array(1, 2, 0, '14');

if (!$retBuild) {
array_pop($version);
Expand Down

0 comments on commit 5b6232c

Please sign in to comment.