mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-21 07:46:50 +01:00
* [DEV] Upgrading bugfixes
* [DEV] Updated translations * [DEV] Minor tweaks
This commit is contained in:
@@ -108,12 +108,12 @@ class ActionController implements ItemControllerInterface
|
||||
$twoFa = new Authenticator($this->itemId, CoreSession::getUserData()->getUserLogin(), $AuthenticatorData->getIV());
|
||||
|
||||
if (!$twoFa->verifyKey($pin)) {
|
||||
$this->jsonResponse->setDescription(_('Código incorrecto'));
|
||||
$this->jsonResponse->setDescription(_t('authenticator', 'Código incorrecto'));
|
||||
Json::returnJson($this->jsonResponse);
|
||||
}
|
||||
|
||||
if (Checks::demoIsEnabled()) {
|
||||
$this->jsonResponse->setDescription(_('Ey, esto es una DEMO!!'));
|
||||
$this->jsonResponse->setDescription(_t('authenticator', 'Ey, esto es una DEMO!!'));
|
||||
Json::returnJson($this->jsonResponse);
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ class ActionController implements ItemControllerInterface
|
||||
Plugin::getItem($PluginData)->update();
|
||||
|
||||
$this->jsonResponse->setStatus(0);
|
||||
$this->jsonResponse->setDescription(_('Preferencias actualizadas'));
|
||||
$this->jsonResponse->setDescription(_t('authenticator', 'Preferencias actualizadas'));
|
||||
|
||||
Json::returnJson($this->jsonResponse);
|
||||
}
|
||||
@@ -168,13 +168,13 @@ class ActionController implements ItemControllerInterface
|
||||
Session::setTwoFApass(true);
|
||||
CoreSession::setAuthCompleted(true);
|
||||
|
||||
$this->jsonResponse->setDescription(_('Código correcto'));
|
||||
$this->jsonResponse->setDescription(_t('authenticator', 'Código correcto'));
|
||||
$this->jsonResponse->setStatus(0);
|
||||
} else {
|
||||
Session::setTwoFApass(false);
|
||||
CoreSession::setAuthCompleted(false);
|
||||
|
||||
$this->jsonResponse->setDescription(_('Código incorrecto'));
|
||||
$this->jsonResponse->setDescription(_t('authenticator', 'Código incorrecto'));
|
||||
}
|
||||
|
||||
Json::returnJson($this->jsonResponse);
|
||||
|
||||
@@ -64,6 +64,7 @@ class LoginController
|
||||
* @param ControllerBase $Controller
|
||||
* @throws \SP\Core\Exceptions\FileNotFoundException
|
||||
* @throws \SP\Core\Exceptions\SPException
|
||||
* @throws \SP\Core\Exceptions\InvalidClassException
|
||||
*/
|
||||
public function get2FA(ControllerBase $Controller)
|
||||
{
|
||||
@@ -112,7 +113,7 @@ class LoginController
|
||||
$NoticeData = new NoticeData();
|
||||
$NoticeData->setNoticeComponent($this->Plugin->getName());
|
||||
$NoticeData->setNoticeUserId($userId);
|
||||
$NoticeData->setNoticeType(_('Aviso Caducidad'));
|
||||
$NoticeData->setNoticeType(_t('authenticator', 'Aviso Caducidad'));
|
||||
|
||||
if (count(Notice::getItem($NoticeData)->getByUserCurrentDate()) > 0) {
|
||||
return;
|
||||
|
||||
@@ -94,7 +94,7 @@ class PreferencesController
|
||||
$this->Controller->view->assign('chk2FAEnabled', $AuthenticatorData->isTwofaEnabled());
|
||||
$this->Controller->view->assign('expireDays', $AuthenticatorData->getExpireDays());
|
||||
|
||||
$this->Controller->view->assign('tabIndex', $this->Controller->addTab(_('Seguridad')), 'security');
|
||||
$this->Controller->view->assign('tabIndex', $this->Controller->addTab(_t('authenticator', 'Seguridad')), 'security');
|
||||
$this->Controller->view->assign('actionId', ActionController::ACTION_TWOFA_SAVE, 'security');
|
||||
} catch (InvalidArgumentException $e) {
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1,8 +1,8 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Authenticator\n"
|
||||
"POT-Creation-Date: 2017-01-08 13:25+0100\n"
|
||||
"PO-Revision-Date: 2017-01-08 13:25+0100\n"
|
||||
"POT-Creation-Date: 2017-01-11 01:19+0100\n"
|
||||
"PO-Revision-Date: 2017-01-11 01:20+0100\n"
|
||||
"Last-Translator: nuxsmin <nuxsmin@syspass.org>\n"
|
||||
"Language-Team: nuxsmin@syspass.org\n"
|
||||
"Language: en_US\n"
|
||||
@@ -37,16 +37,16 @@ msgstr "Rigth code"
|
||||
msgid "No es posible acceder directamente a este archivo"
|
||||
msgstr "Unable to access directly to this file"
|
||||
|
||||
#: ../../../LoginController.class.php:115
|
||||
#: ../../../LoginController.class.php:116
|
||||
msgid "Aviso Caducidad"
|
||||
msgstr "Expire Notice"
|
||||
|
||||
#: ../../../LoginController.class.php:125
|
||||
#: ../../../LoginController.class.php:126
|
||||
#, php-format
|
||||
msgid "El código 2FA se ha de restablecer en %d días"
|
||||
msgstr "The 2FA code will need to be reset within %d days"
|
||||
|
||||
#: ../../../LoginController.class.php:129
|
||||
#: ../../../LoginController.class.php:130
|
||||
msgid ""
|
||||
"El código 2FA ha caducado. Es necesario restablecerlo desde las preferencias"
|
||||
msgstr "The 2FA code is expired. You need to reset it on preferences tab"
|
||||
|
||||
@@ -190,7 +190,7 @@ class ApiRequest
|
||||
$this->ApiReflection = new ReflectionClass(SyspassApi::class);
|
||||
|
||||
if (!$this->ApiReflection->hasMethod($this->data->method)) {
|
||||
throw new SPException(SPException::SP_WARNING, _('Acción inválida'), '', -32601);
|
||||
throw new SPException(SPException::SP_WARNING, _('Acción Inválida'), '', -32601);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ abstract class LdapBase implements LdapInterface, AuthInterface
|
||||
}
|
||||
|
||||
$Log->addDescription(_('Conexión a LDAP correcta'));
|
||||
$Log->addDescription(sprintf(_('Objetos encontrados: %s'), (int)$results['count']));
|
||||
$Log->addDescription(sprintf(_('Objetos encontrados: %d'), (int)$results['count']));
|
||||
$Log->writeLog();
|
||||
|
||||
return $results;
|
||||
|
||||
@@ -289,7 +289,7 @@ class LoginController
|
||||
if ($loadMPass === null) {
|
||||
throw new AuthException(SPException::SP_INFO, _('Es necesaria su clave anterior'), '', self::STATUS_NEED_OLD_PASS);
|
||||
// La clave no está establecida o se ha sido cambiada por el administrador
|
||||
} else if ($loadMPass === false || !$UserPass->checkUserUpdateMPass()) {
|
||||
} else if ($loadMPass === false) {
|
||||
throw new AuthException(SPException::SP_INFO, _('La clave maestra no ha sido guardada o es incorrecta'), '', self::STATUS_INVALID_MASTER_PASS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@ class MainController extends ControllerBase implements ActionsInterface
|
||||
$this->view->assign('logo', Init::$WEBURI . '/imgs/logo_full_bg.png');
|
||||
$this->view->assign('logonobg', Init::$WEBURI . '/imgs/logo_full_nobg.png');
|
||||
$this->view->assign('httpsEnabled', Checks::httpsEnabled());
|
||||
$this->view->assign('lang', Init::isLoggedIn() ? Language::$userLang : Language::$globalLang);
|
||||
|
||||
$this->view->assign('loadApp', Session::getAuthCompleted() && !Config::getConfig()->isMaintenance());
|
||||
|
||||
|
||||
@@ -250,9 +250,7 @@ class Crypt
|
||||
{
|
||||
if (empty($cryptData) || empty($cryptIV)){
|
||||
return false;
|
||||
}
|
||||
|
||||
if (null === $password) {
|
||||
} elseif (null === $password) {
|
||||
$password = SessionUtil::getSessionMPass();
|
||||
}
|
||||
|
||||
|
||||
@@ -228,20 +228,14 @@ class CustomField extends CustomFieldBase implements ItemInterface
|
||||
$Data->addParam($this->itemData->getModule());
|
||||
$Data->addParam($id);
|
||||
|
||||
/** @var CustomFieldData[] $queryRes */
|
||||
$queryRes = DB::getResultsArray($Data);
|
||||
|
||||
$customFields = [];
|
||||
|
||||
foreach ($queryRes as $CustomFieldData) {
|
||||
/**
|
||||
* @var CustomFieldData $CustomFieldData
|
||||
* @var CustomFieldDefData $fieldDef
|
||||
*/
|
||||
$fieldDef = unserialize($CustomFieldData->getCustomfielddefField());
|
||||
|
||||
if (get_class($fieldDef) === '__PHP_Incomplete_Class') {
|
||||
$fieldDef = Util::castToClass(CustomFieldDefData::class, $fieldDef);
|
||||
}
|
||||
/** @var CustomFieldDefData $fieldDef */
|
||||
$fieldDef = Util::castToClass(CustomFieldDefData::class, $CustomFieldData->getCustomfielddefField());
|
||||
|
||||
$CustomFieldData->setDefinition($fieldDef);
|
||||
$CustomFieldData->setDefinitionId($CustomFieldData->getCustomfielddefId());
|
||||
@@ -300,6 +294,7 @@ class CustomField extends CustomFieldBase implements ItemInterface
|
||||
$Data->setQuery($query);
|
||||
$Data->addParam($this->itemData->getModule());
|
||||
|
||||
/** @var CustomFieldDefData[] $queryRes */
|
||||
$queryRes = DB::getResultsArray($Data);
|
||||
|
||||
if (count($queryRes) === 0) {
|
||||
@@ -307,16 +302,8 @@ class CustomField extends CustomFieldBase implements ItemInterface
|
||||
}
|
||||
|
||||
foreach ($queryRes as $CustomFieldDef) {
|
||||
/**
|
||||
* @var CustomFieldDefData $CustomFieldDef
|
||||
* @var CustomFieldDefData $fieldDef
|
||||
*/
|
||||
|
||||
$fieldDef = unserialize($CustomFieldDef->getCustomfielddefField());
|
||||
|
||||
if (get_class($fieldDef) === '__PHP_Incomplete_Class') {
|
||||
$fieldDef = Util::castToClass(CustomFieldDefData::class, $fieldDef);
|
||||
}
|
||||
/** @var CustomFieldDefData $fieldDef */
|
||||
$fieldDef = Util::castToClass(CustomFieldDefData::class, $CustomFieldDef->getCustomfielddefField());
|
||||
|
||||
$CustomFieldData = new CustomFieldData();
|
||||
$CustomFieldData->setDefinition($fieldDef);
|
||||
|
||||
@@ -174,23 +174,15 @@ class CustomFieldDef extends CustomFieldBase implements ItemInterface
|
||||
$Data->setQuery($query);
|
||||
$Data->addParam($id);
|
||||
|
||||
/** @var CustomFieldDefData $CustomFieldDef */
|
||||
$CustomFieldDef = DB::getResults($Data);
|
||||
|
||||
if ($CustomFieldDef === false) {
|
||||
throw new SPException(SPException::SP_INFO, _('Campo personalizado no encontrado'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @var CustomFieldDefData $CustomFieldDef
|
||||
* @var CustomFieldDefData $fieldDef
|
||||
*/
|
||||
|
||||
$fieldDef = unserialize($CustomFieldDef->getCustomfielddefField());
|
||||
|
||||
if (get_class($fieldDef) === '__PHP_Incomplete_Class') {
|
||||
$fieldDef = Util::castToClass($this->getDataModel(), $fieldDef);
|
||||
}
|
||||
|
||||
/** @var CustomFieldDefData $fieldDef */
|
||||
$fieldDef = Util::castToClass($this->getDataModel(), $CustomFieldDef->getCustomfielddefField());
|
||||
$fieldDef->setId($CustomFieldDef->getCustomfielddefId());
|
||||
|
||||
return $fieldDef;
|
||||
@@ -234,6 +226,7 @@ class CustomFieldDef extends CustomFieldBase implements ItemInterface
|
||||
$Data->setMapClassName($this->getDataModel());
|
||||
$Data->setQuery($query);
|
||||
|
||||
/** @var CustomFieldDefData[] $queryRes */
|
||||
$queryRes = DB::getResultsArray($Data);
|
||||
|
||||
if (count($queryRes) === 0) {
|
||||
@@ -243,17 +236,9 @@ class CustomFieldDef extends CustomFieldBase implements ItemInterface
|
||||
$fields = [];
|
||||
|
||||
foreach ($queryRes as $CustomFieldDef) {
|
||||
/**
|
||||
* @var CustomFieldDefData $CustomFieldDef
|
||||
* @var CustomFieldDefData $fieldDef
|
||||
*/
|
||||
|
||||
$fieldDef = unserialize($CustomFieldDef->getCustomfielddefField());
|
||||
|
||||
if (get_class($fieldDef) === '__PHP_Incomplete_Class') {
|
||||
$fieldDef = Util::castToClass($this->getDataModel(), $fieldDef);
|
||||
}
|
||||
|
||||
/** @var CustomFieldDefData $fieldDef */
|
||||
$fieldDef = Util::castToClass($this->getDataModel(), $CustomFieldDef->getCustomfielddefField());
|
||||
$fieldDef->setId($CustomFieldDef->getCustomfielddefId());
|
||||
|
||||
$fields[] = $fieldDef;
|
||||
|
||||
@@ -71,20 +71,15 @@ class CustomFieldDefSearch extends CustomFieldBase implements ItemSearchInterfac
|
||||
|
||||
DB::setFullRowCount();
|
||||
|
||||
/** @var CustomFieldDefData[] $queryRes */
|
||||
$queryRes = DB::getResultsArray($Data);
|
||||
|
||||
$customFields = [];
|
||||
|
||||
foreach ($queryRes as $CustomField) {
|
||||
/**
|
||||
* @var CustomFieldDefData $CustomField
|
||||
* @var CustomFieldDefData $fieldDef
|
||||
*/
|
||||
$fieldDef = unserialize($CustomField->getCustomfielddefField());
|
||||
|
||||
if (get_class($fieldDef) === '__PHP_Incomplete_Class') {
|
||||
$fieldDef = Util::castToClass($this->getDataModel(), $fieldDef);
|
||||
}
|
||||
/** @var CustomFieldDefData $fieldDef */
|
||||
$fieldDef = Util::castToClass($this->getDataModel(), $CustomField->getCustomfielddefField());
|
||||
|
||||
if ($SearchData->getSeachString() === ''
|
||||
|| stripos($fieldDef->getName(), $SearchData->getSeachString()) !== false
|
||||
|
||||
@@ -30,9 +30,11 @@ defined('APP_ROOT') || die(_('No es posible acceder directamente a este archivo'
|
||||
use SP\Core\Crypt;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\DataModel\CustomFieldData;
|
||||
use SP\DataModel\CustomFieldDefData;
|
||||
use SP\Log\Log;
|
||||
use SP\Storage\DB;
|
||||
use SP\Storage\QueryData;
|
||||
use SP\Util\Util;
|
||||
|
||||
/**
|
||||
* Class CustomFieldsUtil utilidades para los campos personalizados
|
||||
@@ -119,7 +121,7 @@ class CustomFieldsUtil
|
||||
/**
|
||||
* Crear los campos personalizados de un elemento
|
||||
*
|
||||
* @param array $customFields
|
||||
* @param array $customFields
|
||||
* @param CustomFieldData $CustomFieldData
|
||||
* @throws \SP\Core\Exceptions\InvalidClassException
|
||||
* @throws \SP\Core\Exceptions\SPException
|
||||
@@ -137,7 +139,7 @@ class CustomFieldsUtil
|
||||
/**
|
||||
* Actualizar los campos personalizados de un elemento
|
||||
*
|
||||
* @param array $customFields
|
||||
* @param array $customFields
|
||||
* @param CustomFieldData $CustomFieldData
|
||||
* @throws \SP\Core\Exceptions\InvalidClassException
|
||||
* @throws \SP\Core\Exceptions\SPException
|
||||
@@ -163,11 +165,15 @@ class CustomFieldsUtil
|
||||
$Log = new Log(__FUNCTION__);
|
||||
|
||||
$query = /** @lang SQL */
|
||||
'SELECT customfielddata_defId FROM customFieldsData WHERE customfielddata_moduleId = 20';
|
||||
'SELECT customfielddef_id, customfielddef_field
|
||||
FROM customFieldsData
|
||||
LEFT JOIN customFieldsDef ON customfielddef_id = customfielddata_defId
|
||||
WHERE customfielddata_moduleId = 20';
|
||||
|
||||
$Data = new QueryData();
|
||||
$Data->setQuery($query);
|
||||
|
||||
/** @var CustomFieldDefData[] $oldDefs */
|
||||
$oldDefs = DB::getResultsArray($Data);
|
||||
|
||||
try {
|
||||
@@ -188,8 +194,9 @@ class CustomFieldsUtil
|
||||
customfielddef_field = ?
|
||||
WHERE customfielddef_id= ? LIMIT 1';
|
||||
|
||||
foreach ($oldDefs as $def) {
|
||||
$CustomFieldDef = CustomFieldDef::getItem()->getById($def->customfielddata_defId);
|
||||
foreach ($oldDefs as $CustomFieldDef) {
|
||||
$CustomFieldDef = Util::castToClass(CustomFieldDefData::class, $CustomFieldDef->getCustomfielddefField());
|
||||
$CustomFieldDef->setId($CustomFieldDef->getCustomfielddefId());
|
||||
$CustomFieldDef->setModule(10);
|
||||
$CustomFieldDef->setCustomfielddefModule(10);
|
||||
|
||||
@@ -197,13 +204,13 @@ class CustomFieldsUtil
|
||||
$Data->setQuery($query);
|
||||
$Data->addParam(10);
|
||||
$Data->addParam(serialize($CustomFieldDef));
|
||||
$Data->addParam($CustomFieldDef->getId());
|
||||
$Data->addParam($CustomFieldDef->getCustomfielddefId());
|
||||
|
||||
if (DB::getQuery($Data) === false) {
|
||||
throw new SPException(SPException::SP_ERROR, _('Error al actualizar el campo personalizado'));
|
||||
$Log->addDetails(_('Error al actualizar el campo personalizado'), $CustomFieldDef->getCustomfielddefId());
|
||||
} else {
|
||||
$Log->addDetails(_('Campo actualizado'), $CustomFieldDef->getCustomfielddefId());
|
||||
}
|
||||
|
||||
$Log->addDetails(_('Campo actualizado'), $def->customfielddata_defId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -183,18 +183,14 @@ class Profile extends ProfileBase implements ItemInterface, ItemSelectInterface
|
||||
$Data->addParam($id);
|
||||
|
||||
/**
|
||||
* @var ProfileBaseData $ProfileData
|
||||
* @var ProfileBaseData $queryRes
|
||||
* @var ProfileData $Profile
|
||||
*/
|
||||
$ProfileData = DB::getResults($Data);
|
||||
$Profile = unserialize($ProfileData->getUserprofileProfile());
|
||||
$queryRes = DB::getResults($Data);
|
||||
|
||||
if (get_class($Profile) === '__PHP_Incomplete_Class') {
|
||||
$Profile = Util::castToClass($this->getDataModel(), $Profile);
|
||||
}
|
||||
|
||||
$Profile->setUserprofileId($ProfileData->getUserprofileId());
|
||||
$Profile->setUserprofileName($ProfileData->getUserprofileName());
|
||||
$Profile = Util::castToClass($this->getDataModel(), $queryRes->getUserprofileProfile());
|
||||
$Profile->setUserprofileId($queryRes->getUserprofileId());
|
||||
$Profile->setUserprofileName($queryRes->getUserprofileName());
|
||||
|
||||
return $Profile;
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ class PublicLink extends PublicLinkBase implements ItemInterface
|
||||
public function delete($id)
|
||||
{
|
||||
if (is_array($id)) {
|
||||
foreach ($id as $itemId){
|
||||
foreach ($id as $itemId) {
|
||||
$this->delete($itemId);
|
||||
}
|
||||
|
||||
@@ -261,22 +261,15 @@ class PublicLink extends PublicLinkBase implements ItemInterface
|
||||
$Data->setQuery($query);
|
||||
$Data->addParam($id);
|
||||
|
||||
/** @var PublicLinkBaseData $queryRes */
|
||||
$queryRes = DB::getResults($Data);
|
||||
|
||||
if ($queryRes === false) {
|
||||
throw new SPException(SPException::SP_ERROR, _('Error al obtener enlace'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @var $queryRes PublicLinkBaseData
|
||||
* @var $PublicLink PublicLinkData
|
||||
*/
|
||||
$PublicLink = unserialize($queryRes->getPublicLinkLinkData());
|
||||
|
||||
if (get_class($PublicLink) === '__PHP_Incomplete_Class') {
|
||||
$PublicLink = Util::castToClass($this->getDataModel(), $PublicLink);
|
||||
}
|
||||
|
||||
/** @var $PublicLink PublicLinkData */
|
||||
$PublicLink = Util::castToClass($this->getDataModel(), $queryRes->getPublicLinkLinkData());
|
||||
$PublicLink->setPublicLinkId($id);
|
||||
|
||||
return $PublicLink;
|
||||
@@ -294,20 +287,14 @@ class PublicLink extends PublicLinkBase implements ItemInterface
|
||||
$Data->setMapClassName($this->getDataModel());
|
||||
$Data->setQuery($query);
|
||||
|
||||
/** @var PublicLinkData[] $queryRes */
|
||||
$queryRes = DB::getResultsArray($Data);
|
||||
|
||||
$publicLinks = [];
|
||||
|
||||
foreach (DB::getResultsArray($Data) as $PublicLinkListData) {
|
||||
/**
|
||||
* @var PublicLinkData $PublicLinkData
|
||||
* @var PublicLinkListData $PublicLinkListData
|
||||
*/
|
||||
|
||||
$PublicLinkData = unserialize($PublicLinkListData->getPublicLinkLinkData());
|
||||
|
||||
if (get_class($PublicLinkData) === '__PHP_Incomplete_Class') {
|
||||
$PublicLinkData = Util::castToClass($this->getDataModel(), $PublicLinkData);
|
||||
}
|
||||
|
||||
foreach ($queryRes as $PublicLinkListData) {
|
||||
/** @var PublicLinkData $PublicLinkData */
|
||||
$PublicLinkData = Util::castToClass($this->getDataModel(), $PublicLinkListData->getPublicLinkLinkData());
|
||||
$PublicLinkData->setPublicLinkId($PublicLinkListData->getPublicLinkId());
|
||||
|
||||
$publicLinks[] = $this->getItemForList($PublicLinkData);
|
||||
@@ -373,27 +360,20 @@ class PublicLink extends PublicLinkBase implements ItemInterface
|
||||
$Data->setQuery($query);
|
||||
$Data->addParam($hash);
|
||||
|
||||
/** @var PublicLinkBaseData $queryRes */
|
||||
$queryRes = DB::getResults($Data);
|
||||
|
||||
if ($queryRes === false) {
|
||||
throw new SPException(SPException::SP_ERROR, _('Error al obtener enlace'));
|
||||
} elseif (count($queryRes) > 0) {
|
||||
/**
|
||||
* @var $queryRes PublicLinkBaseData
|
||||
* @var $PublicLink PublicLinkData
|
||||
*/
|
||||
$PublicLink = unserialize($queryRes->getPublicLinkLinkData());
|
||||
|
||||
if (get_class($PublicLink) === '__PHP_Incomplete_Class') {
|
||||
$PublicLink = Util::castToClass($this->getDataModel(), $PublicLink);
|
||||
}
|
||||
|
||||
$PublicLink->setPublicLinkId($queryRes->getPublicLinkId());
|
||||
|
||||
return $PublicLink;
|
||||
}
|
||||
|
||||
return false;
|
||||
/**
|
||||
* @var $PublicLink PublicLinkData
|
||||
*/
|
||||
$PublicLink = Util::castToClass($this->getDataModel(), $queryRes->getPublicLinkLinkData());
|
||||
$PublicLink->setPublicLinkId($queryRes->getPublicLinkId());
|
||||
|
||||
return $PublicLink;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -51,7 +51,7 @@ class PublicLinkSearch extends PublicLinkBase implements ItemSearchInterface
|
||||
public function getMgmtSearch(ItemSearchData $SearchData)
|
||||
{
|
||||
$Data = new QueryData();
|
||||
$Data->setMapClassName('SP\DataModel\PublicLinkListData');
|
||||
$Data->setMapClassName(PublicLinkListData::class);
|
||||
$Data->setSelect('publicLink_id, publicLink_hash, publicLink_linkData');
|
||||
$Data->setFrom('publicLinks');
|
||||
$Data->setLimit('?,?');
|
||||
@@ -60,25 +60,18 @@ class PublicLinkSearch extends PublicLinkBase implements ItemSearchInterface
|
||||
|
||||
DB::setFullRowCount();
|
||||
|
||||
/** @var PublicLinkListData[] $queryRes */
|
||||
$queryRes = DB::getResultsArray($Data);
|
||||
|
||||
$publicLinks = [];
|
||||
$publicLinks['count'] = $Data->getQueryNumRows();
|
||||
|
||||
foreach ($queryRes as $PublicLinkListData) {
|
||||
/**
|
||||
* @var PublicLinkListData $PublicLinkListData
|
||||
* @var PublicLinkData $PublicLinkData
|
||||
*/
|
||||
$PublicLinkData = unserialize($PublicLinkListData->getPublicLinkLinkData());
|
||||
|
||||
if (get_class($PublicLinkData) === '__PHP_Incomplete_Class') {
|
||||
$PublicLinkData = Util::castToClass($this->getDataModel(), $PublicLinkData);
|
||||
}
|
||||
$PublicLinkData = Util::castToClass($this->getDataModel(), $PublicLinkListData->getPublicLinkLinkData());
|
||||
|
||||
$PublicLinkListData->setAccountName(AccountUtil::getAccountNameById($PublicLinkData->getItemId()));
|
||||
$PublicLinkListData->setUserLogin(UserUtil::getUserLoginById($PublicLinkData->getUserId()));
|
||||
$PublicLinkListData->setNotify(($PublicLinkData->isNotify()) ? _('ON') : _('OFF'));
|
||||
$PublicLinkListData->setNotify($PublicLinkData->isNotify() ? _('ON') : _('OFF'));
|
||||
$PublicLinkListData->setDateAdd(date('Y-m-d H:i', $PublicLinkData->getDateAdd()));
|
||||
$PublicLinkListData->setDateExpire(date('Y-m-d H:i', $PublicLinkData->getDateExpire()));
|
||||
$PublicLinkListData->setCountViews($PublicLinkData->getCountViews() . '/' . $PublicLinkData->getMaxCountViews());
|
||||
|
||||
@@ -38,7 +38,7 @@ class UserLdapSync
|
||||
$ldapObjects = $Ldap->findObjects();
|
||||
self::$totalObjects = (int)$ldapObjects['count'];
|
||||
|
||||
$Log->addDescription(sprintf(_('Objetos encontrados: %s'), self::$totalObjects));
|
||||
$Log->addDescription(sprintf(_('Objetos encontrados: %d'), self::$totalObjects));
|
||||
|
||||
if (self::$totalObjects > 0) {
|
||||
$UserData = new UserData();
|
||||
|
||||
@@ -96,7 +96,7 @@ class UserPass extends UserBase
|
||||
{
|
||||
$configMPassTime = ConfigDB::getValue('lastupdatempass');
|
||||
|
||||
if ($configMPassTime === false) {
|
||||
if (empty($configMPassTime)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -177,22 +177,17 @@ class UserPass extends UserBase
|
||||
$userMPass = $this->getUserMPass();
|
||||
$configHashMPass = ConfigDB::getValue('masterPwd');
|
||||
|
||||
if ($userMPass === false
|
||||
|| $configHashMPass === false
|
||||
|| null === $configHashMPass
|
||||
) {
|
||||
if ($userMPass === false || empty($configHashMPass)) {
|
||||
return false;
|
||||
} elseif ($userMPass === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Comprobamos el hash de la clave del usuario con la guardada
|
||||
if (Crypt::checkHashPass($userMPass, $configHashMPass, true)) {
|
||||
} elseif (Crypt::checkHashPass($userMPass, $configHashMPass, true)) {
|
||||
$this->clearUserMPass = $userMPass;
|
||||
return SessionUtil::saveSessionMPass($userMPass);
|
||||
}
|
||||
|
||||
return false;
|
||||
return SessionUtil::saveSessionMPass($userMPass);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -204,7 +199,7 @@ class UserPass extends UserBase
|
||||
public function getUserMPass($cypher = null)
|
||||
{
|
||||
$query = /** @lang SQL */
|
||||
'SELECT user_mPass, user_mIV FROM usrData WHERE user_id = ? LIMIT 1';
|
||||
'SELECT user_mPass, user_mIV, user_lastUpdateMPass FROM usrData WHERE user_id = ? LIMIT 1';
|
||||
|
||||
$Data = new QueryData();
|
||||
$Data->setQuery($query);
|
||||
@@ -212,12 +207,12 @@ class UserPass extends UserBase
|
||||
|
||||
$queryRes = DB::getResults($Data);
|
||||
|
||||
if ($queryRes === false) {
|
||||
return false;
|
||||
} elseif ($queryRes->user_mPass === ''
|
||||
|| $queryRes->user_mIV === ''
|
||||
if ($queryRes === false
|
||||
|| empty($queryRes->user_mPass)
|
||||
|| empty($queryRes->user_mIV)
|
||||
|| $queryRes->user_lastUpdateMPass < ConfigDB::getValue('lastupdatempass')
|
||||
) {
|
||||
return null;
|
||||
return false;
|
||||
}
|
||||
|
||||
return Crypt::getDecrypt($queryRes->user_mPass, $queryRes->user_mIV, $this->getCypherPass($cypher));
|
||||
@@ -236,6 +231,31 @@ class UserPass extends UserBase
|
||||
return Crypt::generateAesKey($pass . $this->itemData->getUserLogin());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getClearUserMPass()
|
||||
{
|
||||
return $this->clearUserMPass;
|
||||
}
|
||||
|
||||
/**
|
||||
* Actualizar la clave maestra con la clave anterior del usuario
|
||||
*
|
||||
* @param $oldUserPass
|
||||
* @return bool
|
||||
*/
|
||||
public function updateMasterPass($oldUserPass)
|
||||
{
|
||||
$masterPass = $this->getUserMPass($oldUserPass);
|
||||
|
||||
if ($masterPass) {
|
||||
return $this->updateUserMPass($masterPass);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Actualizar la clave maestra del usuario en la BBDD.
|
||||
*
|
||||
@@ -278,29 +298,4 @@ class UserPass extends UserBase
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getClearUserMPass()
|
||||
{
|
||||
return $this->clearUserMPass;
|
||||
}
|
||||
|
||||
/**
|
||||
* Actualizar la clave maestra con la clave anterior del usuario
|
||||
*
|
||||
* @param $oldUserPass
|
||||
* @return bool
|
||||
*/
|
||||
public function updateMasterPass($oldUserPass)
|
||||
{
|
||||
$masterPass = $this->getUserMPass($oldUserPass);
|
||||
|
||||
if ($masterPass) {
|
||||
return $this->updateUserMPass($masterPass);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -99,19 +99,11 @@ class UserPreferences extends UserPreferencesBase implements ItemInterface
|
||||
/** @var UserData $queryRes */
|
||||
$queryRes = DB::getResults($Data);
|
||||
|
||||
if ($queryRes === false || null === $queryRes->getUserPreferences()) {
|
||||
if ($queryRes === false || $queryRes->getUserPreferences() === null) {
|
||||
return $this->getItemData();
|
||||
}
|
||||
|
||||
$UserPreferencesData = unserialize($queryRes->getUserPreferences());
|
||||
|
||||
if ($UserPreferencesData === false) {
|
||||
return new UserPreferencesData();
|
||||
} elseif (get_class($UserPreferencesData) === '__PHP_Incomplete_Class') {
|
||||
$UserPreferencesData = Util::castToClass($this->getDataModel(), $UserPreferencesData);
|
||||
}
|
||||
|
||||
return $UserPreferencesData;
|
||||
return Util::castToClass($this->getDataModel(), $queryRes->getUserPreferences());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -67,13 +67,9 @@ class UserPreferencesUtil
|
||||
$data = [];
|
||||
|
||||
foreach ($queryRes as $user) {
|
||||
/** @var UserPreferencesData $UserPreferencesData */
|
||||
$UserPreferencesData = unserialize($user->getUserPreferences());
|
||||
|
||||
if ($UserPreferencesData !== false) {
|
||||
if (get_class($UserPreferencesData) === '__PHP_Incomplete_Class') {
|
||||
$UserPreferencesData = Util::castToClass(UserPreferencesData::class, $UserPreferencesData);
|
||||
}
|
||||
if ($user->getUserPreferences() !== '') {
|
||||
/** @var UserPreferencesData $UserPreferencesData */
|
||||
$UserPreferencesData = Util::castToClass(UserPreferencesData::class, $user->getUserPreferences());
|
||||
|
||||
if ($UserPreferencesData->isUse2Fa()) {
|
||||
$Authenticator = new Authenticator($user->user_id, $user->user_login, $user->user_mIV);
|
||||
|
||||
@@ -479,13 +479,21 @@ class Util
|
||||
* Cast an object to another class, keeping the properties, but changing the methods
|
||||
*
|
||||
* @param string $class Class name
|
||||
* @param object $object
|
||||
* @return object
|
||||
* @param string|object $object
|
||||
* @return mixed
|
||||
* @link http://blog.jasny.net/articles/a-dark-corner-of-php-class-casting/
|
||||
*/
|
||||
public static function castToClass($class, $object)
|
||||
{
|
||||
return unserialize(preg_replace('/^O:\d+:"[^"]++"/', 'O:' . strlen($class) . ':"' . $class . '"', serialize($object)));
|
||||
if (!is_object($object)) {
|
||||
$object = unserialize($object);
|
||||
}
|
||||
|
||||
if (get_class($object) === '__PHP_Incomplete_Class') {
|
||||
return unserialize(preg_replace('/^O:\d+:"[^"]++"/', 'O:' . strlen($class) . ':"' . $class . '"', serialize($object)));
|
||||
} else {
|
||||
return $object;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -70,7 +70,8 @@
|
||||
#content #data-search .account-info {
|
||||
padding: .5em 0 .5em 0;
|
||||
text-align: left;
|
||||
opacity: 0.3; }
|
||||
opacity: 0.3;
|
||||
min-height: 4em; }
|
||||
#content #data-search .account-info:hover {
|
||||
opacity: 1; }
|
||||
#content #data-search .account-actions {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 3,
|
||||
"mappings": ";;AAIE,qBAAa;EACX,UAAU,EAAE,MAAM;EAClB,OAAO,EAAE,OAAO;EAChB,KAAK,EAAE,IAAI;EACX,MA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AE,GAAG;IACX,KAAK,EAAE,GAAG;EAGZ,+BAAU;IACR,OAAO,EAAE,YAAY;IAErB,wCAAS;MACP,MAAM,EAAE,OAAO;MACf,OAAO,EAAE,GAAG;MACZ,8CAAQ;QACN,OAAO,EAAE,CAAC;;AAOpB,qCAAsC;EAGhC,oCAAe;IACb,SAAS,EAAE,IAAI;IAEf;wDACgB;MACd,SAAS,EAAE,IAAI;MACf,MAAM,EAAE,IAAI;IAIZ,6DAAY;MACV,OAAO,EAAE,KAAK;MACd,UAAU,EAAE,IAAI;MAChB,aAAa,EAAE,iBAAiB;IAIpC;qDACa;MACX,MAAM,EAAE,IAAI;IAGd;2DACmB;MACjB,KAAK,EAAE,IAAI",
|
||||
"sources": ["search-grid.scss","_base.scss"],
|
||||
"names": [],
|
||||
"file": "search-grid.css"
|
||||
|
||||
@@ -1 +1 @@
|
||||
@charset "UTF-8";#content #data-search{text-align:center;padding:.5em 0;width:100%;margin:0 auto}#content #data-search .account-info img,#content #data-search .account-actions img{width:24px;height:24px;margin:0 .5em}#content #data-search .account-label{display:flex;justify-content:space-between;width:100%;min-height:8em;height:auto;text-align:left;margin:0 auto .5em;color:#696969;background-color:#fcfcfc;padding:0 .5em}#content #data-search .account-label .label-row-up,#content #data-search .account-label .label-row-down{display:flex;min-height:3em;height:auto;width:100%;padding:.5em 0}#content #data-search .account-label .label-row-down{height:3em}#content #data-search .account-label .label-left{display:flex;flex-wrap:wrap;align-items:center;width:100%;height:4em}#content #data-search .account-label .label-right{display:flex;flex-wrap:wrap;width:18em;height:4em}#content #data-search .account-label .label-right>div{width:18em}#content #data-search .account-label .label-field{width:100%;min-height:3em;height:auto;padding:0 .3em}#content #data-search .account-label .field-text{word-wrap:break-word}#content #data-search .account-label .field-text a{color:#5c6bc0}#content #data-search .account-label .field-customer{flex-grow:2}#content #data-search .account-label .field-name{padding:.3em .2em;color:#b9b9b9;display:none}#content #data-search .account-label .field-name-hidden{display:none}#content #data-search .account-label .header .field-name{color:white;font-weight:bold}#content #data-search .account-label .no-link,#content #data-search .account-label .no-link a{color:white;font-weight:bold}#content #data-search .account-info{padding:.5em 0 .5em 0;text-align:left;opacity:.3}#content #data-search .account-info:hover{opacity:1}#content #data-search .account-actions{align-self:baseline;padding:.5em 0;text-align:right;border-top:1px solid #c9c9c9}#content #data-search .account-spacer{float:left;clear:left;height:2em;width:20%}#content #data-search .tags-box{display:inline-block}#content #data-search .tags-box span.tag{cursor:pointer;opacity:.3}#content #data-search .tags-box span.tag:hover{opacity:1}@media screen and (max-width:1000px){#content #data-search .account-label{flex-wrap:wrap}#content #data-search .account-label .label-row-up,#content #data-search .account-label .label-row-down{flex-wrap:wrap;height:auto}#content #data-search .account-label .label-field .field-name{display:block;text-align:left;border-bottom:1px solid #d9d9d9}#content #data-search .account-label .label-left,#content #data-search .account-label .label-right{height:auto}#content #data-search .account-label .label-right,#content #data-search .account-label .label-right>div{width:100%}}
|
||||
@charset "UTF-8";#content #data-search{text-align:center;padding:.5em 0;width:100%;margin:0 auto}#content #data-search .account-info img,#content #data-search .account-actions img{width:24px;height:24px;margin:0 .5em}#content #data-search .account-label{display:flex;justify-content:space-between;width:100%;min-height:8em;height:auto;text-align:left;margin:0 auto .5em;color:#696969;background-color:#fcfcfc;padding:0 .5em}#content #data-search .account-label .label-row-up,#content #data-search .account-label .label-row-down{display:flex;min-height:3em;height:auto;width:100%;padding:.5em 0}#content #data-search .account-label .label-row-down{height:3em}#content #data-search .account-label .label-left{display:flex;flex-wrap:wrap;align-items:center;width:100%;height:4em}#content #data-search .account-label .label-right{display:flex;flex-wrap:wrap;width:18em;height:4em}#content #data-search .account-label .label-right>div{width:18em}#content #data-search .account-label .label-field{width:100%;min-height:3em;height:auto;padding:0 .3em}#content #data-search .account-label .field-text{word-wrap:break-word}#content #data-search .account-label .field-text a{color:#5c6bc0}#content #data-search .account-label .field-customer{flex-grow:2}#content #data-search .account-label .field-name{padding:.3em .2em;color:#b9b9b9;display:none}#content #data-search .account-label .field-name-hidden{display:none}#content #data-search .account-label .header .field-name{color:white;font-weight:bold}#content #data-search .account-label .no-link,#content #data-search .account-label .no-link a{color:white;font-weight:bold}#content #data-search .account-info{padding:.5em 0 .5em 0;text-align:left;opacity:.3;min-height:4em}#content #data-search .account-info:hover{opacity:1}#content #data-search .account-actions{align-self:baseline;padding:.5em 0;text-align:right;border-top:1px solid #c9c9c9}#content #data-search .account-spacer{float:left;clear:left;height:2em;width:20%}#content #data-search .tags-box{display:inline-block}#content #data-search .tags-box span.tag{cursor:pointer;opacity:.3}#content #data-search .tags-box span.tag:hover{opacity:1}@media screen and (max-width:1000px){#content #data-search .account-label{flex-wrap:wrap}#content #data-search .account-label .label-row-up,#content #data-search .account-label .label-row-down{flex-wrap:wrap;height:auto}#content #data-search .account-label .label-field .field-name{display:block;text-align:left;border-bottom:1px solid #d9d9d9}#content #data-search .account-label .label-left,#content #data-search .account-label .label-right{height:auto}#content #data-search .account-label .label-right,#content #data-search .account-label .label-right>div{width:100%}}
|
||||
@@ -102,6 +102,7 @@
|
||||
padding: .5em 0 .5em 0;
|
||||
text-align: left;
|
||||
opacity: 0.3;
|
||||
min-height: 4em;
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="255" autocomplete="off">
|
||||
<label class="mdl-textfield__label"
|
||||
for="accountpassR"><?php echo _('Clave (Repetir)'); ?></label>
|
||||
for="accountpassR"><?php echo _('Clave (repetir)'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
class="mdl-switch__input mdl-color-text--indigo-400"
|
||||
name="profile_config" <?php echo $profile->isConfigGeneral() ? 'CHECKED' : ''; ?> <?php echo $isDisabled; ?>/>
|
||||
<span class="mdl-switch__label"
|
||||
title="<?php echo _('Configuración general'); ?>"><?php echo _('General'); ?></span>
|
||||
title="<?php echo _('Configuración General'); ?>"><?php echo _('General'); ?></span>
|
||||
</label>
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="profile_configmpw">
|
||||
<input type="checkbox" id="profile_configmpw"
|
||||
|
||||
@@ -139,14 +139,14 @@
|
||||
title="<?php echo _('Administrador de la aplicación'); ?>">
|
||||
<input type="checkbox" id="adminapp" class="mdl-switch__input mdl-color-text--indigo-400"
|
||||
name="adminapp" <?php echo $user->isUserIsAdminApp() ? 'checked' : ' '; ?> <?php echo $isDisabled; ?>/>
|
||||
<span class="mdl-switch__label"><?php echo _('Admin. Aplicación'); ?></span>
|
||||
<span class="mdl-switch__label"><?php echo _('Admin Aplicación'); ?></span>
|
||||
</label>
|
||||
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="adminacc"
|
||||
title="<?php echo _('Administrador de cuentas'); ?>">
|
||||
<input type="checkbox" id="adminacc" class="mdl-switch__input mdl-color-text--indigo-400"
|
||||
name="adminacc" <?php echo $user->isUserIsAdminAcc() ? 'checked' : ' '; ?> <?php echo $isDisabled; ?>/>
|
||||
<span class="mdl-switch__label"><?php echo _('Admin. Cuentas'); ?></span>
|
||||
<span class="mdl-switch__label"><?php echo _('Admin Cuentas'); ?></span>
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
data-item-id="<?php echo $userId; ?>"
|
||||
data-sk="<?php echo $sk; ?>">security</i>
|
||||
<span for="btnUserPass"
|
||||
class="mdl-tooltip mdl-tooltip--top"><?php echo _('Cambiar clave de usuario'); ?></span>
|
||||
class="mdl-tooltip mdl-tooltip--top"><?php echo _('Cambiar Clave de Usuario'); ?></span>
|
||||
<?php endif; ?>
|
||||
<i id="btnPrefs" class="material-icons"
|
||||
data-action-id="<?php echo \SP\Core\ActionsInterface::ACTION_USR_PREFERENCES; ?>">account_circle</i>
|
||||
|
||||
@@ -43,13 +43,13 @@
|
||||
<?php endforeach; ?>
|
||||
<?php if ($showPassIcon): ?>
|
||||
<a class="btn-action mdl-navigation__link"
|
||||
title="<?php echo _('Cambiar clave de usuario'); ?>"
|
||||
title="<?php echo _('Cambiar Clave de Usuario'); ?>"
|
||||
data-onclick="appMgmt/show"
|
||||
data-action-id="<?php echo \SP\Core\ActionsInterface::ACTION_USR_USERS_EDITPASS; ?>"
|
||||
data-item-id="<?php echo $userId; ?>"
|
||||
data-sk="<?php echo $sk; ?>">
|
||||
<i class="btn-action material-icons">security</i>
|
||||
<?php echo _('Cambiar clave de usuario'); ?>
|
||||
<?php echo _('Cambiar Clave de Usuario'); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<a class="btn-menu mdl-navigation__link"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<html lang="<?php echo $lang; ?>">
|
||||
<head>
|
||||
<title><?php echo $appInfo['appname'], ' :: ', $appInfo['appdesc']; ?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
<?php /** @var $icons \Theme\Icons */ ?>
|
||||
|
||||
<!-- Start Tab - Security -->
|
||||
<div id="tabs-<?php echo $security_tabIndex; ?>" class="mdl-tabs__panel">
|
||||
<div class="tab-data">
|
||||
<div id="title" class="midroundup titleNormal">
|
||||
<?php echo _('Autentificación'); ?>
|
||||
</div>
|
||||
|
||||
<form method="post" name="frmSecurity" id="frmSecurity" class="form-action"
|
||||
data-onsubmit="user/saveSecurity"
|
||||
data-nextaction-id="<?php echo \SP\Core\ActionsInterface::ACTION_USR_PREFERENCES_SECURITY; ?>"
|
||||
data-activetab="<?php echo $security_tabIndex; ?>">
|
||||
<table id="tblSite" class="data tblConfig round">
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo _('Autentificación en 2 pasos'); ?>
|
||||
<div id="help-security_2fa"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-security_2fa">
|
||||
<p>
|
||||
<?php echo _('Habilita la autentificación en 2 pasos que requiere de la introducción de un token generado por una aplicación como Google Authenticator.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo _('Escanee el código QR proporcionado y a continuación introduzca la clave de 6 dígitos.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="security_2faenabled">
|
||||
<input type="checkbox" id="security_2faenabled"
|
||||
class="mdl-switch__input mdl-color-text--indigo-400"
|
||||
name="security_2faenabled" <?php echo ($chk2FAEnabled) ? 'checked' : ''; ?>/>
|
||||
<span class="mdl-switch__label"><?php echo _('Activar'); ?></span>
|
||||
</label>
|
||||
<?php if (!$chk2FAEnabled && $qrCode): ?>
|
||||
<br><br>
|
||||
<img id="security_qrcode" src="data:image/gif;base64,<?php echo $qrCode; ?>" alt="QR Code"/>
|
||||
<?php elseif ($qrCode === false): ?>
|
||||
<p class="ui-state-error"><?php echo _('Error al obtener el código QR. Inténtelo de nuevo'); ?></p>
|
||||
<?php endif; ?>
|
||||
<br><br>
|
||||
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="security_pin" name="security_pin" type="text"
|
||||
pattern="[0-9]{6}" class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="6"
|
||||
required/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="security_pin"><?php echo _('Código'); ?></label>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div
|
||||
class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></div>
|
||||
<?php echo _('Una vez activada, sólo es posible acceder si se dispone del dispositivo generador de códigos asociado.'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="itemId" value="<?php echo $userId; ?>"/>
|
||||
<input type="hidden" name="actionId" value="<?php echo $security_actionId; ?>"/>
|
||||
<input type="hidden" name="isAjax" value="1"/>
|
||||
<input type="hidden" name="sk" value="">
|
||||
|
||||
</form>
|
||||
<div class="tab-actions">
|
||||
<ul>
|
||||
<li>
|
||||
<button form="frmSecurity" type="submit"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- End Tab - Security -->
|
||||
2
js/app-actions.min.js
vendored
2
js/app-actions.min.js
vendored
@@ -1,5 +1,5 @@
|
||||
var $jscomp={scope:{},findInternal:function(c,d,h){c instanceof String&&(c=String(c));for(var e=c.length,g=0;g<e;g++){var n=c[g];if(d.call(h,n,g,c))return{i:g,v:n}}return{i:-1,v:void 0}}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(c,d,h){if(h.get||h.set)throw new TypeError("ES3 does not support getters and setters.");c!=Array.prototype&&c!=Object.prototype&&(c[d]=h.value)};
|
||||
$jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global&&null!=global?global:c};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(c,d,h,e){if(d){h=$jscomp.global;c=c.split(".");for(e=0;e<c.length-1;e++){var g=c[e];g in h||(h[g]={});h=h[g]}c=c[c.length-1];e=h[c];d=d(e);d!=e&&null!=d&&$jscomp.defineProperty(h,c,{configurable:!0,writable:!0,value:d})}};
|
||||
$jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global?global:c};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(c,d,h,e){if(d){h=$jscomp.global;c=c.split(".");for(e=0;e<c.length-1;e++){var g=c[e];g in h||(h[g]={});h=h[g]}c=c[c.length-1];e=h[c];d=d(e);d!=e&&null!=d&&$jscomp.defineProperty(h,c,{configurable:!0,writable:!0,value:d})}};
|
||||
$jscomp.polyfill("Array.prototype.find",function(c){return c?c:function(c,h){return $jscomp.findInternal(this,c,h).v}},"es6-impl","es3");
|
||||
sysPass.Actions=function(c){var d=c.log,h=0,e={doAction:"/ajax/ajax_getContent.php",updateItems:"/ajax/ajax_getItems.php",user:{savePreferences:"/ajax/ajax_userPrefsSave.php",password:"/ajax/ajax_usrpass.php",passreset:"/ajax/ajax_passReset.php"},main:{login:"/ajax/ajax_doLogin.php",install:"/ajax/ajax_install.php",getUpdates:"/ajax/ajax_checkUpds.php"},checks:"/ajax/ajax_checkConnection.php",config:{save:"/ajax/ajax_configSave.php","export":"/ajax/ajax_configSave.php","import":"/ajax/ajax_configSave.php"},
|
||||
file:"/ajax/ajax_filesMgmt.php",link:"/ajax/ajax_itemSave.php",plugin:"/ajax/ajax_itemSave.php",account:{save:"/ajax/ajax_itemSave.php",showPass:"/ajax/ajax_accViewPass.php",saveFavorite:"/ajax/ajax_itemSave.php",request:"/ajax/ajax_itemSave.php",getFiles:"/ajax/ajax_accGetFiles.php",search:"/ajax/ajax_accSearch.php"},appMgmt:{show:"/ajax/ajax_itemShow.php",save:"/ajax/ajax_itemSave.php",search:"/ajax/ajax_itemSearch.php"},eventlog:"/ajax/ajax_eventlog.php",wiki:{show:"/ajax/ajax_wiki.php"},notice:{show:"/ajax/ajax_noticeShow.php",
|
||||
|
||||
2
js/app-main.min.js
vendored
2
js/app-main.min.js
vendored
@@ -1,4 +1,4 @@
|
||||
var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(a,f,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[f]=c.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_";
|
||||
var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(a,f,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[f]=c.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_";
|
||||
$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(a){return $jscomp.SYMBOL_PREFIX+(a||"")+$jscomp.symbolCounter_++};
|
||||
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(a){var f=0;return $jscomp.iteratorPrototype(function(){return f<a.length?{done:!1,value:a[f++]}:{done:!0}})};
|
||||
$jscomp.iteratorPrototype=function(a){$jscomp.initSymbolIterator();a={next:a};a[$jscomp.global.Symbol.iterator]=function(){return this};return a};$jscomp.array=$jscomp.array||{};$jscomp.iteratorFromArray=function(a,f){$jscomp.initSymbolIterator();a instanceof String&&(a+="");var c=0,e={next:function(){if(c<a.length){var g=c++;return{value:f(g,a[g]),done:!1}}e.next=function(){return{done:!0,value:void 0}};return e.next()}};e[Symbol.iterator]=function(){return e};return e};
|
||||
|
||||
Reference in New Issue
Block a user