mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-06 16:36:59 +01:00
* [MOD] Minor tweaks.
This commit is contained in:
@@ -2908,10 +2908,11 @@ class RSA
|
||||
/**
|
||||
* Decryption
|
||||
*
|
||||
* @see encrypt()
|
||||
* @access public
|
||||
* @param string $plaintext
|
||||
* @see encrypt()
|
||||
* @access public
|
||||
* @param $ciphertext
|
||||
* @return string
|
||||
* @internal param string $plaintext
|
||||
*/
|
||||
function decrypt($ciphertext)
|
||||
{
|
||||
|
||||
@@ -98,12 +98,12 @@ class Config
|
||||
*/
|
||||
public static function saveConfig(ConfigData $Config = null, $backup = true)
|
||||
{
|
||||
if (is_null($Config)){
|
||||
Factory::getConfigStorage()->setItems(self::getConfig());
|
||||
} else {
|
||||
Factory::getConfigStorage()->setItems($Config);
|
||||
}
|
||||
$ConfigData = (is_null($Config)) ? self::getConfig() : $Config;
|
||||
$ConfigData->setConfigDate(time());
|
||||
$ConfigData->setConfigSaver(Session::getUserLogin());
|
||||
$ConfigData->setConfigHash();
|
||||
|
||||
Factory::getConfigStorage()->setItems($ConfigData);
|
||||
Factory::getConfigStorage()->save('config');
|
||||
|
||||
if ($backup) {
|
||||
@@ -131,7 +131,7 @@ class Config
|
||||
|
||||
foreach ($Reflection->getProperties() as $property) {
|
||||
$property->setAccessible(true);
|
||||
$property->setValue(self::$Config, $items[$property->getName()]);
|
||||
$property->setValue(self::$Config, @$items[$property->getName()]);
|
||||
$property->setAccessible(false);
|
||||
}
|
||||
} catch (SPException $e) {}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
namespace SP\Config;
|
||||
|
||||
use JsonSerializable;
|
||||
|
||||
/**
|
||||
@@ -329,6 +330,10 @@ class ConfigData implements JsonSerializable
|
||||
* @var bool
|
||||
*/
|
||||
private $accountPassToImage = false;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $configSaver = '';
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
@@ -755,11 +760,11 @@ class ConfigData implements JsonSerializable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $configHash
|
||||
*
|
||||
*/
|
||||
public function setConfigHash($configHash)
|
||||
public function setConfigHash()
|
||||
{
|
||||
$this->configHash = $configHash;
|
||||
$this->configHash = md5(serialize($this));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1518,4 +1523,20 @@ class ConfigData implements JsonSerializable
|
||||
{
|
||||
return get_object_vars($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getConfigSaver()
|
||||
{
|
||||
return $this->configSaver;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $configSaver
|
||||
*/
|
||||
public function setConfigSaver($configSaver)
|
||||
{
|
||||
$this->configSaver = $configSaver;
|
||||
}
|
||||
}
|
||||
@@ -71,6 +71,7 @@ class Request
|
||||
$CryptPKI = new CryptPKI();
|
||||
$clearData = $CryptPKI->decryptRSA(base64_decode($encryptedData));
|
||||
} catch (\Exception $e) {
|
||||
error_log($e->getMessage());
|
||||
return $encryptedData;
|
||||
}
|
||||
|
||||
|
||||
@@ -176,6 +176,8 @@ class XmlHandler implements FileStorageInterface
|
||||
protected function analyzeItems()
|
||||
{
|
||||
if (is_array($this->items)) {
|
||||
ksort($this->items);
|
||||
|
||||
return $this->items;
|
||||
} elseif (is_object($this->items)) {
|
||||
return $this->analyzeObject();
|
||||
@@ -201,6 +203,8 @@ class XmlHandler implements FileStorageInterface
|
||||
$property->setAccessible(false);
|
||||
}
|
||||
|
||||
ksort($items);
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user