mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-07 17:06:54 +01:00
* [FIX] Fixed public link view issue
This commit is contained in:
@@ -28,6 +28,7 @@ use SP\Core\ActionsInterface;
|
||||
use SP\Core\Crypt;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\Session;
|
||||
use SP\DataModel\AccountData;
|
||||
use SP\DataModel\AccountExtData;
|
||||
use SP\DataModel\CustomFieldData;
|
||||
use SP\DataModel\GroupAccountsData;
|
||||
@@ -698,7 +699,7 @@ class Account extends AccountBase implements AccountInterface
|
||||
* Obtener los datos de una cuenta para mostrar la clave
|
||||
* Esta funcion realiza la consulta a la BBDD y devuelve los datos.
|
||||
*
|
||||
* @return object|false
|
||||
* @return AccountData|false
|
||||
*/
|
||||
public function getAccountPassData()
|
||||
{
|
||||
@@ -712,12 +713,12 @@ class Account extends AccountBase implements AccountInterface
|
||||
. 'customer_name '
|
||||
. 'FROM accounts '
|
||||
. 'LEFT JOIN customers ON account_customerId = customer_id '
|
||||
. 'WHERE account_id = :id LIMIT 1';
|
||||
. 'WHERE account_id = ? LIMIT 1';
|
||||
|
||||
$Data = new QueryData();
|
||||
$Data->setQuery($query);
|
||||
$Data->setMapClass($this->accountData);
|
||||
$Data->addParam($this->accountData->getAccountId(), 'id');
|
||||
$Data->addParam($this->accountData->getAccountId());
|
||||
|
||||
// Obtener los usuarios y grupos secundarios
|
||||
$this->accountData->setUsersId(UserAccounts::getUsersForAccount($this->accountData->getAccountId()));
|
||||
|
||||
@@ -498,7 +498,7 @@ class AccountController extends ControllerBase implements ActionsInterface
|
||||
// Desencriptar la clave de la cuenta
|
||||
$pass = Crypt::generateAesKey($PublicLinkData->getLinkHash());
|
||||
$masterPass = Crypt::getDecrypt($PublicLinkData->getPass(), $PublicLinkData->getPassIV(), $pass);
|
||||
$accountPass = Crypt::getDecrypt($AccountPassData->pass, $AccountPassData->iv, $masterPass);
|
||||
$accountPass = Crypt::getDecrypt($AccountPassData->getAccountPass(), $AccountPassData->getAccountIV(), $masterPass);
|
||||
|
||||
$this->view->assign('useImage', Config::getConfig()->isPublinksImageEnabled());
|
||||
|
||||
|
||||
@@ -364,6 +364,8 @@ class PublicLink extends PublicLinkBase implements ItemInterface
|
||||
|
||||
if ($queryRes === false) {
|
||||
throw new SPException(SPException::SP_ERROR, _('Error al obtener enlace'));
|
||||
} elseif (is_array($queryRes)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
@include color-teal();
|
||||
}
|
||||
#demo-info {
|
||||
position: relative;
|
||||
top: 12em;
|
||||
margin: 1em auto;
|
||||
color: #c9c9c9;
|
||||
border-top: 1px solid #d9d9d9;
|
||||
|
||||
@@ -176,7 +176,7 @@ pre, code, samp, kbd {
|
||||
width: 95%;
|
||||
margin: 2em auto 8em auto; }
|
||||
#container #content.public-link {
|
||||
width: 75%;
|
||||
width: 70%;
|
||||
min-height: 0;
|
||||
margin: 5em auto; }
|
||||
|
||||
@@ -1088,6 +1088,8 @@ fieldset.warning {
|
||||
background-color: #e0f2f1;
|
||||
border: 1px solid #26a69a; }
|
||||
#login-container #demo-info {
|
||||
position: relative;
|
||||
top: 12em;
|
||||
margin: 1em auto;
|
||||
color: #c9c9c9;
|
||||
border-top: 1px solid #d9d9d9;
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
inc/themes/material-blue/css/styles.min.css
vendored
2
inc/themes/material-blue/css/styles.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -74,7 +74,7 @@
|
||||
width: 95%;
|
||||
margin: 2em auto 8em auto;
|
||||
&.public-link {
|
||||
width: 75%;
|
||||
width: 70%;
|
||||
min-height: 0;
|
||||
margin: 5em auto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user