Merge branch 'devel'

Conflicts:
	.gitignore
	ajax/ajax_2fa.php
	ajax/ajax_accountSave.php
	ajax/ajax_appMgmtSave.php
	ajax/ajax_configSave.php
	ajax/ajax_doLogin.php
	ajax/ajax_files.php
	ajax/ajax_getEnvironment.php
	ajax/ajax_userPrefsSave.php
	ajax/ajax_viewpass.php
	css/alertify-bootstrap-3.min.css
	css/chosen-custom.min.css
	css/css.php
	inc/Account.class.php
	inc/AccountBase.class.php
	inc/AccountHistory.class.php
	inc/AccountSearch.class.php
	inc/Acl.class.php
	inc/ActionLog.class.php
	inc/Api.class.php
	inc/Auth.class.php
	inc/CsvImportBase.class.php
	inc/CustomFields.class.php
	inc/DB.class.php
	inc/Init.class.php
	inc/Installer.class.php
	inc/Ldap.class.php
	inc/LdapADS.class.php
	inc/Log.class.php
	inc/Request.class.php
	inc/SP/Core/Crypt.class.php
	inc/SP/Core/CryptMasterPass.class.php
	inc/SP/Core/Language.class.php
	inc/SP/Core/Session.class.php
	inc/SP/Html/Html.class.php
	inc/SP/Html/Minify.class.php
	inc/SessionUtil.class.php
	inc/Upgrade.class.php
	inc/UserBase.class.php
	inc/UserLdap.class.php
	inc/UserMigrate.class.php
	inc/UserPreferences.class.php
	inc/Util.class.php
	inc/dbstructure.sql
	inc/locales/ca_ES/LC_MESSAGES/messages.mo
	inc/locales/ca_ES/LC_MESSAGES/messages.po
	inc/locales/de_DE/LC_MESSAGES/messages.mo
	inc/locales/de_DE/LC_MESSAGES/messages.po
	inc/locales/en_US/LC_MESSAGES/messages.mo
	inc/locales/en_US/LC_MESSAGES/messages.po
	inc/locales/fr_FR/LC_MESSAGES/messages.mo
	inc/locales/fr_FR/LC_MESSAGES/messages.po
	inc/locales/hu_HU/LC_MESSAGES/messages.mo
	inc/locales/hu_HU/LC_MESSAGES/messages.po
	inc/locales/it_IT/LC_MESSAGES/messages.mo
	inc/locales/it_IT/LC_MESSAGES/messages.po
	inc/locales/nl_NL/LC_MESSAGES/messages.mo
	inc/locales/nl_NL/LC_MESSAGES/messages.po
	inc/locales/ru_RU/LC_MESSAGES/messages.mo
	inc/locales/ru_RU/LC_MESSAGES/messages.po
	inc/themes/classic/account.inc
	inc/themes/classic/categories.inc
	inc/themes/classic/config.inc
	inc/themes/classic/css/styles.min.css
	inc/themes/classic/customers.inc
	inc/themes/classic/customfields.inc
	inc/themes/classic/groups.inc
	inc/themes/classic/import.inc
	inc/themes/classic/js/functions.min.js
	inc/themes/classic/ldap.inc
	inc/themes/classic/mail.inc
	inc/themes/classic/mgmttabs.inc
	inc/themes/classic/preferences.inc
	inc/themes/classic/request.inc
	inc/themes/classic/search.inc
	inc/themes/classic/searchbox.inc
	inc/themes/classic/sessionbar.inc
	inc/themes/classic/tokens.inc
	inc/themes/classic/users.inc
	inc/themes/classic/wiki.inc
	inc/themes/material-blue/2fa.inc
	inc/themes/material-blue/account.inc
	inc/themes/material-blue/categories.inc
	inc/themes/material-blue/config.inc
	inc/themes/material-blue/css/alertify-custom.min.css
	inc/themes/material-blue/css/fonts.css
	inc/themes/material-blue/css/search-grid.css
	inc/themes/material-blue/css/styles.css
	inc/themes/material-blue/css/styles.min.css
	inc/themes/material-blue/customers.inc
	inc/themes/material-blue/encryption.inc
	inc/themes/material-blue/error.inc
	inc/themes/material-blue/groups.inc
	inc/themes/material-blue/import.inc
	inc/themes/material-blue/install.inc
	inc/themes/material-blue/js-common.inc
	inc/themes/material-blue/js/functions.min.js
	inc/themes/material-blue/js/material.min.js
	inc/themes/material-blue/ldap.inc
	inc/themes/material-blue/login.inc
	inc/themes/material-blue/mgmttabs.inc
	inc/themes/material-blue/passreset.inc
	inc/themes/material-blue/preferences.inc
	inc/themes/material-blue/profiles.inc
	inc/themes/material-blue/search.inc
	inc/themes/material-blue/searchbox.inc
	inc/themes/material-blue/tokens.inc
	inc/themes/material-blue/upgrade.inc
	inc/themes/material-blue/users.inc
	js/chosen.jquery.min.js
	js/clipboard.min.js
	js/functions.min.js
	js/js.php
	js/strings.js.php
	js/zxcvbn-async.min.js
	js/zxcvbn.min.js
	web/AccountC.class.php
	web/ConfigC.class.php
	web/MainC.class.php
	web/SearchC.class.php
	web/UsersMgmtC.class.php
	web/UsersPrefsC.class.php
This commit is contained in:
nuxsmin
2017-02-13 00:38:47 +01:00
857 changed files with 157028 additions and 68516 deletions

61
.gitignore vendored
View File

@@ -1,10 +1,51 @@
.idea/
config/config.php
config/key.pem
config/pubkey.pem
/res/*
/tools/*
/patches/*
/backup/*
/js/jquery-1.11.2.min.map
msg.po
# Created by .ignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
# Gradle:
.idea/gradle.xml
.idea/libraries
# Mongo Explorer plugin:
.idea/mongoSettings.xml
## File-based project format:
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
backup/*
config/*
res/
tools/

View File

@@ -2,9 +2,9 @@
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -19,12 +19,15 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\Request;
use SP\SessionUtil;
use SP\Controller\ItemListController;
use SP\Core\Init;
use SP\Core\SessionUtil;
use SP\Http\Request;
use SP\Http\Response;
use SP\Util\Checks;
define('APP_ROOT', '..');
@@ -32,21 +35,21 @@ require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Bas
Request::checkReferer('GET');
if (!SP\Init::isLoggedIn()) {
if (!Init::isLoggedIn()) {
return;
}
if (!SP\Util::fileIsEnabled()) {
echo _('Gestión de archivos deshabilitada');
if (!Checks::fileIsEnabled()) {
echo __('Gestión de archivos deshabilitada');
return false;
}
$sk = SP\Request::analyze('sk', false);
$sk = Request::analyze('sk', false);
if (!$sk || !SessionUtil::checkSessionKey($sk)) {
SP\Response::printXML(_('CONSULTA INVÁLIDA'));
Response::printHtmlError(__('CONSULTA INVÁLIDA'));
}
$controller = new SP\Controller\AccountsMgmtC();
$controller->getFiles();
$controller->view();
$Controller = new ItemListController();
$Controller->getAccountFiles();
$Controller->view();

View File

@@ -2,9 +2,9 @@
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -19,34 +19,38 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\SessionUtil;
use SP\Controller\AccountSearchController;
use SP\Core\Init;
use SP\Http\Request;
use SP\Core\SessionUtil;
use SP\Http\Response;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
SP\Request::checkReferer('POST');
Request::checkReferer('GET');
$sk = SP\Request::analyze('sk', false);
if (!$sk || !SessionUtil::checkSessionKey($sk)) {
SP\Response::printJSON(_('CONSULTA INVÁLIDA'));
if (!Init::isLoggedIn()) {
Response::printJson(__('La sesión no se ha iniciado o ha caducado'), 10);
}
$userId = SP\Request::analyze('itemId', 0);
$pin = SP\Request::analyze('security_pin', 0);
$sk = Request::analyze('sk', false);
$twoFa = new \SP\Auth\Auth2FA($userId, $userLogin);
if (!$sk || !SessionUtil::checkSessionKey($sk)) {
Response::printJson(__('CONSULTA INVÁLIDA'));
}
if($userId && $pin && $twoFa->verifyKey($pin)){
\SP\Session::set2FApassed(true);
$Controller = new AccountSearchController();
$Controller->setIsAjax(true);
$Controller->getSearch();
SP\Response::printJSON(_('Código correcto'), 0, 'sysPassUtil.Common.redirect(\'index.php\')');
} else {
\SP\Session::set2FApassed(false);
SP\Response::printJSON(_('Código incorrecto'));
}
$data = [
'sk' => SessionUtil::getSessionKey(),
'html' => $Controller->render()
];
Response::printJson($data, 0);

View File

@@ -1,264 +0,0 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
*/
use SP\Request;
use SP\SessionUtil;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('POST');
if (!SP\Init::isLoggedIn()) {
SP\Response::printJSON(_('La sesión no se ha iniciado o ha caducado'), 10);
}
$sk = SP\Request::analyze('sk', false);
if (!$sk || !SessionUtil::checkSessionKey($sk)) {
SP\Response::printJSON(_('CONSULTA INVÁLIDA'));
}
// Variables POST del formulario
//$frmSaveType = SP_Request::analyze('savetyp', 0);
$actionId = SP\Request::analyze('actionId', 0);
$accountId = SP\Request::analyze('accountid', 0);
$customerId = SP\Request::analyze('customerId', 0);
$newCustomer = SP\Request::analyze('customer_new');
$accountName = SP\Request::analyze('name');
$accountLogin = SP\Request::analyze('login');
$accountPassword = SP\Request::analyzeEncrypted('pass');
$accountPasswordR = SP\Request::analyzeEncrypted('passR');
$categoryId = SP\Request::analyze('categoryId', 0);
$accountOtherGroups = SP\Request::analyze('othergroups');
$accountOtherUsers = SP\Request::analyze('otherusers');
$accountNotes = SP\Request::analyze('notes');
$accountUrl = SP\Request::analyze('url');
$accountGroupEditEnabled = SP\Request::analyze('geditenabled', 0, false, 1);
$accountUserEditEnabled = SP\Request::analyze('ueditenabled', 0, false, 1);
$accountMainGroupId = SP\Request::analyze('mainGroupId', 0);
$accountChangesHash = SP\Request::analyze('hash');
$customFields = SP\Request::analyze('customfield');
// Datos del Usuario
$currentUserId = SP\Session::getUserId();
if ($accountMainGroupId === 0) {
$accountMainGroupId = SP\Session::getUserGroupId();
}
if ($actionId === \SP\Controller\ActionsInterface::ACTION_ACC_NEW
|| $actionId === \SP\Controller\ActionsInterface::ACTION_ACC_COPY
) {
// Comprobaciones para nueva cuenta
if (!$accountName) {
SP\Response::printJSON(_('Es necesario un nombre de cuenta'));
} elseif (!$customerId && !$newCustomer) {
SP\Response::printJSON(_('Es necesario un nombre de cliente'));
} elseif (!$accountLogin) {
SP\Response::printJSON(_('Es necesario un usuario'));
} elseif (!$accountPassword || !$accountPasswordR) {
SP\Response::printJSON(_('Es necesaria una clave'));
} elseif (!$categoryId) {
SP\Response::printJSON(_('Es necesario una categoría'));
}
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_ACC_EDIT) {
// Comprobaciones para modificación de cuenta
if (!$customerId && !$newCustomer) {
SP\Response::printJSON(_('Es necesario un nombre de cliente'));
} elseif (!$accountName) {
SP\Response::printJSON(_('Es necesario un nombre de cuenta'));
} elseif (!$accountLogin) {
SP\Response::printJSON(_('Es necesario un usuario'));
} elseif (!$categoryId) {
SP\Response::printJSON(_('Es necesario una categoría'));
}
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_ACC_DELETE) {
if (!$accountId) {
SP\Response::printJSON(_('Id inválido'));
}
} elseif ($actionId == \SP\Controller\ActionsInterface::ACTION_ACC_EDIT_PASS) {
// Comprobaciones para modficación de clave
if (!$accountPassword || !$accountPasswordR) {
SP\Response::printJSON(_('Es necesaria una clave'));
}
} elseif ($actionId == \SP\Controller\ActionsInterface::ACTION_ACC_EDIT_RESTORE) {
if (!$accountId) {
SP\Response::printJSON(_('Id inválido'));
}
} else {
SP\Response::printJSON(_('Acción Inválida'));
}
if ($actionId == \SP\Controller\ActionsInterface::ACTION_ACC_NEW
|| $actionId == \SP\Controller\ActionsInterface::ACTION_ACC_COPY
|| $actionId === \SP\Controller\ActionsInterface::ACTION_ACC_EDIT_PASS
) {
if ($accountPassword != $accountPasswordR) {
SP\Response::printJSON(_('Las claves no coinciden'));
}
// Encriptar clave de cuenta
try {
$accountEncPass = SP\Crypt::encryptData($accountPassword);
} catch (\SP\SPException $e) {
SP\Response::printJSON($e->getMessage());
}
}
$Account = new SP\Account;
switch ($actionId) {
case \SP\Controller\ActionsInterface::ACTION_ACC_NEW:
case \SP\Controller\ActionsInterface::ACTION_ACC_COPY:
SP\Customer::$customerName = $newCustomer;
// Comprobar si se ha introducido un nuevo cliente
if ($customerId === 0 && $newCustomer) {
try {
SP\Customer::addCustomer();
$customerId = SP\Customer::$customerLastId;
} catch (\SP\SPException $e) {
SP\Response::printJSON($e->getMessage());
}
}
$Account->setAccountName($accountName);
$Account->setAccountCategoryId($categoryId);
$Account->setAccountCustomerId($customerId);
$Account->setAccountLogin($accountLogin);
$Account->setAccountUrl($accountUrl);
$Account->setAccountPass($accountEncPass['data']);
$Account->setAccountIV($accountEncPass['iv']);
$Account->setAccountNotes($accountNotes);
$Account->setAccountUserId($currentUserId);
$Account->setAccountUserGroupId($accountMainGroupId);
$Account->setAccountUsersId($accountOtherUsers);
$Account->setAccountUserGroupsId($accountOtherGroups);
$Account->setAccountOtherUserEdit($accountUserEditEnabled);
$Account->setAccountOtherGroupEdit($accountGroupEditEnabled);
// Crear cuenta
if ($Account->createAccount()) {
if (is_array($customFields)) {
foreach ($customFields as $id => $value) {
$CustomFields = new \SP\CustomFields($id, $Account->getAccountId(), $value);
$CustomFields->addCustomField();
}
}
SP\Response::printJSON(_('Cuenta creada'), 0);
}
SP\Response::printJSON(_('Error al crear la cuenta'), 0);
break;
case \SP\Controller\ActionsInterface::ACTION_ACC_EDIT:
SP\Customer::$customerName = $newCustomer;
// Comprobar si se ha introducido un nuevo cliente
if ($customerId === 0 && $newCustomer) {
try {
SP\Customer::addCustomer();
$customerId = SP\Customer::$customerLastId;
} catch (\SP\SPException $e) {
SP\Response::printJSON($e->getMessage());
}
}
$Account->setAccountId($accountId);
$Account->setAccountName($accountName);
$Account->setAccountCategoryId($categoryId);
$Account->setAccountCustomerId($customerId);
$Account->setAccountLogin($accountLogin);
$Account->setAccountUrl($accountUrl);
$Account->setAccountNotes($accountNotes);
$Account->setAccountUserEditId($currentUserId);
$Account->setAccountUsersId($accountOtherUsers);
$Account->setAccountUserGroupsId($accountOtherGroups);
$Account->setAccountOtherUserEdit($accountUserEditEnabled);
$Account->setAccountOtherGroupEdit($accountGroupEditEnabled);
// Cambiar el grupo principal si el usuario es Admin
if (SP\Session::getUserIsAdminApp() || SP\Session::getUserIsAdminAcc()) {
$Account->setAccountUserGroupId($accountMainGroupId);
}
// Comprobar si han habido cambios
if ($accountChangesHash == $Account->calcChangesHash()) {
SP\Response::printJSON(_('Sin cambios'), 0);
}
// Actualizar cuenta
if ($Account->updateAccount()) {
if (is_array($customFields)) {
foreach ($customFields as $id => $value) {
$CustomFields = new \SP\CustomFields($id, $accountId, $value);
$CustomFields->updateCustomField();
}
}
SP\Response::printJSON(_('Cuenta actualizada'), 0);
}
SP\Response::printJSON(_('Error al modificar la cuenta'));
break;
case \SP\Controller\ActionsInterface::ACTION_ACC_DELETE:
$Account->setAccountId($accountId);
// Eliminar cuenta
if ($Account->deleteAccount() && \SP\CustomFields::deleteCustomFieldForItem($accountId, \SP\Controller\ActionsInterface::ACTION_ACC_NEW)) {
SP\Response::printJSON(_('Cuenta eliminada'), 0, "sysPassUtil.Common.doAction('" . \SP\Controller\ActionsInterface::ACTION_ACC_SEARCH . "');");
}
SP\Response::printJSON(_('Error al eliminar la cuenta'));
break;
case \SP\Controller\ActionsInterface::ACTION_ACC_EDIT_PASS:
$Account->setAccountId($accountId);
$Account->setAccountPass($accountEncPass['data']);
$Account->setAccountIV($accountEncPass['iv']);
$Account->setAccountUserEditId($currentUserId);
// Actualizar clave de cuenta
if ($Account->updateAccountPass()) {
SP\Response::printJSON(_('Clave actualizada'), 0);
}
SP\Response::printJSON(_('Error al actualizar la clave'));
break;
case \SP\Controller\ActionsInterface::ACTION_ACC_EDIT_RESTORE:
$Account->setAccountId(SP\AccountHistory::getAccountIdFromId($accountId));
$Account->setAccountUserEditId($currentUserId);
if ($Account->restoreFromHistory($accountId)) {
SP\Response::printJSON(_('Cuenta restaurada'), 0);
}
SP\Response::printJSON(_('Error al restaurar cuenta'));
break;
default:
SP\Response::printJSON(_('Acción Inválida'));
}

View File

@@ -1,184 +0,0 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
*/
use SP\Request;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('POST');
if (!SP\Init::isLoggedIn()) {
SP\Util::logout();
}
if (!SP\Request::analyze('itemId', false, true)
|| !SP\Request::analyze('actionId', false, true)
) {
exit();
}
$actionId = SP\Request::analyze('actionId', 0);
$tpl = new SP\Template();
$tpl->assign('itemId', SP\Request::analyze('itemId', 0));
$tpl->assign('activeTab', SP\Request::analyze('activeTab', 0));
$tpl->assign('actionId', $actionId);
$tpl->assign('isView', false);
switch ($actionId) {
case \SP\Controller\ActionsInterface::ACTION_USR_USERS_VIEW:
$tpl->assign('header', _('Ver Usuario'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_USR);
$tpl->assign('isView', true);
$controller = new SP\Controller\UsersMgmtC($tpl);
$controller->getUser();
break;
case \SP\Controller\ActionsInterface::ACTION_USR_USERS_EDIT:
$tpl->assign('header', _('Editar Usuario'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_USR);
$controller = new SP\Controller\UsersMgmtC($tpl);
$controller->getUser();
break;
case \SP\Controller\ActionsInterface::ACTION_USR_USERS_NEW:
$tpl->assign('header', _('Nuevo Usuario'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_USR);
$controller = new SP\Controller\UsersMgmtC($tpl);
$controller->getUser();
break;
case \SP\Controller\ActionsInterface::ACTION_USR_GROUPS_VIEW:
$tpl->assign('header', _('Ver Grupo'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_USR);
$tpl->assign('isView', true);
$controller = new SP\Controller\UsersMgmtC($tpl);
$controller->getGroup();
break;
case \SP\Controller\ActionsInterface::ACTION_USR_GROUPS_EDIT:
$tpl->assign('header', _('Editar Grupo'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_USR);
$controller = new SP\Controller\UsersMgmtC($tpl);
$controller->getGroup();
break;
case \SP\Controller\ActionsInterface::ACTION_USR_GROUPS_NEW:
$tpl->assign('header', _('Nuevo Grupo'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_USR);
$controller = new SP\Controller\UsersMgmtC($tpl);
$controller->getGroup();
break;
case \SP\Controller\ActionsInterface::ACTION_USR_PROFILES_VIEW:
$tpl->assign('header', _('Ver Perfil'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_USR);
$tpl->assign('isView', true);
$controller = new SP\Controller\UsersMgmtC($tpl);
$controller->getProfile();
break;
case \SP\Controller\ActionsInterface::ACTION_USR_PROFILES_EDIT:
$tpl->assign('header', _('Editar Perfil'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_USR);
$controller = new SP\Controller\UsersMgmtC($tpl);
$controller->getProfile();
break;
case \SP\Controller\ActionsInterface::ACTION_USR_PROFILES_NEW:
$tpl->assign('header', _('Nuevo Perfil'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_USR);
$controller = new SP\Controller\UsersMgmtC($tpl);
$controller->getProfile();
break;
case \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMERS_VIEW:
$tpl->assign('header', _('Ver Cliente'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_MGM);
$tpl->assign('isView', true);
$controller = new SP\Controller\AccountsMgmtC($tpl);
$controller->getCustomer();
break;
case \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMERS_EDIT:
$tpl->assign('header', _('Editar Cliente'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_MGM);
$controller = new SP\Controller\AccountsMgmtC($tpl);
$controller->getCustomer();
break;
case \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMERS_NEW:
$tpl->assign('header', _('Nuevo Cliente'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_MGM);
$controller = new SP\Controller\AccountsMgmtC($tpl);
$controller->getCustomer();
break;
case \SP\Controller\ActionsInterface::ACTION_MGM_CATEGORIES_VIEW:
$tpl->assign('header', _('Ver Categoría'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_MGM);
$tpl->assign('isView', true);
$controller = new SP\Controller\AccountsMgmtC($tpl);
$controller->getCategory();
break;
case \SP\Controller\ActionsInterface::ACTION_MGM_CATEGORIES_EDIT:
$tpl->assign('header', _('Editar Categoría'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_MGM);
$controller = new SP\Controller\AccountsMgmtC($tpl);
$controller->getCategory();
break;
case \SP\Controller\ActionsInterface::ACTION_MGM_CATEGORIES_NEW:
$tpl->assign('header', _('Nueva Categoría'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_MGM);
$controller = new SP\Controller\AccountsMgmtC($tpl);
$controller->getCategory();
break;
case \SP\Controller\ActionsInterface::ACTION_MGM_APITOKENS_VIEW:
$tpl->assign('header', _('Ver Autorización'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_USR);
$tpl->assign('isView', true);
$controller = new SP\Controller\UsersMgmtC($tpl);
$controller->getToken();
break;
case \SP\Controller\ActionsInterface::ACTION_MGM_APITOKENS_NEW:
$tpl->assign('header', _('Nueva Autorización'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_USR);
$controller = new SP\Controller\UsersMgmtC($tpl);
$controller->getToken();
break;
case \SP\Controller\ActionsInterface::ACTION_MGM_APITOKENS_EDIT:
$tpl->assign('header', _('Editar Autorización'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_USR);
$controller = new SP\Controller\UsersMgmtC($tpl);
$controller->getToken();
break;
case \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMFIELDS_NEW:
$tpl->assign('header', _('Nuevo Campo'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_MGM);
$controller = new SP\Controller\AccountsMgmtC($tpl);
$controller->getCustomField();
break;
case \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMFIELDS_EDIT:
$tpl->assign('header', _('Editar Campo'));
$tpl->assign('onCloseAction', \SP\Controller\ActionsInterface::ACTION_MGM);
$controller = new SP\Controller\AccountsMgmtC($tpl);
$controller->getCustomField();
break;
default :
exit();
break;
}
$controller->view();

View File

@@ -1,536 +0,0 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
*/
use SP\Request;
use SP\SessionUtil;
use SP\UserUtil;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('POST');
if (!SP\Init::isLoggedIn()) {
SP\Response::printJSON(_('La sesión no se ha iniciado o ha caducado'), 10);
}
$sk = SP\Request::analyze('sk', false);
if (!$sk || !SessionUtil::checkSessionKey($sk)) {
SP\Response::printJSON(_('CONSULTA INVÁLIDA'));
}
// Variables POST del formulario
$actionId = SP\Request::analyze('actionId', 0);
$itemId = SP\Request::analyze('itemId', 0);
$onCloseAction = SP\Request::analyze('onCloseAction');
$activeTab = SP\Request::analyze('activeTab', 0);
$customFields = SP\Request::analyze('customfield');
// Acción al cerrar la vista
$doActionOnClose = ($onCloseAction) ? "sysPassUtil.Common.doAction('$onCloseAction','',$activeTab);" : '';
$userLogin = UserUtil::getUserLoginById($itemId);
if ($actionId === \SP\Controller\ActionsInterface::ACTION_USR_USERS_NEW
|| $actionId === \SP\Controller\ActionsInterface::ACTION_USR_USERS_EDIT
|| $actionId === \SP\Controller\ActionsInterface::ACTION_USR_USERS_EDITPASS
|| $actionId === \SP\Controller\ActionsInterface::ACTION_USR_USERS_DELETE
) {
$isLdap = SP\Request::analyze('isLdap', 0);
$userPassR = SP\Request::analyzeEncrypted('passR');
$User = new SP\User();
$User->setUserId($itemId);
$User->setUserName(SP\Request::analyze('name'));
$User->setUserLogin(SP\Request::analyze('login'));
$User->setUserEmail(SP\Request::analyze('email'));
$User->setUserNotes(SP\Request::analyze('notes'));
$User->setUserGroupId(SP\Request::analyze('groupid', 0));
$User->setUserProfileId(SP\Request::analyze('profileid', 0));
$User->setUserIsAdminApp(SP\Request::analyze('adminapp', 0, false, 1));
$User->setUserIsAdminAcc(SP\Request::analyze('adminacc', 0, false, 1));
$User->setUserIsDisabled(SP\Request::analyze('disabled', 0, false, 1));
$User->setUserChangePass(SP\Request::analyze('changepass', 0, false, 1));
$User->setUserPass(SP\Request::analyzeEncrypted('pass'));
// Nuevo usuario o editar
if ($actionId === \SP\Controller\ActionsInterface::ACTION_USR_USERS_NEW
|| $actionId === \SP\Controller\ActionsInterface::ACTION_USR_USERS_EDIT
) {
if (!$User->getUserName() && !$isLdap) {
SP\Response::printJSON(_('Es necesario un nombre de usuario'), 2);
} elseif (!$User->getUserLogin() && !$isLdap) {
SP\Response::printJSON(_('Es necesario un login'), 2);
} elseif (!$User->getUserProfileId()) {
SP\Response::printJSON(_('Es necesario un perfil'), 2);
} elseif (!$User->getUserGroupId()) {
SP\Response::printJSON(_('Es necesario un grupo'), 2);
} elseif (!$User->getUserEmail() && !$isLdap) {
SP\Response::printJSON(_('Es necesario un email'), 2);
} elseif (SP\Util::demoIsEnabled() && !\SP\Session::getUserIsAdminApp() && $User->getUserLogin() == 'demo') {
SP\Response::printJSON(_('Ey, esto es una DEMO!!'));
}
switch ($User->checkUserExist()) {
case UserUtil::USER_LOGIN_EXIST:
SP\Response::printJSON(_('Login de usuario duplicado'), 2);
break;
case UserUtil::USER_MAIL_EXIST:
SP\Response::printJSON(_('Email de usuario duplicado'), 2);
break;
}
if ($actionId === \SP\Controller\ActionsInterface::ACTION_USR_USERS_NEW) {
if (!$User->getUserPass() || !$userPassR) {
SP\Response::printJSON(_('La clave no puede estar en blanco'), 2);
} elseif ($User->getUserPass() != $userPassR) {
SP\Response::printJSON(_('Las claves no coinciden'), 2);
}
if ($User->addUser()) {
if (is_array($customFields)) {
foreach ($customFields as $id => $value) {
$CustomFields = new \SP\CustomFields($id, $User->getUserId(), $value);
$CustomFields->addCustomField();
}
}
SP\Response::printJSON(_('Usuario creado'), 0, $doActionOnClose);
}
SP\Response::printJSON(_('Error al crear el usuario'));
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_USR_USERS_EDIT) {
if ($User->updateUser()) {
if (is_array($customFields)) {
foreach ($customFields as $id => $value) {
$CustomFields = new \SP\CustomFields($id, $User->getUserId(), $value);
$CustomFields->updateCustomField();
}
}
SP\Response::printJSON(_('Usuario actualizado'), 0, $doActionOnClose);
}
SP\Response::printJSON(_('Error al actualizar el usuario'));
}
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_USR_USERS_EDITPASS) {
if (SP\Util::demoIsEnabled() && UserUtil::getUserLoginById($itemId) == 'demo') {
SP\Response::printJSON(_('Ey, esto es una DEMO!!'));
} elseif (!$User->getUserPass() || !$userPassR) {
SP\Response::printJSON(_('La clave no puede estar en blanco'), 2);
} elseif ($User->getUserPass() != $userPassR) {
SP\Response::printJSON(_('Las claves no coinciden'), 2);
}
if ($User->updateUserPass()) {
SP\Response::printJSON(_('Clave actualizada'), 0);
}
SP\Response::printJSON(_('Error al modificar la clave'));
// Eliminar usuario
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_USR_USERS_DELETE) {
if (SP\Util::demoIsEnabled() && UserUtil::getUserLoginById($itemId) == 'demo') {
SP\Response::printJSON(_('Ey, esto es una DEMO!!'));
} elseif ($User->getUserId() == SP\Session::getUserId()) {
SP\Response::printJSON(_('No es posible eliminar, usuario en uso'));
}
if ($User->deleteUser() && SP\CustomFields::deleteCustomFieldForItem($User->getUserId(), \SP\Controller\ActionsInterface::ACTION_USR_USERS)) {
SP\Response::printJSON(_('Usuario eliminado'), 0, $doActionOnClose);
}
SP\Response::printJSON(_('Error al eliminar el usuario'));
}
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_USR_GROUPS_NEW
|| $actionId === \SP\Controller\ActionsInterface::ACTION_USR_GROUPS_EDIT
|| $actionId === \SP\Controller\ActionsInterface::ACTION_USR_GROUPS_DELETE
) {
// Variables POST del formulario
$frmGrpName = SP\Request::analyze('name');
$frmGrpDesc = SP\Request::analyze('description');
$frmGrpUsers = SP\Request::analyze('users');
if ($actionId === \SP\Controller\ActionsInterface::ACTION_USR_GROUPS_NEW
|| $actionId === \SP\Controller\ActionsInterface::ACTION_USR_GROUPS_EDIT
) {
if (!$frmGrpName) {
SP\Response::printJSON(_('Es necesario un nombre de grupo'), 2);
}
SP\Groups::$groupId = $itemId;
SP\Groups::$groupName = $frmGrpName;
SP\Groups::$groupDescription = $frmGrpDesc;
if (SP\Groups::checkGroupExist()) {
SP\Response::printJSON(_('Nombre de grupo duplicado'), 2);
}
if ($actionId === \SP\Controller\ActionsInterface::ACTION_USR_GROUPS_NEW) {
if (SP\Groups::addGroup($frmGrpUsers)) {
if (is_array($customFields)) {
foreach ($customFields as $id => $value) {
$CustomFields = new \SP\CustomFields($id, SP\Groups::$queryLastId, $value);
$CustomFields->addCustomField();
}
}
SP\Response::printJSON(_('Grupo creado'), 0, $doActionOnClose);
} else {
SP\Response::printJSON(_('Error al crear el grupo'));
}
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_USR_GROUPS_EDIT) {
if (SP\Groups::updateGroup($frmGrpUsers)) {
if (is_array($customFields)) {
foreach ($customFields as $id => $value) {
$CustomFields = new \SP\CustomFields($id, $itemId, $value);
$CustomFields->updateCustomField();
}
}
SP\Response::printJSON(_('Grupo actualizado'), 0, $doActionOnClose);
}
SP\Response::printJSON(_('Error al actualizar el grupo'));
}
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_USR_GROUPS_DELETE) {
SP\Groups::$groupId = $itemId;
$resGroupUse = SP\Groups::checkGroupInUse();
if ($resGroupUse['users'] > 0 || $resGroupUse['accounts'] > 0) {
if ($resGroupUse['users'] > 0) {
$uses[] = _('Usuarios') . " (" . $resGroupUse['users'] . ")";
}
if ($resGroupUse['accounts'] > 0) {
$uses[] = _('Cuentas') . " (" . $resGroupUse['accounts'] . ")";
}
SP\Response::printJSON(_('No es posible eliminar') . ';;' . _('Grupo en uso por:') . ';;' . implode(';;', $uses));
} else {
$groupName = SP\Groups::getGroupNameById($itemId);
if (SP\Groups::deleteGroup() && SP\CustomFields::deleteCustomFieldForItem($itemId, \SP\Controller\ActionsInterface::ACTION_USR_GROUPS)) {
SP\Response::printJSON(_('Grupo eliminado'), 0, $doActionOnClose);
}
SP\Response::printJSON(_('Error al eliminar el grupo'));
}
}
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_USR_PROFILES_NEW
|| $actionId === \SP\Controller\ActionsInterface::ACTION_USR_PROFILES_EDIT
|| $actionId === \SP\Controller\ActionsInterface::ACTION_USR_PROFILES_DELETE
) {
$Profile = new \SP\Profile();
// Variables POST del formulario
$name = SP\Request::analyze('profile_name');
$Profile->setName($name);
$Profile->setId(SP\Request::analyze('itemId', 0));
$Profile->setAccAdd(SP\Request::analyze('profile_accadd', 0, false, 1));
$Profile->setAccView(SP\Request::analyze('profile_accview', 0, false, 1));
$Profile->setAccViewPass(SP\Request::analyze('profile_accviewpass', 0, false, 1));
$Profile->setAccViewHistory(SP\Request::analyze('profile_accviewhistory', 0, false, 1));
$Profile->setAccEdit(SP\Request::analyze('profile_accedit', 0, false, 1));
$Profile->setAccEditPass(SP\Request::analyze('profile_acceditpass', 0, false, 1));
$Profile->setAccDelete(SP\Request::analyze('profile_accdel', 0, false, 1));
$Profile->setAccFiles(SP\Request::analyze('profile_accfiles', 0, false, 1));
$Profile->setConfigGeneral(SP\Request::analyze('profile_config', 0, false, 1));
$Profile->setConfigEncryption(SP\Request::analyze('profile_configmpw', 0, false, 1));
$Profile->setConfigBackup(SP\Request::analyze('profile_configback', 0, false, 1));
$Profile->setConfigImport(SP\Request::analyze('profile_configimport', 0, false, 1));
$Profile->setMgmCategories(SP\Request::analyze('profile_categories', 0, false, 1));
$Profile->setMgmCustomers(SP\Request::analyze('profile_customers', 0, false, 1));
$Profile->setMgmCustomFields(SP\Request::analyze('profile_customfields', 0, false, 1));
$Profile->setMgmUsers(SP\Request::analyze('profile_users', 0, false, 1));
$Profile->setMgmGroups(SP\Request::analyze('profile_groups', 0, false, 1));
$Profile->setMgmProfiles(SP\Request::analyze('profile_profiles', 0, false, 1));
$Profile->setMgmApiTokens(SP\Request::analyze('profile_apitokens', 0, false, 1));
$Profile->setEvl(SP\Request::analyze('profile_eventlog', 0, false, 1));
if ($actionId === \SP\Controller\ActionsInterface::ACTION_USR_PROFILES_NEW
|| $actionId === \SP\Controller\ActionsInterface::ACTION_USR_PROFILES_EDIT
) {
if (!$Profile->getName()) {
SP\Response::printJSON(_('Es necesario un nombre de perfil'), 2);
} elseif (SP\Profile::checkProfileExist($Profile->getId(), $Profile->getName())) {
SP\Response::printJSON(_('Nombre de perfil duplicado'), 2);
}
if ($actionId === \SP\Controller\ActionsInterface::ACTION_USR_PROFILES_NEW) {
if ($Profile->profileAdd()) {
SP\Response::printJSON(_('Perfil creado'), 0, $doActionOnClose);
}
SP\Response::printJSON(_('Error al crear el perfil'));
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_USR_PROFILES_EDIT) {
if ($Profile->profileUpdate()) {
SP\Response::printJSON(_('Perfil actualizado'), 0, $doActionOnClose);
}
SP\Response::printJSON(_('Error al actualizar el perfil'));
}
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_USR_PROFILES_DELETE) {
$resProfileUse = SP\Profile::checkProfileInUse($Profile->getId());
if ($resProfileUse['users'] > 0) {
$uses[] = _('Usuarios') . " (" . $resProfileUse['users'] . ")";
SP\Response::printJSON(_('No es posible eliminar') . ';;' . _('Perfil en uso por:') . ';;' . implode(';;', $uses));
} else {
if ($Profile->profileDelete()) {
SP\Response::printJSON(_('Perfil eliminado'), 0, $doActionOnClose);
}
SP\Response::printJSON(_('Error al eliminar el perfil'));
}
}
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMERS_NEW
|| $actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMERS_EDIT
|| $actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMERS_DELETE
) {
// Variables POST del formulario
$frmCustomerName = SP\Request::analyze('name');
$frmCustomerDesc = SP\Request::analyze('description');
if ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMERS_NEW
|| $actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMERS_EDIT
) {
if (!$frmCustomerName) {
SP\Response::printJSON(_('Es necesario un nombre de cliente'), 2);
}
SP\Customer::$customerName = $frmCustomerName;
SP\Customer::$customerDescription = $frmCustomerDesc;
if ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMERS_NEW) {
try {
SP\Customer::addCustomer($itemId);
if (is_array($customFields)) {
foreach ($customFields as $id => $value) {
$CustomFields = new \SP\CustomFields($id, SP\Customer::$customerLastId, $value);
$CustomFields->addCustomField();
}
}
} catch (\SP\SPException $e) {
SP\Response::printJSON($e->getMessage(), 2);
}
SP\Response::printJSON(_('Cliente creado'), 0, $doActionOnClose);
} else if ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMERS_EDIT) {
try {
SP\Customer::updateCustomer($itemId);
if (is_array($customFields)) {
foreach ($customFields as $id => $value) {
$CustomFields = new \SP\CustomFields($id, $itemId, $value);
$CustomFields->updateCustomField();
}
}
} catch (\SP\SPException $e) {
SP\Response::printJSON($e->getMessage(), 2);
}
SP\Response::printJSON(_('Cliente actualizado'), 0, $doActionOnClose);
}
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMERS_DELETE) {
try {
SP\Customer::deleteCustomer($itemId);
SP\CustomFields::deleteCustomFieldForItem($itemId, \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMERS);
} catch (\SP\SPException $e) {
SP\Response::printJSON($e->getMessage());
}
SP\Response::printJSON(_('Cliente eliminado'), 0, $doActionOnClose);
}
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CATEGORIES_NEW
|| $actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CATEGORIES_EDIT
|| $actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CATEGORIES_DELETE
) {
// Variables POST del formulario
$frmCategoryName = SP\Request::analyze('name');
$frmCategoryDesc = SP\Request::analyze('description');
if ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CATEGORIES_NEW
|| $actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CATEGORIES_EDIT
) {
if (!$frmCategoryName) {
SP\Response::printJSON(_('Es necesario un nombre de categoría'), 2);
}
SP\Category::$categoryName = $frmCategoryName;
SP\Category::$categoryDescription = $frmCategoryDesc;
if ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CATEGORIES_NEW) {
try {
SP\Category::addCategory();
if (is_array($customFields)) {
foreach ($customFields as $id => $value) {
$CustomFields = new \SP\CustomFields($id, SP\Category::$categoryLastId, $value);
$CustomFields->addCustomField();
}
}
} catch (\SP\SPException $e) {
SP\Response::printJSON($e->getMessage(), 2);
}
SP\Response::printJSON(_('Categoría creada'), 0, $doActionOnClose);
} else if ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CATEGORIES_EDIT) {
try {
SP\Category::updateCategory($itemId);
if (is_array($customFields)) {
foreach ($customFields as $id => $value) {
$CustomFields = new \SP\CustomFields($id, $itemId, $value);
$CustomFields->updateCustomField();
}
}
} catch (\SP\SPException $e) {
SP\Response::printJSON($e->getMessage(), 2);
}
SP\Response::printJSON(_('Categoría actualizada'), 0, $doActionOnClose);
}
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CATEGORIES_DELETE) {
try {
SP\Category::deleteCategory($itemId);
SP\CustomFields::deleteCustomFieldForItem($itemId, \SP\Controller\ActionsInterface::ACTION_MGM_CATEGORIES);
} catch (\SP\SPException $e) {
SP\Response::printJSON($e->getMessage());
}
SP\Response::printJSON(_('Categoría eliminada'), 0, $doActionOnClose);
}
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_APITOKENS_NEW
|| $actionId === \SP\Controller\ActionsInterface::ACTION_MGM_APITOKENS_EDIT
|| $actionId === \SP\Controller\ActionsInterface::ACTION_MGM_APITOKENS_DELETE
) {
$ApiTokens = new \SP\ApiTokens();
$ApiTokens->setTokenId($itemId);
$ApiTokens->setUserId(SP\Request::analyze('users', 0));
$ApiTokens->setActionId(SP\Request::analyze('actions', 0));
$ApiTokens->setRefreshToken(SP\Request::analyze('refreshtoken', false, false, true));
if ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_APITOKENS_NEW
|| $actionId === \SP\Controller\ActionsInterface::ACTION_MGM_APITOKENS_EDIT
) {
if ($ApiTokens->getUserId() === 0 || $ApiTokens->getActionId() === 0) {
SP\Response::printJSON(_('Usuario o acción no indicado'), 2);
}
if ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_APITOKENS_NEW) {
try {
$ApiTokens->addToken();
} catch (\SP\SPException $e) {
SP\Response::printJSON($e->getMessage(), 2);
}
SP\Response::printJSON(_('Autorización creada'), 0, $doActionOnClose);
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_APITOKENS_EDIT) {
try {
$ApiTokens->updateToken();
} catch (\SP\SPException $e) {
SP\Response::printJSON($e->getMessage(), 2);
}
SP\Response::printJSON(_('Autorización actualizada'), 0, $doActionOnClose);
}
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_APITOKENS_DELETE) {
try {
$ApiTokens->deleteToken();
} catch (\SP\SPException $e) {
SP\Response::printJSON($e->getMessage(), 2);
}
SP\Response::printJSON(_('Autorización eliminada'), 0, $doActionOnClose);
}
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMFIELDS_NEW
|| $actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMFIELDS_EDIT
|| $actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMFIELDS_DELETE
) {
// Variables POST del formulario
$frmFieldName = SP\Request::analyze('name');
$frmFieldType = SP\Request::analyze('type', 0);
$frmFieldModule = SP\Request::analyze('module', 0);
$frmFieldHelp = SP\Request::analyze('help');
$frmFieldRequired = SP\Request::analyze('required', false, false, true);
if ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMFIELDS_NEW
|| $actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMFIELDS_EDIT
) {
if (!$frmFieldName) {
SP\Response::printJSON(_('Nombre del campo no indicado'), 2);
} elseif ($frmFieldType === 0) {
SP\Response::printJSON(_('Tipo del campo no indicado'), 2);
} elseif ($frmFieldModule === 0) {
SP\Response::printJSON(_('Módulo del campo no indicado'), 2);
}
$CustomFieldDef = new \SP\CustomFieldDef($frmFieldName, $frmFieldType, $frmFieldModule);
$CustomFieldDef->setHelp($frmFieldHelp);
$CustomFieldDef->setRequired($frmFieldRequired);
if ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMFIELDS_NEW) {
try {
$CustomFieldDef->addCustomField();
} catch (\SP\SPException $e) {
SP\Response::printJSON($e->getMessage(), 2);
}
SP\Response::printJSON(_('Campo creado'), 0, $doActionOnClose);
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMFIELDS_EDIT) {
try {
$CustomFieldDef->setId($itemId);
$CustomFieldDef->updateCustomField();
} catch (\SP\SPException $e) {
SP\Response::printJSON($e->getMessage(), 2);
}
SP\Response::printJSON(_('Campo actualizado'), 0, $doActionOnClose);
}
} elseif ($actionId === \SP\Controller\ActionsInterface::ACTION_MGM_CUSTOMFIELDS_DELETE) {
try {
\SP\CustomFieldDef::deleteCustomField($itemId);
} catch (\SP\SPException $e) {
SP\Response::printJSON($e->getMessage(), 2);
}
SP\Response::printJSON(_('Campo eliminado'), 0, $doActionOnClose);
}
} else {
SP\Response::printJSON(_('Acción Inválida'));
}

View File

@@ -1,80 +0,0 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
*/
use SP\SessionUtil;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
SP\Request::checkReferer('POST');
if (!SP\Init::isLoggedIn()) {
SP\Response::printJSON(_('La sesión no se ha iniciado o ha caducado'), 10);
}
$sk = SP\Request::analyze('sk', false);
if (!$sk || !SessionUtil::checkSessionKey($sk)) {
SP\Response::printJSON(_('CONSULTA INVÁLIDA'));
}
$actionId = SP\Request::analyze('actionId', 0);
$onCloseAction = SP\Request::analyze('onCloseAction');
$activeTab = SP\Request::analyze('activeTab', 0);
$exportPassword = SP\Request::analyzeEncrypted('exportPwd');
$exportPasswordR = SP\Request::analyzeEncrypted('exportPwdR');
$doActionOnClose = "sysPassUtil.Common.doAction($actionId,'',$activeTab);";
if ($actionId === SP\Controller\ActionsInterface::ACTION_CFG_BACKUP) {
if (SP\Util::demoIsEnabled()) {
SP\Response::printJSON(_('Ey, esto es una DEMO!!'));
}
if (!SP\Backup::doBackup()) {
SP\Log::writeNewLogAndEmail(_('Realizar Backup'), _('Error al realizar el backup'));
SP\Response::printJSON(_('Error al realizar el backup') . ';;' . _('Revise el registro de eventos para más detalles'));
}
SP\Log::writeNewLogAndEmail(_('Realizar Backup'), _('Copia de la aplicación y base de datos realizada correctamente'));
SP\Response::printJSON(_('Proceso de backup finalizado'), 0, $doActionOnClose);
} elseif ($actionId === SP\Controller\ActionsInterface::ACTION_CFG_EXPORT) {
if (!empty($exportPassword) && $exportPassword !== $exportPasswordR){
SP\Response::printJSON(_('Las claves no coinciden'));
}
if(!\SP\XmlExport::doExport($exportPassword)){
SP\Log::writeNewLogAndEmail(_('Realizar Exportación'), _('Error al realizar la exportación de cuentas'));
SP\Response::printJSON(_('Error al realizar la exportación') . ';;' . _('Revise el registro de eventos para más detalles'));
}
SP\Log::writeNewLogAndEmail(_('Realizar Exportación'), _('Exportación de cuentas realizada correctamente'));
SP\Response::printJSON(_('Proceso de exportación finalizado'), 0, $doActionOnClose);
}

View File

@@ -2,9 +2,9 @@
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -19,12 +19,11 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\Request;
use SP\SessionUtil;
use SP\Controller\ChecksController;
use SP\Http\Request;
define('APP_ROOT', '..');
@@ -32,16 +31,5 @@ require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Bas
Request::checkReferer('POST');
if (!SP\Init::isLoggedIn()) {
SP\Util::logout();
}
$sk = SP\Request::analyze('sk', false);
if (!$sk || !SessionUtil::checkSessionKey($sk)) {
die('<div class="error round">' . _('CONSULTA INVÁLIDA') . '</div>');
}
$controller = new SP\Controller\SearchC();
$controller->getSearch();
$controller->view();
$Controller = new ChecksController();
$Controller->doAction();

View File

@@ -1,61 +0,0 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
*/
use SP\Request;
use SP\SessionUtil;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('POST');
if (!SP\Init::isLoggedIn()) {
SP\Response::printJSON(_('La sesión no se ha iniciado o ha caducado'), 10);
}
$sk = SP\Request::analyze('sk', false);
if (!$sk || !SessionUtil::checkSessionKey($sk)) {
SP\Response::printJSON(_('CONSULTA INVÁLIDA'));
}
$frmLdapServer = SP\Request::analyze('ldap_server');
$frmLdapBase = SP\Request::analyze('ldap_base');
$frmLdapGroup = SP\Request::analyze('ldap_group');
$frmLdapBindUser = SP\Request::analyze('ldap_binduser');
$frmLdapBindPass = SP\Request::analyzeEncrypted('ldap_bindpass');
if (!$frmLdapServer || !$frmLdapBase || !$frmLdapBindUser || !$frmLdapBindPass) {
SP\Response::printJSON(_('Los parámetros de LDAP no están configurados'));
}
$resCheckLdap = SP\Ldap::checkLDAPConn($frmLdapServer, $frmLdapBindUser, $frmLdapBindPass, $frmLdapBase, $frmLdapGroup);
if ($resCheckLdap === false) {
SP\Response::printJSON(_('Error de conexión a LDAP') . ';;' . _('Revise el registro de eventos para más detalles'));
} else {
SP\Response::printJSON(_('Conexión a LDAP correcta') . ';;' . _('Objetos encontrados') . ': ' . $resCheckLdap, 0);
}

View File

@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -19,17 +19,18 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\Controller\MainController;
use SP\Http\Request;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
SP\Request::checkReferer('GET');
Request::checkReferer('GET');
$controller = new \SP\Controller\MainC(null, null, false);
$controller->getCheckUpdates();
$controller->view();
$Controller = new MainController(null, null, false);
$Controller->getCheckUpdates();
$Controller->view();

View File

@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -19,323 +19,17 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\ConfigDB;
use SP\CryptMasterPass;
use SP\SessionUtil;
use SP\UserPass;
use SP\Controller\ConfigActionController;
use SP\Http\Request;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
SP\Request::checkReferer('POST');
Request::checkReferer('POST');
if (!SP\Init::isLoggedIn()) {
SP\Response::printJSON(_('La sesión no se ha iniciado o ha caducado'), 10);
}
$sk = SP\Request::analyze('sk', false);
if (!$sk || !SessionUtil::checkSessionKey($sk)) {
SP\Response::printJSON(_('CONSULTA INVÁLIDA'));
}
// Variables POST del formulario
$actionId = SP\Request::analyze('actionId', 0);
$activeTab = SP\Request::analyze('activeTab', 0);
$doActionOnClose = "sysPassUtil.Common.doAction($actionId,'',$activeTab);";
if ($actionId === SP\Controller\ActionsInterface::ACTION_CFG_GENERAL
|| $actionId === SP\Controller\ActionsInterface::ACTION_CFG_WIKI
|| $actionId === SP\Controller\ActionsInterface::ACTION_CFG_LDAP
|| $actionId === SP\Controller\ActionsInterface::ACTION_CFG_MAIL
) {
$Log = SP\Log::newLog(_('Modificar Configuración'));
if ($actionId === SP\Controller\ActionsInterface::ACTION_CFG_GENERAL) {
// General
$siteLang = SP\Request::analyze('sitelang');
$siteTheme = SP\Request::analyze('sitetheme', 'material-blue');
$sessionTimeout = SP\Request::analyze('session_timeout', 300);
$httpsEnabled = SP\Request::analyze('https_enabled', false, false, true);
$logEnabled = SP\Request::analyze('log_enabled', false, false, true);
$debugEnabled = SP\Request::analyze('debug', false, false, true);
$maintenanceEnabled = SP\Request::analyze('maintenance', false, false, true);
$checkUpdatesEnabled = SP\Request::analyze('updates', false, false, true);
$checkNoticesEnabled = SP\Request::analyze('notices', false, false, true);
if (!array_key_exists($siteTheme , \SP\Themes::getThemesAvailable())
|| (\SP\Util::demoIsEnabled() && $siteTheme !== 'material-blue')
) {
SP\Response::printJSON(_('CONSULTA INVÁLIDA'));
}
SP\Config::setCacheConfigValue('sitelang', $siteLang);
SP\Config::setCacheConfigValue('sitetheme', $siteTheme);
SP\Config::setCacheConfigValue('session_timeout', $sessionTimeout);
SP\Config::setCacheConfigValue('https_enabled', $httpsEnabled);
SP\Config::setCacheConfigValue('log_enabled', $logEnabled);
SP\Config::setCacheConfigValue('debug', $debugEnabled);
SP\Config::setCacheConfigValue('maintenance', $maintenanceEnabled);
SP\Config::setCacheConfigValue('checkupdates', $checkUpdatesEnabled);
SP\Config::setCacheConfigValue('checknotices', $checkNoticesEnabled);
// Accounts
$globalSearchEnabled = SP\Request::analyze('globalsearch', false, false, true);
$accountPassToImageEnabled = SP\Request::analyze('account_passtoimage', false, false, true);
$accountLinkEnabled = SP\Request::analyze('account_link', false, false, true);
$accountCount = SP\Request::analyze('account_count', 10);
$resultsAsCardsEnabled = SP\Request::analyze('resultsascards', false, false, true);
SP\Config::setCacheConfigValue('globalsearch', $globalSearchEnabled);
SP\Config::setCacheConfigValue('account_passtoimage', $accountPassToImageEnabled);
SP\Config::setCacheConfigValue('account_link', $accountLinkEnabled);
SP\Config::setCacheConfigValue('account_count', $accountCount);
SP\Config::setCacheConfigValue('resultsascards', $resultsAsCardsEnabled);
// Files
$filesEnabled = SP\Request::analyze('files_enabled', false, false, true);
$filesAllowedSize = SP\Request::analyze('files_allowed_size', 1024);
$filesAllowedExts = SP\Request::analyze('files_allowed_exts');
if ($filesEnabled && $filesAllowedSize >= 16384) {
SP\Response::printJSON(_('El tamaño máximo por archivo es de 16MB'));
}
if (!empty($filesAllowedExts)){
$exts = explode(',', $filesAllowedExts);
array_walk($exts, function(&$value) {
if (preg_match('/[^a-z0-9_-]+/i', $value)) {
SP\Response::printJSON(_('Extensión no permitida'));
}
});
}
SP\Config::setCacheConfigValue('files_enabled', $filesEnabled);
SP\Config::setCacheConfigValue('files_allowed_size', $filesAllowedSize);
SP\Config::setCacheConfigValue('files_allowed_exts', $filesAllowedExts);
// Proxy
$proxyEnabled = SP\Request::analyze('proxy_enabled', false, false, true);
$proxyServer = SP\Request::analyze('proxy_server');
$proxyPort = SP\Request::analyze('proxy_port', 0);
$proxyUser = SP\Request::analyze('proxy_user');
$proxyPass = SP\Request::analyzeEncrypted('proxy_pass');
// Valores para Proxy
if ($proxyEnabled && (!$proxyServer || !$proxyPort)) {
SP\Response::printJSON(_('Faltan parámetros de Proxy'));
} elseif ($proxyEnabled) {
SP\Config::setCacheConfigValue('proxy_enabled', true);
SP\Config::setCacheConfigValue('proxy_server', $proxyServer);
SP\Config::setCacheConfigValue('proxy_port', $proxyPort);
SP\Config::setCacheConfigValue('proxy_user', $proxyUser);
SP\Config::setCacheConfigValue('proxy_pass', $proxyPass);
$Log->addDescription(_('Proxy habiltado'));
} else {
SP\Config::setCacheConfigValue('proxy_enabled', false);
$Log->addDescription(_('Proxy deshabilitado'));
}
$Log->addDescription(sprintf('%s: %s', _('Sección'), _('General')));
} elseif ($actionId === SP\Controller\ActionsInterface::ACTION_CFG_WIKI) {
// Wiki
$wikiEnabled = SP\Request::analyze('wiki_enabled', false, false, true);
$wikiSearchUrl = SP\Request::analyze('wiki_searchurl');
$wikiPageUrl = SP\Request::analyze('wiki_pageurl');
$wikiFilter = SP\Request::analyze('wiki_filter');
// Valores para la conexión a la Wiki
if ($wikiEnabled && (!$wikiSearchUrl || !$wikiPageUrl || !$wikiFilter)) {
SP\Response::printJSON(_('Faltan parámetros de Wiki'));
} elseif ($wikiEnabled) {
SP\Config::setCacheConfigValue('wiki_enabled', true);
SP\Config::setCacheConfigValue('wiki_searchurl', $wikiSearchUrl);
SP\Config::setCacheConfigValue('wiki_pageurl', $wikiPageUrl);
SP\Config::setCacheConfigValue('wiki_filter', $wikiFilter);
$Log->addDescription(_('Wiki habiltada'));
} else {
SP\Config::setCacheConfigValue('wiki_enabled', false);
$Log->addDescription(_('Wiki deshabilitada'));
}
$Log->addDescription(sprintf('%s: %s', _('Sección'), _('Wiki')));
} elseif ($actionId === SP\Controller\ActionsInterface::ACTION_CFG_LDAP) {
// LDAP
$ldapEnabled = SP\Request::analyze('ldap_enabled', false, false, true);
$ldapADSEnabled = SP\Request::analyze('ldap_ads', false, false, true);
$ldapServer = SP\Request::analyze('ldap_server');
$ldapBase = SP\Request::analyze('ldap_base');
$ldapGroup = SP\Request::analyze('ldap_group');
$ldapDefaultGroup = SP\Request::analyze('ldap_defaultgroup', 0);
$ldapDefaultProfile = SP\Request::analyze('ldap_defaultprofile', 0);
$ldapBindUser = SP\Request::analyze('ldap_binduser');
$ldapBindPass = SP\Request::analyzeEncrypted('ldap_bindpass');
// Valores para la configuración de LDAP
if ($ldapEnabled && (!$ldapServer || !$ldapBase || !$ldapBindUser)) {
SP\Response::printJSON(_('Faltan parámetros de LDAP'));
} elseif ($ldapEnabled) {
SP\Config::setCacheConfigValue('ldap_enabled', true);
SP\Config::setCacheConfigValue('ldap_ads', $ldapADSEnabled);
SP\Config::setCacheConfigValue('ldap_server', $ldapServer);
SP\Config::setCacheConfigValue('ldap_base', $ldapBase);
SP\Config::setCacheConfigValue('ldap_group', $ldapGroup);
SP\Config::setCacheConfigValue('ldap_defaultgroup', $ldapDefaultGroup);
SP\Config::setCacheConfigValue('ldap_defaultprofile', $ldapDefaultProfile);
SP\Config::setCacheConfigValue('ldap_binduser', $ldapBindUser);
SP\Config::setCacheConfigValue('ldap_bindpass', $ldapBindPass);
$Log->addDescription(_('LDAP habiltado'));
} else {
SP\Config::setCacheConfigValue('ldap_enabled', false);
$Log->addDescription(_('LDAP deshabilitado'));
}
$Log->addDescription(sprintf('%s: %s', _('Sección'), _('LDAP')));
} elseif ($actionId === SP\Controller\ActionsInterface::ACTION_CFG_MAIL) {
// Mail
$mailEnabled = SP\Request::analyze('mail_enabled', false, false, true);
$mailServer = SP\Request::analyze('mail_server');
$mailPort = SP\Request::analyze('mail_port', 25);
$mailUser = SP\Request::analyze('mail_user');
$mailPass = SP\Request::analyzeEncrypted('mail_pass');
$mailSecurity = SP\Request::analyze('mail_security');
$mailFrom = SP\Request::analyze('mail_from');
$mailRequests = SP\Request::analyze('mail_requestsenabled', false, false, true);
$mailAuth = SP\Request::analyze('mail_authenabled', false, false, true);
// Valores para la configuración del Correo
if ($mailEnabled && (!$mailServer || !$mailFrom)) {
SP\Response::printJSON(_('Faltan parámetros de Correo'));
} elseif ($mailEnabled) {
SP\Config::setCacheConfigValue('mail_enabled', true);
SP\Config::setCacheConfigValue('mail_requestsenabled', $mailRequests);
SP\Config::setCacheConfigValue('mail_server', $mailServer);
SP\Config::setCacheConfigValue('mail_port', $mailPort);
SP\Config::setCacheConfigValue('mail_security', $mailSecurity);
SP\Config::setCacheConfigValue('mail_from', $mailFrom);
if ($mailAuth) {
SP\Config::setCacheConfigValue('mail_authenabled', $mailAuth);
SP\Config::setCacheConfigValue('mail_user', $mailUser);
SP\Config::setCacheConfigValue('mail_pass', $mailPass);
}
$Log->addDescription(_('Correo habiltado'));
} else {
SP\Config::setCacheConfigValue('mail_enabled', false);
SP\Config::setCacheConfigValue('mail_requestsenabled', false);
SP\Config::setCacheConfigValue('mail_authenabled', false);
$Log->addDescription(_('Correo deshabilitado'));
}
$Log->addDescription(sprintf('%s: %s', _('Sección'), _('Correo')));
}
try {
SP\Config::writeConfig();
} catch (\SP\SPException $e){
$Log->addDescription($e->getMessage());
$Log->addDescription($e->getHint());
$Log->writeLog();
SP\Response::printJSON($e->getMessage());
}
$Log->writeLog();
SP\Email::sendEmail($Log);
if ($actionId === SP\Controller\ActionsInterface::ACTION_CFG_GENERAL) {
// Recargar la aplicación completa para establecer nuevos valores
SP\Util::reload();
}
SP\Response::printJSON(_('Configuración actualizada'), 0, $doActionOnClose);
} elseif ($actionId === SP\Controller\ActionsInterface::ACTION_CFG_ENCRYPTION) {
$currentMasterPass = SP\Request::analyzeEncrypted('curMasterPwd');
$newMasterPass = SP\Request::analyzeEncrypted('newMasterPwd');
$newMasterPassR = SP\Request::analyzeEncrypted('newMasterPwdR');
$confirmPassChange = SP\Request::analyze('confirmPassChange', 0, false, 1);
$noAccountPassChange = SP\Request::analyze('chkNoAccountChange', 0, false, 1);
if (!UserPass::checkUserUpdateMPass()) {
SP\Response::printJSON(_('Clave maestra actualizada') . ';;' . _('Reinicie la sesión para cambiarla'));
} elseif ($newMasterPass == '' && $currentMasterPass == '') {
SP\Response::printJSON(_('Clave maestra no indicada'));
} elseif ($confirmPassChange == 0) {
SP\Response::printJSON(_('Se ha de confirmar el cambio de clave'));
}
if ($newMasterPass == $currentMasterPass) {
SP\Response::printJSON(_('Las claves son idénticas'));
} elseif ($newMasterPass != $newMasterPassR) {
SP\Response::printJSON(_('Las claves maestras no coinciden'));
} elseif (!SP\Crypt::checkHashPass($currentMasterPass, ConfigDB::getValue('masterPwd'), true)) {
SP\Response::printJSON(_('La clave maestra actual no coincide'));
}
$hashMPass = SP\Crypt::mkHashPassword($newMasterPass);
if (!$noAccountPassChange) {
$Account = new SP\Account();
if (!$Account->updateAccountsMasterPass($currentMasterPass, $newMasterPass)) {
SP\Response::printJSON(_('Errores al actualizar las claves de las cuentas'));
}
$AccountHistory = new SP\AccountHistory();
if (!$AccountHistory->updateAccountsMasterPass($currentMasterPass, $newMasterPass, $hashMPass)) {
SP\Response::printJSON(_('Errores al actualizar las claves de las cuentas del histórico'));
}
if (!\SP\CustomFields::updateCustomFieldsCrypt($currentMasterPass, $newMasterPass)) {
SP\Response::printJSON(_('Errores al actualizar datos de campos personalizados'));
}
}
if (SP\Util::demoIsEnabled()) {
SP\Response::printJSON(_('Ey, esto es una DEMO!!'));
}
// ConfigDB::readConfig();
ConfigDB::setCacheConfigValue('masterPwd', $hashMPass);
ConfigDB::setCacheConfigValue('lastupdatempass', time());
if (ConfigDB::writeConfig()) {
SP\Log::writeNewLogAndEmail(_('Actualizar Clave Maestra'));
SP\Response::printJSON(_('Clave maestra actualizada'), 0);
} else {
SP\Response::printJSON(_('Error al guardar el hash de la clave maestra'));
}
} elseif ($actionId === SP\Controller\ActionsInterface::ACTION_CFG_ENCRYPTION_TEMPPASS) {
$tempMasterMaxTime = SP\Request::analyze('tmpass_maxtime', 3600);
$tempMasterPass = CryptMasterPass::setTempMasterPass($tempMasterMaxTime);
if ($tempMasterPass !== false && !empty($tempMasterPass)) {
SP\Email::sendEmail(new \SP\Log(_('Generar Clave Temporal'), SP\Html::strongText(_('Clave') . ': ') . $tempMasterPass));
SP\Response::printJSON(_('Clave Temporal Generada'), 0, $doActionOnClose);
} else {
SP\Response::printJSON(_('Error al generar clave temporal'));
}
} else {
SP\Response::printJSON(_('Acción Inválida'));
}
$Controller = new ConfigActionController();
$Controller->doAction();

View File

@@ -2,9 +2,9 @@
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -19,202 +19,21 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\Auth;
use SP\CryptMasterPass;
use SP\Request;
use SP\SessionUtil;
use SP\UserLdap;
use SP\UserPass;
use SP\UserPassRecover;
use SP\UserUtil;
use SP\Controller\LoginController;
use SP\Http\Request;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('POST');
Request::checkReferer('GET');
if (!SP\Request::analyze('login', false)) {
if (!Request::analyze('login', false)) {
return;
}
$userLogin = SP\Request::analyze('user');
$userPass = SP\Request::analyzeEncrypted('pass');
$masterPass = SP\Request::analyzeEncrypted('mpass');
if (!$userLogin || !$userPass) {
SP\Response::printJSON(_('Usuario/Clave no introducidos'));
}
$User = new SP\User();
$User->setUserLogin($userLogin);
$User->setUserPass($userPass);
if ($resLdap = SP\Auth::authUserLDAP($userLogin, $userPass)) {
$User->setUserName(SP\Auth::$userName);
$User->setUserEmail(SP\Auth::$userEmail);
}
$Log = new \SP\Log(_('Inicio sesión'));
// Autentificamos por LDAP
if ($resLdap === true) {
$Log->addDescription('(LDAP)');
$Log->addDescription(sprintf('%s: %s', _('Servidor Login'), \SP\Ldap::getLdapServer()));
// Verificamos si el usuario existe en la BBDD
if (!UserLdap::checkLDAPUserInDB($userLogin)) {
// Creamos el usuario de LDAP en MySQL
if (!\SP\UserLdap::newUserLDAP($User)) {
$Log->addDescription(_('Error al guardar los datos de LDAP'));
$Log->writeLog();
SP\Response::printJSON(_('Error interno'));
}
} else {
// Actualizamos la clave del usuario en MySQL
if (!UserLdap::updateLDAPUserInDB($User)) {
$Log->addDescription(_('Error al actualizar la clave del usuario en la BBDD'));
$Log->writeLog();
SP\Response::printJSON(_('Error interno'));
}
}
} else if ($resLdap == 49) {
$Log->addDescription('(LDAP)');
$Log->addDescription(_('Login incorrecto'));
$Log->addDescription(sprintf('%s: %s', _('Usuario'), $userLogin));
$Log->writeLog();
SP\Response::printJSON(_('Usuario/Clave incorrectos'));
} else if ($resLdap === 701) {
$Log->addDescription('(LDAP)');
$Log->addDescription(_('Cuenta expirada'));
$Log->addDescription(sprintf('%s: %s', _('Usuario'), $userLogin));
$Log->writeLog();
SP\Response::printJSON(_('Cuenta expirada'));
} else if ($resLdap === 702) {
$Log->addDescription('(LDAP)');
$Log->addDescription(_('El usuario no tiene grupos asociados'));
$Log->addDescription(sprintf('%s: %s', _('Usuario'), $userLogin));
$Log->writeLog();
SP\Response::printJSON(_('Usuario/Clave incorrectos'));
} else { // Autentificamos por MySQL (ha fallado LDAP)
$Log->resetDescription();
$Log->addDescription('(MySQL)');
// Autentificamos con la BBDD
if (!SP\Auth::authUserMySQL($userLogin, $userPass)) {
$Log->addDescription(_('Login incorrecto'));
$Log->addDescription(sprintf('%s: %s', _('Usuario'), $userLogin));
$Log->writeLog();
SP\Response::printJSON(_('Usuario/Clave incorrectos'));
}
}
// Comprobar si concide el login con la autentificación del servidor web
if (!Auth::checkServerAuthUser($userLogin)){
$Log->addDescription(_('Login incorrecto'));
$Log->addDescription(sprintf('%s: %s', _('Usuario'), $userLogin));
$Log->addDescription(sprintf('%s: %s (%s)', _('Autentificación'), Auth::getServerAuthType(), Auth::getServerAuthUser()));
$Log->writeLog();
SP\Response::printJSON(_('Usuario/Clave incorrectos'));
}
// Comprobar si el usuario está deshabilitado
if (UserUtil::checkUserIsDisabled($userLogin)) {
$Log->addDescription(_('Usuario deshabilitado'));
$Log->addDescription(sprintf('%s: %s', _('Usuario'), $userLogin));
$Log->writeLog();
SP\Response::printJSON(_('Usuario deshabilitado'));
}
// Obtenemos los datos del usuario
if (!$User->getUserInfo()) {
$Log->addDescription(_('Error al obtener los datos del usuario de la BBDD'));
$Log->writeLog();
SP\Response::printJSON(_('Error interno'));
}
// Comprobamos que la clave maestra del usuario es correcta y está actualizada
if (empty($masterPass)
&& (!UserPass::checkUserMPass($User) || !UserPass::checkUserUpdateMPass($userLogin))
) {
SP\Response::printJSON(_('La clave maestra no ha sido guardada o es incorrecta'), 3);
} elseif ($masterPass) {
if (CryptMasterPass::checkTempMasterPass($masterPass)) {
$masterPass = CryptMasterPass::getTempMasterPass($masterPass);
}
if (!$User->updateUserMPass($masterPass)) {
$Log->addDescription(_('Clave maestra incorrecta'));
$Log->writeLog();
SP\Response::printJSON(_('Clave maestra incorrecta'), 4);
}
}
// Comprobar si se ha forzado un cambio de clave
if ($User->isUserChangePass()) {
$hash = SP\Util::generate_random_bytes();
if (UserPassRecover::addPassRecover($userLogin, $hash)) {
$url = SP\Init::$WEBURI . '/index.php?a=passreset&h=' . $hash . '&t=' . time() . '&f=1';
SP\Response::printJSON($url, 0);
}
}
// Obtenemos la clave maestra del usuario
if ($User->getUserMPass()) {
// Actualizar el último login del usuario
UserUtil::setUserLastLogin($User->getUserId());
// Cargar las variables de sesión del usuario
SessionUtil::loadUserSession($User);
$Log->addDescription(sprintf('%s: %s', _('Usuario'), $userLogin));
$Log->addDescription(sprintf('%s: %s', _('Perfil'), SP\Profile::getProfileNameById($User->getUserProfileId())));
$Log->addDescription(sprintf('%s: %s', _('Grupo'), SP\Groups::getGroupNameById($User->getUserGroupId())));
$Log->writeLog();
} else {
SP\Response::printJSON(_('Error interno'));
}
$UserPrefs = \SP\UserPreferences::getPreferences($User->getUserId());
SP\Language::setLanguage(true);
SP\Themes::setTheme(true);
SP\Session::setUserPreferences($UserPrefs);
if ($UserPrefs->isUse2Fa()) {
SP\Session::set2FApassed(false);
$url = SP\Init::$WEBURI . '/index.php?a=2fa&i=' . $User->getUserId() . '&t=' . time() . '&f=1';
SP\Response::printJSON($url, 0);
} else {
SP\Session::set2FApassed(true);
}
$params = array();
// Comprobar si existen parámetros adicionales en URL via POST para pasarlos por GET
foreach ($_POST as $param => $value) {
\SP\Html::sanitize($param);
\SP\Html::sanitize($value);
if (!strncmp($param, 'g_', 2)) {
$params[] = substr($param, 2) . '=' . $value;
}
}
$urlParams = (count($params) > 0) ? '?' . implode('&', $params) : '';
SP\Response::printJSON('index.php' . $urlParams, 0);
$Controller = new LoginController();
$Controller->doLogin();

View File

@@ -2,9 +2,9 @@
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -19,31 +19,23 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\Request;
use SP\Controller\EventlogController;
use SP\Core\Init;
use SP\Http\Request;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('POST');
Request::checkReferer('GET');
if (!SP\Init::isLoggedIn()) {
SP\Util::logout();
if (!Init::isLoggedIn()) {
\SP\Util\Util::logout();
}
$start = SP\Request::analyze('start', 0);
$clear = SP\Request::analyze('clear', 0);
$sk = SP\Request::analyze('sk', false);
$tpl = new SP\Template();
$tpl->assign('limitStart', $start);
$tpl->assign('clear', $clear);
$tpl->assign('sk', $sk);
$controller = new SP\Controller\EventlogC($tpl);
$controller->checkClear();
$controller->getEventlog();
echo $tpl->render();
$Controller = new EventlogController();
$Controller->doAction();
$Controller->view();

View File

@@ -1,214 +0,0 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
*/
use SP\Request;
use SP\SessionUtil;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('POST');
if (!SP\Init::isLoggedIn()) {
SP\Util::logout();
}
$sk = SP\Request::analyze('sk', false);
if (!$sk || !SessionUtil::checkSessionKey($sk)) {
die(_('CONSULTA INVÁLIDA'));
}
if (!SP\Util::fileIsEnabled()) {
exit(_('Gestión de archivos deshabilitada'));
}
$action = SP\Request::analyze('action');
$accountId = SP\Request::analyze('accountId', 0);
$fileId = SP\Request::analyze('fileId', 0);
$log = new \SP\Log();
if ($action == 'upload') {
if (!is_array($_FILES["inFile"]) || $accountId === 0) {
\SP\Response::printJSON(_('CONSULTA INVÁLIDA'));
}
$log->setAction(_('Subir Archivo'));
$allowedExts = strtoupper(SP\Config::getValue('files_allowed_exts'));
$allowedSize = SP\Config::getValue('files_allowed_size');
if ($allowedExts) {
// Extensiones aceptadas
$extsOk = explode(",", $allowedExts);
} else {
$log->addDescription(_('No hay extensiones permitidas'));
$log->writeLog();
\SP\Response::printJSON($log->getDescription());
}
if (is_array($_FILES) && $_FILES['inFile']['name']) {
// Comprobamos la extensión del archivo
$fileData['extension'] = strtoupper(pathinfo($_FILES['inFile']['name'], PATHINFO_EXTENSION));
if (!in_array($fileData['extension'], $extsOk)) {
$log->addDescription(_('Tipo de archivo no soportado') . " '" . $fileData['extension'] . "' ");
$log->writeLog();
\SP\Response::printJSON($log->getDescription());
}
} else {
$log->addDescription(_('Archivo inválido') . ":<br>" . $_FILES['inFile']['name']);
$log->writeLog();
\SP\Response::printJSON($log->getDescription());
}
// Variables con información del archivo
$fileData['name'] = SP\Html::sanitize($_FILES['inFile']['name']);
$tmpName = SP\Html::sanitize($_FILES['inFile']['tmp_name']);
$fileData['size'] = $_FILES['inFile']['size'];
$fileData['type'] = $_FILES['inFile']['type'];
if (!file_exists($tmpName)) {
// Registramos el máximo tamaño permitido por PHP
SP\Util::getMaxUpload();
$log->addDescription(_('Error interno al leer el archivo'));
$log->writeLog();
\SP\Response::printJSON($log->getDescription());
}
if ($fileData['size'] > ($allowedSize * 1000)) {
$log->addDescription(_('El archivo es mayor de ') . " " . round(($allowedSize / 1000), 1) . "MB");
$log->writeLog();
\SP\Response::printJSON($log->getDescription());
}
// Leemos el archivo a una variable
$fileData['content'] = file_get_contents($tmpName);
if ($fileData['content'] === false) {
$log->addDescription(_('Error interno al leer el archivo'));
$log->writeLog();
\SP\Response::printJSON($log->getDescription());
}
if (SP\Files::fileUpload($accountId, $fileData)) {
$log->addDescription(_('Archivo guardado'));
$log->writeLog();
\SP\Response::printJSON($log->getDescription(), 0);
} else {
$log->addDescription(_('No se pudo guardar el archivo'));
$log->writeLog();
\SP\Response::printJSON($log->getDescription());
}
}
if ($action == 'download' || $action == 'view') {
// Verificamos que el ID sea numérico
if (!is_numeric($fileId) || $fileId === 0) {
exit(_('No es un ID de archivo válido'));
}
$isView = ($action == 'view') ? true : false;
$file = SP\Files::fileDownload($fileId);
if (!$file) {
exit(_('El archivo no existe'));
}
$fileSize = $file->accfile_size;
$fileType = $file->accfile_type;
$fileName = $file->accfile_name;
$fileExt = $file->accfile_extension;
$fileData = $file->accfile_content;
$log->setAction(_('Descargar Archivo'));
$log->addDescription(_('ID') . ": " . $fileId);
$log->addDescription(_('Archivo') . ": " . $fileName);
$log->addDescription(_('Tipo') . ": " . $fileType);
$log->addDescription(_('Tamaño') . ": " . round($fileSize / 1024, 2) . " KB");
if (!$isView) {
$log->writeLog();
// Enviamos el archivo al navegador
header('Set-Cookie: fileDownload=true; path=/');
header('Cache-Control: max-age=60, must-revalidate');
header("Content-length: $fileSize");
header("Content-type: $fileType");
header("Content-Disposition: attachment; filename=\"$fileName\"");
header("Content-Description: PHP Generated Data");
header("Content-transfer-encoding: binary");
exit($fileData);
} else {
$extsOkImg = array("JPG", "GIF", "PNG");
if (in_array(strtoupper($fileExt), $extsOkImg)) {
$log->writeLog();
$imgData = chunk_split(base64_encode($fileData));
exit('<img src="data:' . $fileType . ';base64, ' . $imgData . '" border="0" />');
// } elseif ( strtoupper($fileExt) == "PDF" ){
// echo '<object data="data:application/pdf;base64, '.base64_encode($fileData).'" type="application/pdf"></object>';
} elseif (strtoupper($fileExt) == "TXT") {
$log->writeLog();
exit('<div id="fancyView" class="backGrey"><pre>' . htmlentities($fileData) . '</pre></div>');
} else {
exit();
}
}
}
if ($action == "delete") {
// Verificamos que el ID sea numérico
if (!is_numeric($fileId) || $fileId === 0) {
exit(_('No es un ID de archivo válido'));
}
if (SP\Files::fileDelete($fileId)) {
$log->addDescription(_('Archivo eliminado'));
$log->writeLog();
exit($log->getDescription());
} else {
$log->addDescription(_('Error al eliminar el archivo'));
$log->writeLog();
exit($log->getDescription());
}
}

210
ajax/ajax_filesMgmt.php Normal file
View File

@@ -0,0 +1,210 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\Account\AccountUtil;
use SP\Config\Config;
use SP\Core\ActionsInterface;
use SP\Core\Exceptions\SPException;
use SP\Core\Init;
use SP\Core\SessionUtil;
use SP\DataModel\FileData;
use SP\Html\Html;
use SP\Http\Request;
use SP\Http\Response;
use SP\Log\Log;
use SP\Mgmt\Files\File;
use SP\Mgmt\Files\FileUtil;
use SP\Util\Checks;
use SP\Util\Util;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('POST');
if (!Init::isLoggedIn()) {
Util::logout();
}
$sk = Request::analyze('sk', false);
if (!$sk || !SessionUtil::checkSessionKey($sk)) {
Response::printJson(__('CONSULTA INVÁLIDA'));
}
if (!Checks::fileIsEnabled()) {
Response::printJson(__('Gestión de archivos deshabilitada'));
}
$actionId = Request::analyze('actionId', 0);
$accountId = Request::analyze('itemId', 0);
$fileId = Request::analyze('fileId', 0);
$Log = new Log();
$LogMessage = $Log->getLogMessage();
if ($actionId === ActionsInterface::ACTION_ACC_FILES_UPLOAD) {
if ($accountId === 0 || !is_array($_FILES['inFile'])) {
Response::printJson(__('CONSULTA INVÁLIDA'));
}
$LogMessage->setAction(__('Subir Archivo', false));
$allowedExts = Config::getConfig()->getFilesAllowedExts();
$allowedSize = Config::getConfig()->getFilesAllowedSize();
if (count($allowedExts) === 0) {
$LogMessage->addDescription(__('No hay extensiones permitidas', false));
$Log->writeLog();
Response::printJson($LogMessage->getDescription());
}
$FileData = new FileData();
$FileData->setAccfileAccountId($accountId);
$FileData->setAccfileName(Html::sanitize($_FILES['inFile']['name']));
$FileData->setAccfileSize($_FILES['inFile']['size']);
$FileData->setAccfileType($_FILES['inFile']['type']);
if ($FileData->getAccfileName() !== '') {
// Comprobamos la extensión del archivo
$FileData->setAccfileExtension(strtoupper(pathinfo($FileData->getAccfileName(), PATHINFO_EXTENSION)));
if (!in_array($FileData->getAccfileExtension(), $allowedExts)) {
$LogMessage->addDescription(__('Tipo de archivo no soportado', false));
$LogMessage->addDetails(__('Extensión', false), $FileData->getAccfileExtension());
$Log->writeLog();
Response::printJson($LogMessage->getDescription());
}
} else {
$LogMessage->addDescription(__('Archivo inválido', false));
$LogMessage->addDetails(__('Archivo', false), $FileData->getAccfileName());
$Log->writeLog();
Response::printJson($LogMessage->getDescription());
}
// Variables con información del archivo
$tmpName = Html::sanitize($_FILES['inFile']['tmp_name']);
if (!file_exists($tmpName)) {
// Registramos el máximo tamaño permitido por PHP
Util::getMaxUpload();
$LogMessage->addDescription(__('Error interno al leer el archivo', false));
$Log->writeLog();
Response::printJson($LogMessage->getDescription());
}
if ($FileData->getAccfileSize() > ($allowedSize * 1000)) {
$LogMessage->addDescription(__('Tamaño de archivo superado', false));
$LogMessage->addDetails(__('Tamaño', false), $FileData->getRoundSize() . 'KB');
$Log->writeLog();
Response::printJson($LogMessage->getDescription());
}
// Leemos el archivo a una variable
$FileData->setAccfileContent(file_get_contents($tmpName));
if ($FileData->getAccfileContent() === false) {
$LogMessage->addDescription(__('Error interno al leer el archivo', false));
$Log->writeLog();
Response::printJson($LogMessage->getDescription());
}
try {
File::getItem($FileData)->add();
Response::printJson(__('Archivo guardado'), 0);
} catch (SPException $e) {
Response::printJson(__('No se pudo guardar el archivo'));
}
} elseif ($actionId === ActionsInterface::ACTION_ACC_FILES_DOWNLOAD
|| $actionId === ActionsInterface::ACTION_ACC_FILES_VIEW
|| $actionId === ActionsInterface::ACTION_MGM_FILES_VIEW
) {
// Verificamos que el ID sea numérico
if (!is_numeric($fileId) || $fileId === 0) {
Response::printJson(__('No es un ID de archivo válido'));
}
$FileData = File::getItem()->getById($fileId);
if (!$FileData) {
Response::printJson(__('El archivo no existe'));
}
$LogMessage->setAction(__('Descargar Archivo', false));
$LogMessage->addDetails(__('ID', false), $fileId);
$LogMessage->addDetails(__('Cuenta', false), AccountUtil::getAccountNameById($FileData->getAccfileAccountId()));
$LogMessage->addDetails(__('Archivo', false), $FileData->getAccfileName());
$LogMessage->addDetails(__('Tipo', false), $FileData->getAccfileType());
$LogMessage->addDetails(__('Tamaño', false), $FileData->getRoundSize() . 'KB');
$Log->writeLog();
if ($actionId === ActionsInterface::ACTION_ACC_FILES_DOWNLOAD) {
// Enviamos el archivo al navegador
header('Set-Cookie: fileDownload=true; path=/');
header('Cache-Control: max-age=60, must-revalidate');
header('Content-length: ' . $FileData->getAccfileSize());
header('Content-type: ' . $FileData->getAccfileType());
header('Content-Disposition: attachment; filename="' . $FileData->getAccfileName() . '"');
header('Content-Description: PHP Generated Data');
header('Content-transfer-encoding: binary');
exit($FileData->getAccfileContent());
} else {
// FIXME: Usar JSON en respuestas
if (FileUtil::isImage($FileData)) {
$imgData = chunk_split(base64_encode($FileData->getAccfileContent()));
exit('<img src="data:' . $FileData->getAccfileType() . ';base64, ' . $imgData . '" border="0" /><div class="title">' . $FileData->getAccfileName() . '</div>');
// } elseif ( strtoupper($fileExt) == "PDF" ){
// echo '<object data="data:application/pdf;base64, '.base64_encode($fileData).'" type="application/pdf"></object>';
} elseif (strtoupper($FileData->getAccfileExtension()) === 'TXT') {
exit('<pre>' . htmlentities($FileData->getAccfileContent()) . '</pre>');
} else {
exit();
}
}
} elseif ($actionId === ActionsInterface::ACTION_ACC_FILES_DELETE) {
// Verificamos que el ID sea numérico
if (!is_numeric($fileId) || $fileId === 0) {
Response::printJson(__('No es un ID de archivo válido'));
}
try {
File::getItem()->delete($fileId);
Response::printJson(__('Archivo eliminado'), 0);
} catch (SPException $e) {
Response::printJson(__('Error al eliminar el archivo'));
}
} else {
Response::printJson(__('Acción Inválida'));
}

View File

@@ -2,9 +2,9 @@
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -19,165 +19,124 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\Request;
use SP\Themes;
use SP\Config\Config;
use SP\Controller\AccountController;
use SP\Controller\AccountSearchController;
use SP\Controller\ConfigController;
use SP\Controller\EventlogController;
use SP\Controller\ItemListController;
use SP\Controller\NoticesController;
use SP\Controller\UserPreferencesController;
use SP\Core\ActionsInterface;
use SP\Core\DiFactory;
use SP\Core\Init;
use SP\Core\Session;
use SP\Core\Template;
use SP\Http\Request;
use SP\Http\Response;
use SP\Util\Util;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('POST');
Request::checkReferer('GET');
if (!SP\Init::isLoggedIn()) {
SP\Util::logout();
if (!Init::isLoggedIn()) {
Util::logout();
}
SP\Util::checkReload();
Util::checkReload();
if (!SP\Request::analyze('actionId', 0, true)) {
die('<div class="error">' . _('Parámetros incorrectos') . '</DIV>');
if (!Request::analyze('actionId', 0, true)) {
Response::printHtmlError(__('Parámetros incorrectos'));
}
$actionId = SP\Request::analyze('actionId');
$itemId = SP\Request::analyze('itemId', 0);
$lastAction = SP\Request::analyze('lastAction', \SP\Controller\ActionsInterface::ACTION_ACC_SEARCH);
$actionId = Request::analyze('actionId', 0);
$itemId = Request::analyze('itemId', 0);
$tpl = new SP\Template();
$tpl->assign('actionId', $actionId);
$tpl->assign('id', $itemId);
$tpl->assign('activeTabId', $itemId);
$tpl->assign('lastAccountId', \SP\Session::getLastAcountId());
$tpl->assign('queryTimeStart', microtime());
$tpl->assign('userId', SP\Session::getUserId());
$tpl->assign('userGroupId', SP\Session::getUserGroupId());
$tpl->assign('userIsAdminApp', SP\Session::getUserIsAdminApp());
$tpl->assign('userIsAdminAcc', SP\Session::getUserIsAdminAcc());
$tpl->assign('themeUri', Themes::$themeUri);
// Control de ruta de acciones
if ($actionId != \SP\Controller\ActionsInterface::ACTION_ACC_SEARCH) {
$actionsPath = &$_SESSION['actionsPath'];
$actionsPath[] = $actionId;
$actions = count($actionsPath);
// Se eliminan las acciones ya realizadas
if ($actions > 2 && $actionsPath[$actions - 3] == $actionId) {
unset($actionsPath[$actions - 3]);
unset($actionsPath[$actions - 2]);
$actionsPath = array_values($actionsPath);
$actions = count($actionsPath);
}
$tpl->assign('lastAction', $actionsPath[$actions - 2]);
}
$Tpl = new Template();
$Tpl->assign('actionId', $actionId);
$Tpl->assign('id', $itemId);
$Tpl->assign('activeTabId', $itemId);
$Tpl->assign('queryTimeStart', microtime());
$Tpl->assign('userId', Session::getUserData()->getUserId());
$Tpl->assign('userGroupId', Session::getUserData()->getUserGroupId());
$Tpl->assign('userIsAdminApp', Session::getUserData()->isUserIsAdminApp());
$Tpl->assign('userIsAdminAcc', Session::getUserData()->isUserIsAdminAcc());
$Tpl->assign('themeUri', DiFactory::getTheme()->getThemeUri());
switch ($actionId) {
case \SP\Controller\ActionsInterface::ACTION_ACC_SEARCH:
$_SESSION['actionsPath'] = array(\SP\Controller\ActionsInterface::ACTION_ACC_SEARCH);
$tpl->assign('lastAction', $lastAction);
$controller = new SP\Controller\SearchC($tpl);
$controller->getSearchBox();
$controller->getSearch();
case ActionsInterface::ACTION_ACC_SEARCH:
$Controller = new AccountSearchController($Tpl);
$Controller->doAction();
break;
case \SP\Controller\ActionsInterface::ACTION_ACC_NEW:
$controller = new SP\Controller\AccountC($tpl, null, $itemId);
$controller->getNewAccount();
case ActionsInterface::ACTION_ACC_NEW:
case ActionsInterface::ACTION_ACC_COPY:
case ActionsInterface::ACTION_ACC_EDIT:
case ActionsInterface::ACTION_ACC_EDIT_PASS:
case ActionsInterface::ACTION_ACC_VIEW:
case ActionsInterface::ACTION_ACC_VIEW_HISTORY:
case ActionsInterface::ACTION_ACC_DELETE:
case ActionsInterface::ACTION_ACC_REQUEST:
$Controller = new AccountController($Tpl, $itemId);
$Controller->doAction($actionId);
break;
case \SP\Controller\ActionsInterface::ACTION_ACC_COPY:
$controller = new SP\Controller\AccountC($tpl, null, $itemId);
$controller->getCopyAccount();
case ActionsInterface::ACTION_USR:
case ActionsInterface::ACTION_USR_USERS:
case ActionsInterface::ACTION_USR_GROUPS:
case ActionsInterface::ACTION_USR_PROFILES:
case ActionsInterface::ACTION_MGM_APITOKENS:
case ActionsInterface::ACTION_MGM_PUBLICLINKS:
$Controller = new ItemListController($Tpl);
$Controller->doAction(ItemListController::TYPE_ACCESSES);
break;
case \SP\Controller\ActionsInterface::ACTION_ACC_EDIT:
$controller = new SP\Controller\AccountC($tpl, null, $itemId);
$controller->getEditAccount();
case ActionsInterface::ACTION_MGM:
case ActionsInterface::ACTION_MGM_CATEGORIES:
case ActionsInterface::ACTION_MGM_CUSTOMERS:
case ActionsInterface::ACTION_MGM_CUSTOMFIELDS:
case ActionsInterface::ACTION_MGM_FILES:
case ActionsInterface::ACTION_MGM_ACCOUNTS:
case ActionsInterface::ACTION_MGM_TAGS:
$Controller = new ItemListController($Tpl);
$Controller->doAction(ItemListController::TYPE_ACCOUNTS);
break;
case \SP\Controller\ActionsInterface::ACTION_ACC_EDIT_PASS:
$controller = new SP\Controller\AccountC($tpl, null, $itemId);
$controller->getEditPassAccount();
case ActionsInterface::ACTION_CFG:
case ActionsInterface::ACTION_CFG_GENERAL:
case ActionsInterface::ACTION_CFG_WIKI:
case ActionsInterface::ACTION_CFG_LDAP:
case ActionsInterface::ACTION_CFG_MAIL:
case ActionsInterface::ACTION_CFG_ENCRYPTION:
case ActionsInterface::ACTION_CFG_ENCRYPTION_TEMPPASS:
case ActionsInterface::ACTION_CFG_BACKUP:
case ActionsInterface::ACTION_CFG_EXPORT:
case ActionsInterface::ACTION_CFG_IMPORT:
$Controller = new ConfigController($Tpl);
$Controller->doAction();
break;
case \SP\Controller\ActionsInterface::ACTION_ACC_VIEW:
$controller = new SP\Controller\AccountC($tpl, null, $itemId);
$controller->getViewAccount();
case ActionsInterface::ACTION_EVL:
$Controller = new EventlogController($Tpl);
$Controller->doAction();
break;
case \SP\Controller\ActionsInterface::ACTION_ACC_VIEW_HISTORY:
$controller = new SP\Controller\AccountC($tpl, null, $itemId);
$controller->getViewHistoryAccount();
case ActionsInterface::ACTION_USR_PREFERENCES:
case ActionsInterface::ACTION_USR_PREFERENCES_GENERAL:
case ActionsInterface::ACTION_USR_PREFERENCES_SECURITY:
$Controller = new UserPreferencesController($Tpl);
$Controller->doAction();
break;
case \SP\Controller\ActionsInterface::ACTION_ACC_DELETE:
$controller = new SP\Controller\AccountC($tpl, null, $itemId);
$controller->getDeleteAccount();
break;
case \SP\Controller\ActionsInterface::ACTION_ACC_REQUEST:
$controller = new SP\Controller\AccountC($tpl, null, $itemId);
$controller->getRequestAccountAccess();
break;
case \SP\Controller\ActionsInterface::ACTION_USR:
$controller = new SP\Controller\UsersMgmtC($tpl);
$controller->useTabs();
$controller->getUsersList();
$controller->getGroupsList();
$controller->getProfilesList();
$controller->getAPITokensList();
break;
case \SP\Controller\ActionsInterface::ACTION_MGM:
$controller = new SP\Controller\AccountsMgmtC($tpl);
$controller->useTabs();
$controller->getCategories();
$controller->getCustomers();
$controller->getCustomFields();
break;
case \SP\Controller\ActionsInterface::ACTION_CFG:
case \SP\Controller\ActionsInterface::ACTION_CFG_GENERAL:
case \SP\Controller\ActionsInterface::ACTION_CFG_WIKI:
case \SP\Controller\ActionsInterface::ACTION_CFG_LDAP:
case \SP\Controller\ActionsInterface::ACTION_CFG_MAIL:
case \SP\Controller\ActionsInterface::ACTION_CFG_ENCRYPTION:
case \SP\Controller\ActionsInterface::ACTION_CFG_ENCRYPTION_TEMPPASS:
case \SP\Controller\ActionsInterface::ACTION_CFG_BACKUP:
case \SP\Controller\ActionsInterface::ACTION_CFG_EXPORT:
case \SP\Controller\ActionsInterface::ACTION_CFG_IMPORT:
$tpl->assign('onCloseAction', $actionId);
$tpl->addTemplate('tabs-start');
$controller = new SP\Controller\ConfigC($tpl);
$controller->getGeneralTab();
$controller->getWikiTab();
$controller->getLdapTab();
$controller->getMailTab();
$controller->getEncryptionTab();
$controller->getBackupTab();
$controller->getImportTab();
$controller->getInfoTab();
$tpl->addTemplate('tabs-end');
break;
case \SP\Controller\ActionsInterface::ACTION_EVL:
$controller = new SP\Controller\EventlogC($tpl);
$controller->getEventlog();
break;
case \SP\Controller\ActionsInterface::ACTION_USR_PREFERENCES:
case \SP\Controller\ActionsInterface::ACTION_USR_PREFERENCES_GENERAL:
case \SP\Controller\ActionsInterface::ACTION_USR_PREFERENCES_SECURITY:
$tpl->addTemplate('tabs-start');
$controller = new \SP\Controller\UsersPrefsC($tpl);
$controller->getPreferencesTab();
$controller->getSecurityTab();
$tpl->addTemplate('tabs-end');
case ActionsInterface::ACTION_NOT:
case ActionsInterface::ACTION_NOT_USER:
$Controller = new NoticesController($Tpl);
$Controller->doAction();
break;
}
// Se comprueba si se debe de mostrar la vista de depuración
if (\SP\Session::getUserIsAdminApp() && SP\Config::getValue('debug')) {
$controller->getDebug();
if (Session::getUserData()->isUserIsAdminApp() && Config::getConfig()->isDebug()) {
$Controller->getDebug();
}
$tpl->addTemplate('js-common');
$controller->view();
$Controller->view();

View File

@@ -2,9 +2,9 @@
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -19,11 +19,16 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\Request;
use SP\Config\Config;
use SP\Core\CryptPKI;
use SP\Core\Init;
use SP\Core\Session;
use SP\Http\Request;
use SP\Http\Response;
use SP\Util\Checks;
define('APP_ROOT', '..');
@@ -32,16 +37,22 @@ require APP_ROOT . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'strings.j
Request::checkReferer('GET');
$Config = Config::getConfig();
$data = array(
'lang' => $stringsJsLang,
'app_root' => SP\Init::$WEBURI,
'locale' => $Config->getSiteLang(),
'app_root' => Init::$WEBURI,
'pk' => '',
'max_file_size' => \SP\Config::getValue('files_allowed_size')
'max_file_size' => $Config->getFilesAllowedSize(),
'check_updates' => Session::getAuthCompleted() && ($Config->isCheckUpdates() || $Config->isChecknotices()) && (Session::getUserData()->isUserIsAdminApp() || Checks::demoIsEnabled()),
'timezone' => date_default_timezone_get(),
'debug' => DEBUG || $Config->isDebug()
);
try {
$CryptPKI = new SP\CryptPKI();
$data['pk'] = (SP\Session::getPublicKey()) ? SP\Session::getPublicKey() : $CryptPKI->getPublicKey();
} catch (Exception $e){}
$CryptPKI = new CryptPKI();
$data['pk'] = Session::getPublicKey() ?: $CryptPKI->getPublicKey();
} catch (Exception $e) {}
SP\Response::printJSON($data, 0);
Response::printJson($data, 0);

View File

@@ -2,9 +2,9 @@
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -19,11 +19,11 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\Request;
use SP\Controller\ItemsController;
use SP\Http\Request;
define('APP_ROOT', '..');
@@ -31,19 +31,5 @@ require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Bas
Request::checkReferer('GET');
if (!SP\Init::isLoggedIn()) {
SP\Util::logout();
}
$userId = SP\Request::analyze('userId', false);
if (!$userId) {
return;
}
$tpl = new SP\Template();
$tpl->assign('userId', $userId);
$controller = new SP\Controller\UsersMgmtC($tpl);
$controller->getUserPass();
$tpl->addTemplate('js-common');
$controller->view();
$Controller = new ItemsController();
$Controller->doAction();

View File

@@ -1,70 +0,0 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
*/
use SP\Request;
use SP\SessionUtil;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('POST');
if (!SP\Init::isLoggedIn()) {
SP\Response::printJSON(_('La sesión no se ha iniciado o ha caducado'), 10);
}
if (SP\Util::demoIsEnabled()) {
SP\Response::printJSON(_('Ey, esto es una DEMO!!'));
}
$sk = SP\Request::analyze('sk', false);
$defaultUser= SP\Request::analyze('defUser', 0);
$defaultGroup = SP\Request::analyze('defGroup', 0);
$importPwd = SP\Request::analyzeEncrypted('importPwd');
$csvDelimiter = SP\Request::analyze('csvDelimiter');
if (!$sk || !SessionUtil::checkSessionKey($sk)) {
SP\Response::printJSON(_('CONSULTA INVÁLIDA'));
}
SP\Import::setDefUser($defaultUser);
SP\Import::setDefGroup($defaultGroup);
SP\Import::setImportPwd($importPwd);
SP\Import::setCsvDelimiter($csvDelimiter);
$res = SP\Import::doImport($_FILES["inFile"]);
if (isset($res['error']) && is_array($res['error'])) {
error_log($res['error']['hint']);
$out = implode('\n\n', $res['error']);
SP\Response::printJSON($out);
} else if (is_array($res['ok'])) {
$out = implode('\n\n', $res['ok']);
SP\Response::printJSON($out, 0);
}

64
ajax/ajax_install.php Normal file
View File

@@ -0,0 +1,64 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\Core\Exceptions\SPException;
use SP\Core\Installer;
use SP\DataModel\InstallData;
use SP\Http\JsonResponse;
use SP\Http\Request;
use SP\Util\Json;
define('APP_ROOT', '..');
define('IS_INSTALLER', 1);
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('POST');
$Json = new JsonResponse();
$InstallData = new InstallData();
$InstallData->setSiteLang(Request::analyze('sitelang', 'en_US'));
$InstallData->setAdminLogin(Request::analyze('adminlogin', 'admin'));
$InstallData->setAdminPass(Request::analyzeEncrypted('adminpass'));
$InstallData->setMasterPassword(Request::analyzeEncrypted('masterpassword'));
$InstallData->setDbAdminUser(Request::analyze('dbuser', 'root'));
$InstallData->setDbAdminPass(Request::analyzeEncrypted('dbpass'));
$InstallData->setDbName(Request::analyze('dbname', 'syspass'));
$InstallData->setDbHost(Request::analyze('dbhost', 'localhost'));
$InstallData->setHostingMode(Request::analyze('hostingmode', false));
try {
$Installer = new Installer($InstallData);
$Installer->checkData();
$Installer->install();
$Json->setStatus(0);
$Json->setDescription(__('Instalación finalizada'));
} catch (SPException $e) {
$Json->setDescription($e->getMessage());
$Json->addMessage($e->getHint());
}
Json::returnJson($Json);

35
ajax/ajax_itemSave.php Normal file
View File

@@ -0,0 +1,35 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\Controller\ItemActionController;
use SP\Http\Request;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('POST');
$ItemAction = new ItemActionController();
$ItemAction->doAction();

35
ajax/ajax_itemSearch.php Normal file
View File

@@ -0,0 +1,35 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
define('APP_ROOT', '..');
use SP\Controller\ItemSearchController;
use SP\Http\Request;
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('GET');
$ItemSearch = new ItemSearchController();
$ItemSearch->doAction();

35
ajax/ajax_itemShow.php Normal file
View File

@@ -0,0 +1,35 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\Controller\ItemShowController;
use SP\Http\Request;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('GET');
$ItemShow = new ItemShowController();
$ItemShow->doAction();

View File

@@ -1,87 +0,0 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
*/
use SP\Request;
use SP\SessionUtil;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('POST');
if (!SP\Init::isLoggedIn()) {
SP\Response::printJSON(_('La sesión no se ha iniciado o ha caducado'), 10);
}
if (SP\Util::demoIsEnabled()) {
SP\Response::printJSON(_('Ey, esto es una DEMO!!'));
}
$sk = SP\Request::analyze('sk', false);
if (!$sk || !SessionUtil::checkSessionKey($sk)) {
SP\Response::printJSON(_('CONSULTA INVÁLIDA'));
}
$frmDBUser = SP\Request::analyze('dbuser');
$frmDBPass = SP\Request::analyzeEncrypted('dbpass');
$frmDBName = SP\Request::analyze('dbname');
$frmDBHost = SP\Request::analyze('dbhost');
$frmMigrateEnabled = SP\Request::analyze('chkmigrate', 0, false, 1);
if (!$frmMigrateEnabled) {
SP\Response::printJSON(_('Confirmar la importación de cuentas'));
} elseif (!$frmDBUser) {
SP\Response::printJSON(_('Es necesario un usuario de conexión'));
} elseif (!$frmDBPass) {
SP\Response::printJSON(_('Es necesaria una clave de conexión'));
} elseif (!$frmDBName) {
SP\Response::printJSON(_('Es necesario el nombre de la BBDD'));
} elseif (!$frmDBHost) {
SP\Response::printJSON(_('Es necesario un nombre de host'));
}
$options['dbhost'] = $frmDBHost;
$options['dbname'] = $frmDBName;
$options['dbuser'] = $frmDBUser;
$options['dbpass'] = $frmDBPass;
$res = SP\Migrate::migrate($options);
if (is_array($res['error'])) {
foreach ($res['error'] as $error) {
$errors [] = $error['description'];
$errors [] = $error['hint'];
error_log($error['hint']);
}
$out = implode('<br>', $errors);
SP\Response::printJSON($out);
} elseif (is_array($res['ok'])) {
$out = implode('<br>', $res['ok']);
SP\Response::printJSON($out, 0);
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
define('APP_ROOT', '..');
use SP\Controller\NoticesSearchController;
use SP\Http\Request;
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('GET');
$NoticesSearch = new NoticesSearchController();
$NoticesSearch->doAction();

35
ajax/ajax_noticeShow.php Normal file
View File

@@ -0,0 +1,35 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
define('APP_ROOT', '..');
use SP\Controller\NoticeShowController;
use SP\Http\Request;
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('GET');
$NoticeShow = new NoticeShowController();
$NoticeShow->doAction();

View File

@@ -2,9 +2,9 @@
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -19,64 +19,92 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\SessionUtil;
use SP\UserPass;
use SP\UserPassRecover;
use SP\UserUtil;
use SP\Auth\AuthUtil;
use SP\Core\SessionUtil;
use SP\Core\Exceptions\SPException;
use SP\Http\JsonResponse;
use SP\Http\Request;
use SP\Http\Response;
use SP\Log\Email;
use SP\Log\Log;
use SP\Mgmt\Users\User;
use SP\Mgmt\Users\UserPass;
use SP\Mgmt\Users\UserPassRecover;
use SP\Util\Json;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
SP\Request::checkReferer('POST');
Request::checkReferer('POST');
$sk = SP\Request::analyze('sk', false);
$JsonResponse = new JsonResponse();
$sk = Request::analyze('sk', false);
if (!$sk || !SessionUtil::checkSessionKey($sk)) {
SP\Response::printJSON(_('CONSULTA INVÁLIDA'));
$JsonResponse->setDescription(__('CONSULTA INVÁLIDA'));
Json::returnJson($JsonResponse);
}
$userLogin = SP\Request::analyze('login');
$userEmail = SP\Request::analyze('email');
$userPass = SP\Request::analyzeEncrypted('pass');
$userPassR = SP\Request::analyzeEncrypted('passR');
$hash = SP\Request::analyze('hash');
$time = SP\Request::analyze('time');
$userLogin = Request::analyze('login');
$userEmail = Request::analyze('email');
$userPass = Request::analyzeEncrypted('pass');
$userPassR = Request::analyzeEncrypted('passR');
$message['action'] = _('Recuperación de Clave');
$Log = new Log();
$LogMessage = $Log->getLogMessage();
if ($userLogin && $userEmail) {
$log = new \SP\Log(_('Recuperación de Clave'));
$LogMessage->setAction(__('Recuperación de Clave', false));
$LogMessage->addDetailsHtml(__('Solicitado para'), sprintf('%s (%s)', $userLogin, $userEmail));
if (SP\Auth::mailPassRecover($userLogin, $userEmail)) {
$log->addDescription(SP\Html::strongText(_('Solicitado para') . ': ') . ' ' . $userLogin . ' (' . $userEmail . ')');
$UserData = User::getItem()->getByLogin($userLogin);
SP\Response::printJSON(_('Solicitud enviada') . ';;' . _('En breve recibirá un correo para completar la solicitud.'), 0, 'goLogin();');
} else {
$log->addDescription('ERROR');
$log->addDescription(SP\Html::strongText(_('Solicitado para') . ': ') . ' ' . $userLogin . ' (' . $userEmail . ')');
if ($UserData->getUserEmail() === $userEmail
&& AuthUtil::mailPassRecover($UserData)
) {
$LogMessage->addDescription(__('Solicitud enviada', false));
$Log->writeLog();
SP\Response::printJSON(_('No se ha podido realizar la solicitud. Consulte con el administrador.'));
$JsonResponse->setDescription($LogMessage->getDescription());
$JsonResponse->addMessage(__('En breve recibirá un correo para completar la solicitud.'));
Json::returnJson($JsonResponse);
}
$log->writeLog();
SP\Email::sendEmail($log);
$LogMessage->addDescription(__('Solicitud no enviada', false));
$LogMessage->addDescription(__('Compruebe datos de usuario o consulte con el administrador', false));
$Log->writeLog();
Email::sendEmail($LogMessage);
$JsonResponse->setStatus(0);
$JsonResponse->setDescription($LogMessage->getDescription());
Json::returnJson($JsonResponse);
} elseif ($userPass && $userPassR && $userPass === $userPassR) {
$userId = UserPassRecover::checkHashPassRecover($hash);
$LogMessage->setAction(__('Modificar Clave Usuario', false));
if ($userId) {
if (UserPass::updateUserPass($userId, $userPass) && UserPassRecover::updateHashPassRecover($hash)) {
\SP\Log::writeNewLogAndEmail(_('Modificar Clave Usuario'), SP\Html::strongText(_('Login') . ': ') . UserUtil::getUserLoginById($userId));
try {
$UserPassRecover = UserPassRecover::getItem()->getHashUserId(Request::analyze('hash'));
UserPass::getItem()->updateUserPass($UserPassRecover->getItemData()->getUserpassrUserId(), $userPass);
} catch (SPException $e) {
$LogMessage->addDescription($e->getMessage());
$Log->writeLog();
SP\Response::printJSON(_('Clave actualizada'), 0, 'goLogin();');
}
$JsonResponse->setDescription($e->getMessage());
Json::returnJson($JsonResponse);
}
SP\Response::printJSON(_('Error al modificar la clave'));
$LogMessage->addDescription(__('Clave actualizada', false));
$LogMessage->addDetailsHtml(__('Login', false), UserPass::getItem()->getItemData()->getUserLogin());
$Log->writeLog();
$JsonResponse->setStatus(0);
$JsonResponse->setDescription($LogMessage->getDescription());
Json::returnJson($JsonResponse);
} else {
SP\Response::printJSON(_('La clave es incorrecta o no coincide'));
Response::printJson(__('La clave es incorrecta o no coincide'));
}

View File

@@ -1,79 +0,0 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
*/
use SP\SessionUtil;
use SP\UserUtil;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
SP\Request::checkReferer('POST');
if (!SP\Init::isLoggedIn()) {
SP\Response::printJSON(_('La sesión no se ha iniciado o ha caducado'), 10);
}
$sk = SP\Request::analyze('sk', false);
if (!$sk || !SessionUtil::checkSessionKey($sk)) {
SP\Response::printJSON(_('CONSULTA INVÁLIDA'));
}
$frmAccountId = SP\Request::analyze('accountid', 0);
$frmDescription = SP\Request::analyze('description');
if (!$frmDescription) {
SP\Response::printJSON(_('Es necesaria una descripción'));
}
$accountRequestData = SP\Account::getAccountRequestData($frmAccountId);
$recipients = array(
UserUtil::getUserEmail($accountRequestData->account_userId),
UserUtil::getUserEmail($accountRequestData->account_userEditId)
);
$requestUsername = SP\Session::getUserName();
$requestLogin = SP\Session::getUserLogin();
$log = new \SP\Log(_('Solicitud de Modificación de Cuenta'));
$log->addDescription(SP\Html::strongText(_('Solicitante') . ': ') . $requestUsername . ' (' . $requestLogin . ')');
$log->addDescription(SP\Html::strongText(_('Cuenta') . ': ') . $accountRequestData->account_name);
$log->addDescription(SP\Html::strongText(_('Cliente') . ': ') . $accountRequestData->customer_name);
$log->addDescription(SP\Html::strongText(_('Descripción') . ': ') . $frmDescription);
$mailto = implode(',', $recipients);
if (strlen($mailto) > 1
&& SP\Util::mailrequestIsEnabled()
&& SP\Email::sendEmail($log, $mailto)
) {
$log->writeLog();
SP\Response::printJSON(_('Solicitud enviada'), 0, "doAction('" . \SP\Controller\ActionsInterface::ACTION_ACC_SEARCH . "');");
}
SP\Response::printJSON(_('Error al enviar la solicitud'));

View File

@@ -2,9 +2,9 @@
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -19,13 +19,24 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\Request;
use SP\SessionUtil;
use SP\UserUtil;
use Plugins\Authenticator\Authenticator;
use SP\Core\ActionsInterface;
use SP\Core\Init;
use SP\Core\Language;
use SP\Core\Session;
use SP\Core\Exceptions\SPException;
use SP\Core\DiFactory;
use SP\Http\JsonResponse;
use SP\Http\Request;
use SP\Core\SessionUtil;
use SP\Mgmt\Users\UserPreferences;
use SP\Mgmt\Users\UserUtil;
use SP\Util\Checks;
use SP\Util\Json;
use SP\Util\Util;
define('APP_ROOT', '..');
@@ -33,86 +44,56 @@ require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Bas
Request::checkReferer('POST');
if (!SP\Init::isLoggedIn()) {
SP\Response::printJSON(_('La sesión no se ha iniciado o ha caducado'), 10);
$Json = new JsonResponse();
if (!Init::isLoggedIn()) {
$Json->setStatus(10);
$Json->setDescription(__('La sesión no se ha iniciado o ha caducado'));
Json::returnJson($Json);
}
$sk = SP\Request::analyze('sk', false);
$sk = Request::analyze('sk', false);
if (!$sk || !SessionUtil::checkSessionKey($sk)) {
SP\Response::printJSON(_('CONSULTA INVÁLIDA'));
$Json->setDescription(__('CONSULTA INVÁLIDA'));
Json::returnJson($Json);
}
// Variables POST del formulario
$actionId = SP\Request::analyze('actionId', 0);
$itemId = SP\Request::analyze('itemId', 0);
$activeTab = SP\Request::analyze('activeTab', 0);
$actionId = Request::analyze('actionId', 0);
$itemId = Request::analyze('itemId', 0);
// Acción al cerrar la vista
$doActionOnClose = "sysPassUtil.Common.doAction($actionId,'',$activeTab);";
if ($actionId === ActionsInterface::ACTION_USR_PREFERENCES_GENERAL) {
$UserPreferencesData = UserPreferences::getItem()->getById($itemId);
if ($actionId === SP\Controller\ActionsInterface::ACTION_USR_PREFERENCES_GENERAL) {
$userLang = SP\Request::analyze('userlang');
$userTheme = SP\Request::analyze('usertheme', 'material-blue');
$resultsPerPage = SP\Request::analyze('resultsperpage', 12);
$accountLink = SP\Request::analyze('account_link', false, false, true);
$sortViews = SP\Request::analyze('sort_views', false, false, true);
$topNavbar = SP\Request::analyze('top_navbar', false, false, true);
$optionalActions = SP\Request::analyze('optional_actions', false, false, true);
$UserPreferencesData->setUserId($itemId);
$UserPreferencesData->setLang(Request::analyze('userlang'));
$UserPreferencesData->setTheme(Request::analyze('usertheme', 'material-blue'));
$UserPreferencesData->setResultsPerPage(Request::analyze('resultsperpage', 12));
$UserPreferencesData->setAccountLink(Request::analyze('account_link', false, false, true));
$UserPreferencesData->setSortViews(Request::analyze('sort_views', false, false, true));
$UserPreferencesData->setTopNavbar(Request::analyze('top_navbar', false, false, true));
$UserPreferencesData->setOptionalActions(Request::analyze('optional_actions', false, false, true));
$UserPreferencesData->setResultsAsCards(Request::analyze('resultsascards', false, false, true));
if (!array_key_exists($userTheme , \SP\Themes::getThemesAvailable())) {
SP\Response::printJSON(_('Error al actualizar preferencias'));
try {
UserPreferences::getItem($UserPreferencesData)->update();
// Forzar la detección del lenguaje tras actualizar
Language::setLanguage(true);
DiFactory::getTheme()->initTheme(true);
// Actualizar las preferencias en la sesión y recargar la página
Session::setUserPreferences($UserPreferencesData);
Util::reload();
$Json->setStatus(0);
$Json->setDescription(__('Preferencias actualizadas'));
} catch (SPException $e) {
$Json->setDescription($e->getMessage());
}
// No se instancia la clase ya que es necesario guardar los atributos ya guardados
$UserPrefs = \SP\UserPreferences::getPreferences($itemId);
$UserPrefs->setId($itemId);
$UserPrefs->setLang($userLang);
$UserPrefs->setTheme($userTheme);
$UserPrefs->setResultsPerPage($resultsPerPage);
$UserPrefs->setAccountLink($accountLink);
$UserPrefs->setSortViews($sortViews);
$UserPrefs->setTopNavbar($topNavbar);
$UserPrefs->setOptionalActions($optionalActions);
if (!$UserPrefs->updatePreferences()) {
SP\Response::printJSON(_('Error al actualizar preferencias'));
}
// Forzar la detección del lenguaje tras actualizar
SP\Language::setLanguage(true);
SP\Themes::setTheme(true);
// Actualizar las preferencias en la sesión y recargar la página
SP\Session::setUserPreferences($UserPrefs);
SP\Util::reload();
SP\Response::printJSON(_('Preferencias actualizadas'), 0, $doActionOnClose);
} else if ($actionId === SP\Controller\ActionsInterface::ACTION_USR_PREFERENCES_SECURITY) {
if (SP\Util::demoIsEnabled() && \SP\Session::getUserLogin() === 'demo') {
SP\Response::printJSON(_('Ey, esto es una DEMO!!'));
}
// Variables POST del formulario
$twoFaEnabled = SP\Request::analyze('security_2faenabled', 0, false, 1);
$pin = SP\Request::analyze('security_pin', 0);
$userLogin = UserUtil::getUserLoginById($itemId);
$twoFa = new \SP\Auth\Auth2FA($itemId, $userLogin);
if (!$twoFa->verifyKey($pin)) {
SP\Response::printJSON(_('Código incorrecto'));
}
// No se instancia la clase ya que es necesario guardar los atributos ya guardados
$UserPrefs = \SP\UserPreferences::getPreferences($itemId);
$UserPrefs->setId($itemId);
$UserPrefs->setUse2Fa(\SP\Util::boolval($twoFaEnabled));
if (!$UserPrefs->updatePreferences()) {
SP\Response::printJSON(_('Error al actualizar preferencias'));
}
SP\Response::printJSON(_('Preferencias actualizadas'), 0, $doActionOnClose);
Json::returnJson($Json);
} else {
SP\Response::printJSON(_('Acción Inválida'));
$Json->setDescription(__('Acción Inválida'));
Json::returnJson($Json);
}

View File

@@ -1,87 +0,0 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
*/
use SP\Request;
use SP\UserPass;
use SP\UserUtil;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('POST');
if (!SP\Init::isLoggedIn()) {
SP\Response::printJSON(_('La sesión no se ha iniciado o ha caducado'), 10);
}
$accountId = SP\Request::analyze('accountid', false);
$isHistory = SP\Request::analyze('isHistory', false);
$full = SP\Request::analyze('full', 0, false, 1);
if (!$accountId) {
return;
}
$account = (!$isHistory) ? new SP\Account() : new SP\AccountHistory();
$account->setAccountParentId(\SP\Session::getAccountParentId());
$account->setAccountId($accountId);
$accountData = $account->getAccountPassData();
if ($isHistory && !$account->checkAccountMPass()) {
SP\Response::printJSON(_('La clave maestra no coincide'));
}
if (!SP\Acl::checkAccountAccess(SP\Acl::ACTION_ACC_VIEW_PASS, $account->getAccountDataForACL()) || !SP\Acl::checkUserAccess(SP\Acl::ACTION_ACC_VIEW_PASS)) {
SP\Response::printJSON(_('No tiene permisos para acceder a esta cuenta'));
} elseif (!UserPass::checkUserUpdateMPass()) {
SP\Response::printJSON(_('Clave maestra actualizada') . '<br>' . _('Reinicie la sesión para cambiarla'));
}
$accountClearPass = SP\Crypt::getDecrypt($accountData->pass, $accountData->iv);
if (!$isHistory) {
$account->incrementDecryptCounter();
$log = new \SP\Log(_('Ver Clave'));
$log->addDescription(_('ID') . ': ' . $accountId);
$log->addDescription(_('Cuenta') . ': ' . $accountData->customer_name . " / " . $accountData->name);
$log->writeLog();
}
//$accountPass = htmlspecialchars(trim($accountClearPass));
$useImage = intval(\SP\Util::accountPassToImageIsEnabled());
$data = array(
'title' => _('Clave de Cuenta'),
'acclogin' => $accountData->login,
'accpass' => (!$useImage) ? (($full === 1) ? htmlentities(trim($accountClearPass)) : trim($accountClearPass)) : \SP\ImageUtil::convertText($accountClearPass),
'useimage' => $useImage
);
SP\Response::printJSON($data, 0);

35
ajax/ajax_wiki.php Normal file
View File

@@ -0,0 +1,35 @@
<?php
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\Controller\WikiController;
use SP\Http\Request;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
Request::checkReferer('GET');
$Controller = new WikiController();
$Controller->doAction();

50
api.php
View File

@@ -2,9 +2,9 @@
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.or
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -19,42 +19,22 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\Api\ApiRequest;
use SP\Log\Log;
define('APP_ROOT', '.');
require APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
try {
$ApiRequest = new \SP\ApiRequest();
switch ($ApiRequest->getAction()) {
case \SP\Controller\ActionsInterface::ACTION_ACC_VIEW:
$itemId = \SP\Request::analyze(\SP\ApiRequest::ITEM, 0);
$out = $ApiRequest->getApi()->getAccountData($itemId);
break;
case \SP\Controller\ActionsInterface::ACTION_ACC_VIEW_PASS:
$ApiRequest->addVar('userPass', \SP\ApiRequest::analyze(\SP\ApiRequest::USER_PASS));
$itemId = \SP\Request::analyze(\SP\ApiRequest::ITEM, 0);
$out = $ApiRequest->getApi()->getAccountPassword($itemId);
break;
case \SP\Controller\ActionsInterface::ACTION_ACC_SEARCH:
$search = \SP\Request::analyze(\SP\ApiRequest::SEARCH);
$count = \SP\Request::analyze(\SP\ApiRequest::SEARCH_COUNT, 10);
$out = $ApiRequest->getApi()->getAccountSearch($search, $count);
break;
default:
throw new Exception(_('Acción Inválida'));
}
} catch (Exception $e) {
\SP\Response::printJSON(array($e->getMessage(), _('Ayuda Parámetros') => \SP\ApiRequest::getHelp()));
}
header('Content-type: application/json');
echo $out;
try {
$ApiRequest = new ApiRequest();
exit($ApiRequest->runApi());
} catch (Exception $e) {
Log::writeNewLog('API', $e->getMessage(), Log::ERROR);
exit($ApiRequest->formatJsonError($e));
}

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1,207 @@
@charset "UTF-8";.alertify{font-family:inherit;position:fixed;background-color:rgba(0,0,0,.6);left:0;right:0;top:0;bottom:0;width:100%;height:100%;z-index:99999}.alertify,.alertify *{box-sizing:border-box}.alertify .alertify-alert,.alertify .alertify-dialog{width:100%;margin:0 auto;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.alertify .alertify-alert .alertify-inner,.alertify .alertify-dialog .alertify-inner{width:400px;max-width:95%;margin:0 auto}.alertify .alertify-buttons{text-align:right}.alertify,.alertify-hide,.alertify-log,.alertify-show{box-sizing:border-box;-webkit-transition:all .3s cubic-bezier(.25,.8,.25,1);transition:all .3s cubic-bezier(.25,.8,.25,1)}.alertify-hidden{opacity:0;display:none}.alertify-logs{position:fixed;z-index:5000;bottom:0;right:0}.alertify-log{display:block;margin-top:10px;position:relative;right:-100%;opacity:0}.alertify-log-show{right:0;opacity:1}.alertify-log-hide{-webkit-transform:translate(100%,0);-ms-transform:translate(100%,0);transform:translate(100%,0);opacity:0}.alertify-text{margin-bottom:15px;width:100%;font-size:100%}.alertify-inner{background:#FFF;border:1px solid #8e8e8e;border:1px solid rgba(0,0,0,.3);border-radius:6px;box-shadow:0 3px 7px rgba(0,0,0,.3);background-clip:padding-box;text-align:left;margin-top:15px}.alertify-buttons button{margin-left:6px}.alertify-alert,.alertify-dialog{padding:0}.alertify-message{padding:15px;margin:0}.alertify-text-wrapper{padding:0 15px}.alertify-text{color:#555;border-radius:4px;padding:8px;background-color:#FFF;border:1px solid #CCC;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.alertify-text:focus{border-color:rgba(82,168,236,.8);outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.6)}.alertify-buttons{margin:0 15px;padding:14px 0 15px;border-top:1px solid #DDD;border-radius:0 0 6px 6px;box-shadow:inset 0 1px 0 #FFF;text-align:right}.alertify-button,.alertify-button:active,.alertify-button:focus,.alertify-button:hover{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border:1px solid transparent;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.alertify-button:focus{outline:0;box-shadow:0 0 5px #2b72d5}.alertify-button:active{position:relative;box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.alertify-button-cancel,.alertify-button-cancel:active,.alertify-button-cancel:focus,.alertify-button-cancel:hover{color:#fff;background-color:#d9534f;border-color:#d43f3a}.alertify-button-cancel:active,.alertify-button-cancel:focus,.alertify-button-cancel:hover{color:#fff;background-color:#d2322d;border-color:#ac2925}.alertify-button-ok,.alertify-button-ok:active,.alertify-button-ok:focus,.alertify-button-ok:hover{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.alertify-button-ok:active,.alertify-button-ok:focus,.alertify-button-ok:hover{color:#fff;background-color:#47a447;border-color:#398439}.alertify-log{background:#3276b1;padding:15px 14px;border-radius:4px;color:#d9edf7;border:1px solid #285e8e}.alertify-log-error{color:#ecf0f1;background:#e74c3c;border:1px solid #c0392b}.alertify-log-success{color:#ecf0f1;background:#27ae60;border:1px solid #2ecc71}
@charset "UTF-8";
.alertify {
font-family: inherit;
position: fixed;
background-color: rgba(0, 0, 0, .6);
left: 0;
right: 0;
top: 0;
bottom: 0;
width: 100%;
height: 100%;
z-index: 99999
}
.alertify, .alertify * {
box-sizing: border-box
}
.alertify .alertify-alert, .alertify .alertify-dialog {
width: 100%;
margin: 0 auto;
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%)
}
.alertify .alertify-alert .alertify-inner, .alertify .alertify-dialog .alertify-inner {
width: 400px;
max-width: 95%;
margin: 0 auto
}
.alertify .alertify-buttons {
text-align: right
}
.alertify, .alertify-hide, .alertify-log, .alertify-show {
box-sizing: border-box;
-webkit-transition: all .3s cubic-bezier(.25, .8, .25, 1);
transition: all .3s cubic-bezier(.25, .8, .25, 1)
}
.alertify-hidden {
opacity: 0;
display: none
}
.alertify-logs {
position: fixed;
z-index: 5000;
bottom: 0;
right: 0
}
.alertify-log {
display: block;
margin-top: 10px;
position: relative;
right: -100%;
opacity: 0
}
.alertify-log-show {
right: 0;
opacity: 1
}
.alertify-log-hide {
-webkit-transform: translate(100%, 0);
-ms-transform: translate(100%, 0);
transform: translate(100%, 0);
opacity: 0
}
.alertify-text {
margin-bottom: 15px;
width: 100%;
font-size: 100%
}
.alertify-inner {
background: #FFF;
border: 1px solid #8E8E8E;
border: 1px solid rgba(0, 0, 0, .3);
border-radius: 6px;
box-shadow: 0 3px 7px rgba(0, 0, 0, .3);
background-clip: padding-box;
text-align: left;
margin-top: 15px
}
.alertify-buttons button {
margin-left: 6px
}
.alertify-alert, .alertify-dialog {
padding: 0
}
.alertify-message {
padding: 15px;
margin: 0
}
.alertify-text-wrapper {
padding: 0 15px
}
.alertify-text {
color: #555;
border-radius: 4px;
padding: 8px;
background-color: #FFF;
border: 1px solid #CCC;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075)
}
.alertify-text:focus {
border-color: rgba(82, 168, 236, .8);
outline: 0;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(82, 168, 236, .6)
}
.alertify-buttons {
margin: 0 15px;
padding: 14px 0 15px;
border-top: 1px solid #DDD;
border-radius: 0 0 6px 6px;
box-shadow: inset 0 1px 0 #FFF;
text-align: right
}
.alertify-button, .alertify-button:active, .alertify-button:focus, .alertify-button:hover {
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: 400;
line-height: 1.428571429;
text-align: center;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
border: 1px solid transparent;
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none
}
.alertify-button:focus {
outline: 0;
box-shadow: 0 0 5px #2B72D5
}
.alertify-button:active {
position: relative;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05)
}
.alertify-button-cancel, .alertify-button-cancel:active, .alertify-button-cancel:focus, .alertify-button-cancel:hover {
color: #fff;
background-color: #d9534f;
border-color: #d43f3a
}
.alertify-button-cancel:active, .alertify-button-cancel:focus, .alertify-button-cancel:hover {
color: #fff;
background-color: #d2322d;
border-color: #ac2925
}
.alertify-button-ok, .alertify-button-ok:active, .alertify-button-ok:focus, .alertify-button-ok:hover {
color: #fff;
background-color: #5cb85c;
border-color: #4cae4c
}
.alertify-button-ok:active, .alertify-button-ok:focus, .alertify-button-ok:hover {
color: #fff;
background-color: #47a447;
border-color: #398439
}
.alertify-log {
background: #3276b1;
padding: 15px 14px;
border-radius: 4px;
color: #D9EDF7;
border: 1px solid #285e8e
}
.alertify-log-error {
color: #ecf0f1;
background: #e74c3c;
border: 1px solid #c0392b
}
.alertify-log-success {
color: #ecf0f1;
background: #27ae60;
border: 1px solid #2ecc71
}

1
css/alertify.min.css vendored Normal file
View File

@@ -0,0 +1 @@
.alertify-logs>*{padding:12px 24px;color:#fff;box-shadow:0 2px 5px 0 rgba(0,0,0,0.2);border-radius:1px}.alertify-logs>*,.alertify-logs>*.default{background:rgba(0,0,0,0.8)}.alertify-logs>*.error{background:rgba(244,67,54,0.8)}.alertify-logs>*.success{background:rgba(76,175,80,0.9)}.alertify{position:fixed;background-color:rgba(0,0,0,0.3);left:0;right:0;top:0;bottom:0;width:100%;height:100%;z-index:99999}.alertify.hide{opacity:0;pointer-events:none}.alertify,.alertify.show{box-sizing:border-box;-webkit-transition:all .33s cubic-bezier(0.25,0.8,0.25,1);transition:all .33s cubic-bezier(0.25,0.8,0.25,1)}.alertify,.alertify *{box-sizing:border-box}.alertify .dialog{padding:12px}.alertify .dialog,.alertify .alert{width:100%;margin:0 auto;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.alertify .dialog>*,.alertify .alert>*{width:400px;max-width:95%;margin:0 auto;text-align:center;padding:12px;background:#fff;box-shadow:0 2px 4px -1px rgba(0,0,0,0.14),0 4px 5px 0 rgba(0,0,0,0.098),0 1px 10px 0 rgba(0,0,0,0.084)}.alertify .dialog .msg,.alertify .alert .msg{padding:12px;margin-bottom:12px;margin:0;text-align:left}.alertify .dialog input:not(.form-control),.alertify .alert input:not(.form-control){margin-bottom:15px;width:100%;font-size:100%;padding:12px}.alertify .dialog input:not(.form-control):focus,.alertify .alert input:not(.form-control):focus{outline-offset:-2px}.alertify .dialog nav,.alertify .alert nav{text-align:right}.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button),.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button){background:transparent;box-sizing:border-box;color:rgba(0,0,0,0.87);position:relative;outline:0;border:0;display:inline-block;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;padding:0 6px;margin:6px 8px;line-height:36px;min-height:36px;white-space:nowrap;min-width:88px;text-align:center;text-transform:uppercase;font-size:14px;text-decoration:none;cursor:pointer;border-radius:2px}.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover,.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active{background-color:rgba(0,0,0,0.05)}.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus,.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus{border:1px dashed rgba(0,0,0,0.1)}.alertify-logs{position:fixed;z-index:100}.alertify-logs.bottom,.alertify-logs:not(.top){bottom:16px}.alertify-logs.left,.alertify-logs:not(.right){left:16px}.alertify-logs.left>*,.alertify-logs:not(.right)>*{float:left;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);height:auto}.alertify-logs.left>*.show,.alertify-logs:not(.right)>*.show{left:0}.alertify-logs.left>*,.alertify-logs.left>*.hide,.alertify-logs:not(.right)>*,.alertify-logs:not(.right)>*.hide{left:-110%}.alertify-logs.right{right:16px}.alertify-logs.right>*{float:right;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.alertify-logs.right>*.show{right:0;opacity:1}.alertify-logs.right>*,.alertify-logs.right>*.hide{right:-110%;opacity:0}.alertify-logs.top{top:0}.alertify-logs>*{box-sizing:border-box;-webkit-transition:all .4s cubic-bezier(0.25,0.8,0.25,1);transition:all .4s cubic-bezier(0.25,0.8,0.25,1);position:relative;clear:both;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000;perspective:1000}.alertify-logs>*{max-height:0;margin:0;padding:0;overflow:hidden;opacity:0;pointer-events:none}.alertify-logs>*.show{margin-top:12px;opacity:1;max-height:1000px;padding:12px}

View File

@@ -1,11 +0,0 @@
/*!
Chosen, a Select Box Enhancer for jQuery and Prototype
by Patrick Filler for Harvest, http://getharvest.com
Version 1.4.2
Full source at https://github.com/harvesthq/chosen
Copyright (c) 2011-2015 Harvest http://getharvest.com
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
This file is generated by `grunt build`, do not edit it by hand.
*/.chosen-container .chosen-results li.highlighted{background-color:#536dfe;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#879bff),color-stop(90%,#536dfe));background-image:-webkit-linear-gradient(#879bff 20%,#536dfe 90%);background-image:-moz-linear-gradient(#879bff 20%,#536dfe 90%);background-image:-o-linear-gradient(#879bff 20%,#536dfe 90%);background-image:linear-gradient(#879bff 20%,#536dfe 90%);color:#fff}.chosen-container-active .chosen-single{border:1px solid rgba(83,109,254,.8);box-shadow:0 0 5px rgba(0,0,0,0.3)}.chosen-container-active .chosen-choices{border:1px solid rgba(83,109,254,.8);box-shadow:0 0 5px rgba(0,0,0,0.3)}select:invalid+.chosen-container .chosen-single{border-color:red}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 738 B

3
css/chosen.min.css vendored

File diff suppressed because one or more lines are too long

View File

@@ -2,9 +2,9 @@
/**
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2015 Rubén Domínguez nuxsmin@syspass.org
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -19,40 +19,38 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
use SP\Minify;
use SP\Html\Minify;
use SP\Http\Request;
define('APP_ROOT', '..');
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
$file = \SP\Request::analyze('f');
$base = \SP\Request::analyze('b');
$file = Request::analyze('f');
$base = Request::analyze('b');
if (!$file) {
$Minify = new Minify();
$Minify->setType(Minify::FILETYPE_CSS);
$Minify->setBase(__DIR__);
$Minify->addFile('reset.min.css');
$Minify->addFile('jquery-ui.min.css');
$Minify->addFile('jquery-ui.structure.min.css');
$Minify->addFile('chosen.min.css');
$Minify->addFile('chosen-custom.min.css');
$Minify->addFile('alertify-bootstrap-3.min.css');
$Minify->addFile('jquery.tagsinput.min.css');
$Minify->addFile('jquery.fancybox.min.css');
$Minify->addFile('fonts.min.css');
$Minify->addFile('material-icons.min.css');
$Minify->getMinified();
$Minify->setType(Minify::FILETYPE_CSS)
->setBase(__DIR__)
->addFile('reset.min.css')
->addFile('jquery-ui.min.css')
->addFile('jquery-ui.structure.min.css')
->addFile('jquery.tagsinput.min.css')
->addFile('fonts.min.css')
->addFile('material-icons.min.css')
->addFile('toastr.min.css')
->addFile('magnific-popup.min.css')
->getMinified();
} elseif ($file && $base) {
$base = \SP\Request::analyze('b');
$base = Request::analyze('b');
$Minify = new Minify();
$Minify->setType(Minify::FILETYPE_CSS);
$Minify->setBase(urldecode($base), true);
$Minify->addFile(urldecode($file));
$Minify->getMinified();
$Minify->setType(Minify::FILETYPE_CSS)
->setBase(urldecode($base), true)
->addFile(urldecode($file))
->getMinified();
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1003 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,97 +0,0 @@
#fancybox-buttons {
position: fixed;
left: 0;
width: 100%;
z-index: 8050;
}
#fancybox-buttons.top {
top: 10px;
}
#fancybox-buttons.bottom {
bottom: 10px;
}
#fancybox-buttons ul {
display: block;
width: 166px;
height: 30px;
margin: 0 auto;
padding: 0;
list-style: none;
border: 1px solid #111;
border-radius: 3px;
-webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
-moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
background: rgb(50,50,50);
background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51)));
background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 );
}
#fancybox-buttons ul li {
float: left;
margin: 0;
padding: 0;
}
#fancybox-buttons a {
display: block;
width: 30px;
height: 30px;
text-indent: -9999px;
background-color: transparent;
background-image: url('fancybox_buttons.png');
background-repeat: no-repeat;
outline: none;
opacity: 0.8;
}
#fancybox-buttons a:hover {
opacity: 1;
}
#fancybox-buttons a.btnPrev {
background-position: 5px 0;
}
#fancybox-buttons a.btnNext {
background-position: -33px 0;
border-right: 1px solid #3e3e3e;
}
#fancybox-buttons a.btnPlay {
background-position: 0 -30px;
}
#fancybox-buttons a.btnPlayOn {
background-position: -30px -30px;
}
#fancybox-buttons a.btnToggle {
background-position: 3px -60px;
border-left: 1px solid #111;
border-right: 1px solid #3e3e3e;
width: 35px
}
#fancybox-buttons a.btnToggleOn {
background-position: -27px -60px;
}
#fancybox-buttons a.btnClose {
border-left: 1px solid #111;
width: 35px;
background-position: -56px 0px;
}
#fancybox-buttons a.btnDisabled {
opacity : 0.4;
cursor: default;
}

View File

@@ -1,122 +0,0 @@
/*!
* Buttons helper for fancyBox
* version: 1.0.5 (Mon, 15 Oct 2012)
* @requires fancyBox v2.0 or later
*
* Usage:
* $(".fancybox").fancybox({
* helpers : {
* buttons: {
* position : 'top'
* }
* }
* });
*
*/
(function ($) {
//Shortcut for fancyBox object
var F = $.fancybox;
//Add helper object
F.helpers.buttons = {
defaults : {
skipSingle : false, // disables if gallery contains single image
position : 'top', // 'top' or 'bottom'
tpl : '<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:;"></a></li></ul></div>'
},
list : null,
buttons: null,
beforeLoad: function (opts, obj) {
//Remove self if gallery do not have at least two items
if (opts.skipSingle && obj.group.length < 2) {
obj.helpers.buttons = false;
obj.closeBtn = true;
return;
}
//Increase top margin to give space for buttons
obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30;
},
onPlayStart: function () {
if (this.buttons) {
this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn');
}
},
onPlayEnd: function () {
if (this.buttons) {
this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn');
}
},
afterShow: function (opts, obj) {
var buttons = this.buttons;
if (!buttons) {
this.list = $(opts.tpl).addClass(opts.position).appendTo('body');
buttons = {
prev : this.list.find('.btnPrev').click( F.prev ),
next : this.list.find('.btnNext').click( F.next ),
play : this.list.find('.btnPlay').click( F.play ),
toggle : this.list.find('.btnToggle').click( F.toggle ),
close : this.list.find('.btnClose').click( F.close )
}
}
//Prev
if (obj.index > 0 || obj.loop) {
buttons.prev.removeClass('btnDisabled');
} else {
buttons.prev.addClass('btnDisabled');
}
//Next / Play
if (obj.loop || obj.index < obj.group.length - 1) {
buttons.next.removeClass('btnDisabled');
buttons.play.removeClass('btnDisabled');
} else {
buttons.next.addClass('btnDisabled');
buttons.play.addClass('btnDisabled');
}
this.buttons = buttons;
this.onUpdate(opts, obj);
},
onUpdate: function (opts, obj) {
var toggle;
if (!this.buttons) {
return;
}
toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn');
//Size toggle button
if (obj.canShrink) {
toggle.addClass('btnToggleOn');
} else if (!obj.canExpand) {
toggle.addClass('btnDisabled');
}
},
beforeClose: function () {
if (this.list) {
this.list.remove();
}
this.list = null;
this.buttons = null;
}
};
}(jQuery));

View File

@@ -1,199 +0,0 @@
/*!
* Media helper for fancyBox
* version: 1.0.6 (Fri, 14 Jun 2013)
* @requires fancyBox v2.0 or later
*
* Usage:
* $(".fancybox").fancybox({
* helpers : {
* media: true
* }
* });
*
* Set custom URL parameters:
* $(".fancybox").fancybox({
* helpers : {
* media: {
* youtube : {
* params : {
* autoplay : 0
* }
* }
* }
* }
* });
*
* Or:
* $(".fancybox").fancybox({,
* helpers : {
* media: true
* },
* youtube : {
* autoplay: 0
* }
* });
*
* Supports:
*
* Youtube
* http://www.youtube.com/watch?v=opj24KnzrWo
* http://www.youtube.com/embed/opj24KnzrWo
* http://youtu.be/opj24KnzrWo
* http://www.youtube-nocookie.com/embed/opj24KnzrWo
* Vimeo
* http://vimeo.com/40648169
* http://vimeo.com/channels/staffpicks/38843628
* http://vimeo.com/groups/surrealism/videos/36516384
* http://player.vimeo.com/video/45074303
* Metacafe
* http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/
* http://www.metacafe.com/watch/7635964/
* Dailymotion
* http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people
* Twitvid
* http://twitvid.com/QY7MD
* Twitpic
* http://twitpic.com/7p93st
* Instagram
* http://instagr.am/p/IejkuUGxQn/
* http://instagram.com/p/IejkuUGxQn/
* Google maps
* http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17
* http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16
* http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56
*/
(function ($) {
"use strict";
//Shortcut for fancyBox object
var F = $.fancybox,
format = function( url, rez, params ) {
params = params || '';
if ( $.type( params ) === "object" ) {
params = $.param(params, true);
}
$.each(rez, function(key, value) {
url = url.replace( '$' + key, value || '' );
});
if (params.length) {
url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params;
}
return url;
};
//Add helper object
F.helpers.media = {
defaults : {
youtube : {
matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i,
params : {
autoplay : 1,
autohide : 1,
fs : 1,
rel : 0,
hd : 1,
wmode : 'opaque',
enablejsapi : 1
},
type : 'iframe',
url : '//www.youtube.com/embed/$3'
},
vimeo : {
matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,
params : {
autoplay : 1,
hd : 1,
show_title : 1,
show_byline : 1,
show_portrait : 0,
fullscreen : 1
},
type : 'iframe',
url : '//player.vimeo.com/video/$1'
},
metacafe : {
matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/,
params : {
autoPlay : 'yes'
},
type : 'swf',
url : function( rez, params, obj ) {
obj.swf.flashVars = 'playerVars=' + $.param( params, true );
return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf';
}
},
dailymotion : {
matcher : /dailymotion.com\/video\/(.*)\/?(.*)/,
params : {
additionalInfos : 0,
autoStart : 1
},
type : 'swf',
url : '//www.dailymotion.com/swf/video/$1'
},
twitvid : {
matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i,
params : {
autoplay : 0
},
type : 'iframe',
url : '//www.twitvid.com/embed.php?guid=$1'
},
twitpic : {
matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i,
type : 'image',
url : '//twitpic.com/show/full/$1/'
},
instagram : {
matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,
type : 'image',
url : '//$1/p/$2/media/?size=l'
},
google_maps : {
matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i,
type : 'iframe',
url : function( rez ) {
return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed');
}
}
},
beforeLoad : function(opts, obj) {
var url = obj.href || '',
type = false,
what,
item,
rez,
params;
for (what in opts) {
if (opts.hasOwnProperty(what)) {
item = opts[ what ];
rez = url.match( item.matcher );
if (rez) {
type = item.type;
params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null));
url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params );
break;
}
}
}
if (type) {
obj.href = url;
obj.type = type;
obj.autoHeight = false;
}
}
};
}(jQuery));

View File

@@ -1,55 +0,0 @@
#fancybox-thumbs {
position: fixed;
left: 0;
width: 100%;
overflow: hidden;
z-index: 8050;
}
#fancybox-thumbs.bottom {
bottom: 2px;
}
#fancybox-thumbs.top {
top: 2px;
}
#fancybox-thumbs ul {
position: relative;
list-style: none;
margin: 0;
padding: 0;
}
#fancybox-thumbs ul li {
float: left;
padding: 1px;
opacity: 0.5;
}
#fancybox-thumbs ul li.active {
opacity: 0.75;
padding: 0;
border: 1px solid #fff;
}
#fancybox-thumbs ul li:hover {
opacity: 1;
}
#fancybox-thumbs ul li a {
display: block;
position: relative;
overflow: hidden;
border: 1px solid #222;
background: #111;
outline: none;
}
#fancybox-thumbs ul li img {
display: block;
position: relative;
border: 0;
padding: 0;
max-width: none;
}

View File

@@ -1,162 +0,0 @@
/*!
* Thumbnail helper for fancyBox
* version: 1.0.7 (Mon, 01 Oct 2012)
* @requires fancyBox v2.0 or later
*
* Usage:
* $(".fancybox").fancybox({
* helpers : {
* thumbs: {
* width : 50,
* height : 50
* }
* }
* });
*
*/
(function ($) {
//Shortcut for fancyBox object
var F = $.fancybox;
//Add helper object
F.helpers.thumbs = {
defaults : {
width : 50, // thumbnail width
height : 50, // thumbnail height
position : 'bottom', // 'top' or 'bottom'
source : function ( item ) { // function to obtain the URL of the thumbnail image
var href;
if (item.element) {
href = $(item.element).find('img').attr('src');
}
if (!href && item.type === 'image' && item.href) {
href = item.href;
}
return href;
}
},
wrap : null,
list : null,
width : 0,
init: function (opts, obj) {
var that = this,
list,
thumbWidth = opts.width,
thumbHeight = opts.height,
thumbSource = opts.source;
//Build list structure
list = '';
for (var n = 0; n < obj.group.length; n++) {
list += '<li><a style="width:' + thumbWidth + 'px;height:' + thumbHeight + 'px;" href="javascript:jQuery.fancybox.jumpto(' + n + ');"></a></li>';
}
this.wrap = $('<div id="fancybox-thumbs"></div>').addClass(opts.position).appendTo('body');
this.list = $('<ul>' + list + '</ul>').appendTo(this.wrap);
//Load each thumbnail
$.each(obj.group, function (i) {
var href = thumbSource( obj.group[ i ] );
if (!href) {
return;
}
$("<img />").load(function () {
var width = this.width,
height = this.height,
widthRatio, heightRatio, parent;
if (!that.list || !width || !height) {
return;
}
//Calculate thumbnail width/height and center it
widthRatio = width / thumbWidth;
heightRatio = height / thumbHeight;
parent = that.list.children().eq(i).find('a');
if (widthRatio >= 1 && heightRatio >= 1) {
if (widthRatio > heightRatio) {
width = Math.floor(width / heightRatio);
height = thumbHeight;
} else {
width = thumbWidth;
height = Math.floor(height / widthRatio);
}
}
$(this).css({
width : width,
height : height,
top : Math.floor(thumbHeight / 2 - height / 2),
left : Math.floor(thumbWidth / 2 - width / 2)
});
parent.width(thumbWidth).height(thumbHeight);
$(this).hide().appendTo(parent).fadeIn(300);
}).attr('src', href);
});
//Set initial width
this.width = this.list.children().eq(0).outerWidth(true);
this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)));
},
beforeLoad: function (opts, obj) {
//Remove self if gallery do not have at least two items
if (obj.group.length < 2) {
obj.helpers.thumbs = false;
return;
}
//Increase bottom margin to give space for thumbs
obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15);
},
afterShow: function (opts, obj) {
//Check if exists and create or update list
if (this.list) {
this.onUpdate(opts, obj);
} else {
this.init(opts, obj);
}
//Set active element
this.list.children().removeClass('active').eq(obj.index).addClass('active');
},
//Center list
onUpdate: function (opts, obj) {
if (this.list) {
this.list.stop(true).animate({
'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))
}, 150);
}
},
beforeClose: function () {
if (this.wrap) {
this.wrap.remove();
}
this.wrap = null;
this.list = null;
this.width = 0;
}
}
}(jQuery));

35
css/fonts.css Normal file
View File

@@ -0,0 +1,35 @@
/*
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
/* Fuentes para Iconos de MDL */
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url("fonts/MaterialIcons-Regular.eot"); /* For IE6-8 */
src: local('Material Icons'),
local('MaterialIcons-Regular'),
url("fonts/MaterialIcons-Regular.woff2") format('woff2'),
url("fonts/MaterialIcons-Regular.woff") format('woff'),
url("fonts/MaterialIcons-Regular.ttf") format('truetype');
}

2
css/fonts.min.css vendored
View File

@@ -1 +1 @@
@font-face{font-family:'Material Icons';font-style:normal;font-weight:400;src:url("MaterialIcons-Regular.eot");src:local('Material Icons'),local('MaterialIcons-Regular'),url("MaterialIcons-Regular.woff2") format('woff2'),url("MaterialIcons-Regular.woff") format('woff'),url("MaterialIcons-Regular.ttf") format('truetype')}
@font-face{font-family:'Material Icons';font-style:normal;font-weight:400;src:url("fonts/MaterialIcons-Regular.eot");src:local('Material Icons'),local('MaterialIcons-Regular'),url("fonts/MaterialIcons-Regular.woff2") format('woff2'),url("fonts/MaterialIcons-Regular.woff") format('woff'),url("fonts/MaterialIcons-Regular.ttf") format('truetype')}

View File

@@ -0,0 +1,830 @@
<!--
~ sysPass
~
~ @author nuxsmin
~ @link http://syspass.org
~ @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
~
~ This file is part of sysPass.
~
~ sysPass is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ sysPass is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with sysPass. If not, see <http://www.gnu.org/licenses/>.
-->
<!DOCTYPE html>
<html lang="en" class=" is-copy-enabled">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#">
<meta charset='utf-8'>
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/frameworks-96d3c90d9d94b08c8ad5ae6b8330d0ee8a8488a340e22ff175ad5f68d1e7829f.css" integrity="sha256-ltPJDZ2UsIyK1a5rgzDQ7oqEiKNA4i/xda1faNHngp8=" media="all" rel="stylesheet" />
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/github-05e14ce73b537df26fb175af401e6406d7141b763222b194c10bb4dae47aba83.css" integrity="sha256-BeFM5ztTffJvsXWvQB5kBtcUG3YyIrGUwQu02uR6uoM=" media="all" rel="stylesheet" />
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/site-4a18dc1c93cc7113ea22c7c6b62826f621b52a57f32caea97c682100ac10de36.css" integrity="sha256-ShjcHJPMcRPqIsfGtigm9iG1KlfzLK6pfGghAKwQ3jY=" media="all" rel="stylesheet" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Language" content="en">
<meta name="viewport" content="width=device-width">
<title>material-design-icons/MaterialIcons-Regular.svg at master · google/material-design-icons · GitHub</title>
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
<meta property="fb:app_id" content="1401488693436528">
<meta content="https://avatars2.githubusercontent.com/u/1342004?v=3&amp;s=400" name="twitter:image:src" /><meta content="@github" name="twitter:site" /><meta content="summary" name="twitter:card" /><meta content="google/material-design-icons" name="twitter:title" /><meta content="material-design-icons - Material Design icons by Google" name="twitter:description" />
<meta content="https://avatars2.githubusercontent.com/u/1342004?v=3&amp;s=400" property="og:image" /><meta content="GitHub" property="og:site_name" /><meta content="object" property="og:type" /><meta content="google/material-design-icons" property="og:title" /><meta content="https://github.com/google/material-design-icons" property="og:url" /><meta content="material-design-icons - Material Design icons by Google" property="og:description" />
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
<link rel="assets" href="https://assets-cdn.github.com/">
<meta name="pjax-timeout" content="1000">
<meta name="request-id" content="59160B84:6C7B:90235C6:580FDC35" data-pjax-transient>
<meta name="msapplication-TileImage" content="/windows-tile.png">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="selected-link" value="repo_source" data-pjax-transient>
<meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
<meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
<meta name="google-analytics" content="UA-3769691-2">
<meta content="collector.githubapp.com" name="octolytics-host" /><meta content="github" name="octolytics-app-id" /><meta content="59160B84:6C7B:90235C6:580FDC35" name="octolytics-dimension-request_id" />
<meta content="/&lt;user-name&gt;/&lt;repo-name&gt;/blob/show" data-pjax-transient="true" name="analytics-location" />
<meta class="js-ga-set" name="dimension1" content="Logged Out">
<meta name="hostname" content="github.com">
<meta name="user-login" content="">
<meta name="expected-hostname" content="github.com">
<meta name="js-proxy-site-detection-payload" content="YjUwOTU2OTA1ZjFkYTAxOTMzMzhkODAyNTcyNjFkNTZhNjQ3YzhlNWE3ZGM3MDhhMjQ2MTEzZGZlZTkwNzA1OHx7InJlbW90ZV9hZGRyZXNzIjoiODkuMjIuMTEuMTMyIiwicmVxdWVzdF9pZCI6IjU5MTYwQjg0OjZDN0I6OTAyMzVDNjo1ODBGREMzNSIsInRpbWVzdGFtcCI6MTQ3NzQzNDQyMSwiaG9zdCI6ImdpdGh1Yi5jb20ifQ==">
<link rel="mask-icon" href="https://assets-cdn.github.com/pinned-octocat.svg" color="#4078c0">
<link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
<meta name="html-safe-nonce" content="8dbbb4f9102b83e3408c54c41b4f863c93af2e93">
<meta content="917708e65b6372fb941ab8576a8283cbf8abe8db" name="form-nonce" />
<meta http-equiv="x-pjax-version" content="61300da8e3d7812170cf5d07db541647">
<meta name="description" content="material-design-icons - Material Design icons by Google">
<meta name="go-import" content="github.com/google/material-design-icons git https://github.com/google/material-design-icons.git">
<meta content="1342004" name="octolytics-dimension-user_id" /><meta content="google" name="octolytics-dimension-user_login" /><meta content="24953448" name="octolytics-dimension-repository_id" /><meta content="google/material-design-icons" name="octolytics-dimension-repository_nwo" /><meta content="true" name="octolytics-dimension-repository_public" /><meta content="false" name="octolytics-dimension-repository_is_fork" /><meta content="24953448" name="octolytics-dimension-repository_network_root_id" /><meta content="google/material-design-icons" name="octolytics-dimension-repository_network_root_nwo" />
<link href="https://github.com/google/material-design-icons/commits/master.atom" rel="alternate" title="Recent Commits to material-design-icons:master" type="application/atom+xml">
<link rel="canonical" href="https://github.com/google/material-design-icons/blob/master/iconfont/MaterialIcons-Regular.svg" data-pjax-transient>
</head>
<body class="logged-out env-production linux vis-public page-blob">
<div id="js-pjax-loader-bar" class="pjax-loader-bar"><div class="progress"></div></div>
<a href="#start-of-content" tabindex="1" class="accessibility-aid js-skip-to-content">Skip to content</a>
<header class="site-header js-details-container" role="banner">
<div class="container-responsive">
<a class="header-logo-invertocat" href="https://github.com/" aria-label="Homepage" data-ga-click="(Logged out) Header, go to homepage, icon:logo-wordmark">
<svg aria-hidden="true" class="octicon octicon-mark-github" height="32" version="1.1" viewBox="0 0 16 16" width="32"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg>
</a>
<button class="btn-link float-right site-header-toggle js-details-target" type="button" aria-label="Toggle navigation">
<svg aria-hidden="true" class="octicon octicon-three-bars" height="24" version="1.1" viewBox="0 0 12 16" width="18"><path d="M11.41 9H.59C0 9 0 8.59 0 8c0-.59 0-1 .59-1H11.4c.59 0 .59.41.59 1 0 .59 0 1-.59 1h.01zm0-4H.59C0 5 0 4.59 0 4c0-.59 0-1 .59-1H11.4c.59 0 .59.41.59 1 0 .59 0 1-.59 1h.01zM.59 11H11.4c.59 0 .59.41.59 1 0 .59 0 1-.59 1H.59C0 13 0 12.59 0 12c0-.59 0-1 .59-1z"></path></svg>
</button>
<div class="site-header-menu">
<nav class="site-header-nav site-header-nav-main">
<a href="/personal" class="js-selected-navigation-item nav-item nav-item-personal" data-ga-click="Header, click, Nav menu - item:personal" data-selected-links="/personal /personal">
Personal
</a> <a href="/open-source" class="js-selected-navigation-item nav-item nav-item-opensource" data-ga-click="Header, click, Nav menu - item:opensource" data-selected-links="/open-source /open-source">
Open source
</a> <a href="/business" class="js-selected-navigation-item nav-item nav-item-business" data-ga-click="Header, click, Nav menu - item:business" data-selected-links="/business /business/partners /business/features /business/customers /business">
Business
</a> <a href="/explore" class="js-selected-navigation-item nav-item nav-item-explore" data-ga-click="Header, click, Nav menu - item:explore" data-selected-links="/explore /trending /trending/developers /integrations /integrations/feature/code /integrations/feature/collaborate /integrations/feature/ship /explore">
Explore
</a> </nav>
<div class="site-header-actions">
<a class="btn btn-primary site-header-actions-btn" href="/join?source=header-repo" data-ga-click="(Logged out) Header, clicked Sign up, text:sign-up">Sign up</a>
<a class="btn site-header-actions-btn mr-2" href="/login?return_to=%2Fgoogle%2Fmaterial-design-icons%2Fblob%2Fmaster%2Ficonfont%2FMaterialIcons-Regular.svg" data-ga-click="(Logged out) Header, clicked Sign in, text:sign-in">Sign in</a>
</div>
<nav class="site-header-nav site-header-nav-secondary">
<a class="nav-item" href="/pricing">Pricing</a>
<a class="nav-item" href="/blog">Blog</a>
<a class="nav-item" href="https://help.github.com">Support</a>
<a class="nav-item header-search-link" href="https://github.com/search">Search GitHub</a>
<div class="header-search scoped-search site-scoped-search js-site-search" role="search">
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/google/material-design-icons/search" class="js-site-search-form" data-scoped-search-url="/google/material-design-icons/search" data-unscoped-search-url="/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
<label class="form-control header-search-wrapper js-chromeless-input-container">
<div class="header-search-scope">This repository</div>
<input type="text"
class="form-control header-search-input js-site-search-focus js-site-search-field is-clearable"
data-hotkey="s"
name="q"
placeholder="Search"
aria-label="Search this repository"
data-unscoped-placeholder="Search GitHub"
data-scoped-placeholder="Search"
autocapitalize="off">
</label>
</form></div>
</nav>
</div>
</div>
</header>
<div id="start-of-content" class="accessibility-aid"></div>
<div id="js-flash-container">
</div>
<div role="main">
<div itemscope itemtype="http://schema.org/SoftwareSourceCode">
<div id="js-repo-pjax-container" data-pjax-container>
<div class="pagehead repohead instapaper_ignore readability-menu experiment-repo-nav">
<div class="container repohead-details-container">
<ul class="pagehead-actions">
<li>
<a href="/login?return_to=%2Fgoogle%2Fmaterial-design-icons"
class="btn btn-sm btn-with-count tooltipped tooltipped-n"
aria-label="You must be signed in to watch a repository" rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"></path></svg>
Watch
</a>
<a class="social-count" href="/google/material-design-icons/watchers"
aria-label="1528 users are watching this repository">
1,528
</a>
</li>
<li>
<a href="/login?return_to=%2Fgoogle%2Fmaterial-design-icons"
class="btn btn-sm btn-with-count tooltipped tooltipped-n"
aria-label="You must be signed in to star a repository" rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"></path></svg>
Star
</a>
<a class="social-count js-social-count" href="/google/material-design-icons/stargazers"
aria-label="26399 users starred this repository">
26,399
</a>
</li>
<li>
<a href="/login?return_to=%2Fgoogle%2Fmaterial-design-icons"
class="btn btn-sm btn-with-count tooltipped tooltipped-n"
aria-label="You must be signed in to fork a repository" rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-repo-forked" height="16" version="1.1" viewBox="0 0 10 16" width="10"><path d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"></path></svg>
Fork
</a>
<a href="/google/material-design-icons/network" class="social-count"
aria-label="5002 users are forked this repository">
5,002
</a>
</li>
</ul>
<h1 class="public ">
<svg aria-hidden="true" class="octicon octicon-repo" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"></path></svg>
<span class="author" itemprop="author"><a href="/google" class="url fn" rel="author">google</a></span><!--
--><span class="path-divider">/</span><!--
--><strong itemprop="name"><a href="/google/material-design-icons" data-pjax="#js-repo-pjax-container">material-design-icons</a></strong>
</h1>
</div>
<div class="container">
<nav class="reponav js-repo-nav js-sidenav-container-pjax"
itemscope
itemtype="http://schema.org/BreadcrumbList"
role="navigation"
data-pjax="#js-repo-pjax-container">
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a href="/google/material-design-icons" aria-selected="true" class="js-selected-navigation-item selected reponav-item" data-hotkey="g c" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches /google/material-design-icons" itemprop="url">
<svg aria-hidden="true" class="octicon octicon-code" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M9.5 3L8 4.5 11.5 8 8 11.5 9.5 13 14 8 9.5 3zm-5 0L0 8l4.5 5L6 11.5 2.5 8 6 4.5 4.5 3z"></path></svg>
<span itemprop="name">Code</span>
<meta itemprop="position" content="1">
</a> </span>
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a href="/google/material-design-icons/issues" class="js-selected-navigation-item reponav-item" data-hotkey="g i" data-selected-links="repo_issues repo_labels repo_milestones /google/material-design-icons/issues" itemprop="url">
<svg aria-hidden="true" class="octicon octicon-issue-opened" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg>
<span itemprop="name">Issues</span>
<span class="counter">228</span>
<meta itemprop="position" content="2">
</a> </span>
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a href="/google/material-design-icons/pulls" class="js-selected-navigation-item reponav-item" data-hotkey="g p" data-selected-links="repo_pulls /google/material-design-icons/pulls" itemprop="url">
<svg aria-hidden="true" class="octicon octicon-git-pull-request" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M11 11.28V5c-.03-.78-.34-1.47-.94-2.06C9.46 2.35 8.78 2.03 8 2H7V0L4 3l3 3V4h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28A1.993 1.993 0 0 0 10 15a1.993 1.993 0 0 0 1-3.72zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zM4 3c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v6.56A1.993 1.993 0 0 0 2 15a1.993 1.993 0 0 0 1-3.72V4.72c.59-.34 1-.98 1-1.72zm-.8 10c0 .66-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"></path></svg>
<span itemprop="name">Pull requests</span>
<span class="counter">10</span>
<meta itemprop="position" content="3">
</a> </span>
<a href="/google/material-design-icons/projects" class="js-selected-navigation-item reponav-item" data-selected-links="repo_projects new_repo_project repo_project /google/material-design-icons/projects">
<svg class="octicon" aria-hidden="true" version="1.1" width="15" height="16" viewBox="0 0 15 16">
<path d="M1 15h13V1H1v14zM15 1v14a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1zm-4.41 11h1.82c.59 0 .59-.41.59-1V3c0-.59 0-1-.59-1h-1.82C10 2 10 2.41 10 3v8c0 .59 0 1 .59 1zm-4-2h1.82C9 10 9 9.59 9 9V3c0-.59 0-1-.59-1H6.59C6 2 6 2.41 6 3v6c0 .59 0 1 .59 1zM2 13V3c0-.59 0-1 .59-1h1.82C5 2 5 2.41 5 3v10c0 .59 0 1-.59 1H2.59C2 14 2 13.59 2 13z"></path>
</svg>
Projects
<span class="counter">0</span>
</a>
<a href="/google/material-design-icons/wiki" class="js-selected-navigation-item reponav-item" data-hotkey="g w" data-selected-links="repo_wiki /google/material-design-icons/wiki">
<svg aria-hidden="true" class="octicon octicon-book" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z"></path></svg>
Wiki
</a>
<a href="/google/material-design-icons/pulse" class="js-selected-navigation-item reponav-item" data-selected-links="pulse /google/material-design-icons/pulse">
<svg aria-hidden="true" class="octicon octicon-pulse" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M11.5 8L8.8 5.4 6.6 8.5 5.5 1.6 2.38 8H0v2h3.6l.9-1.8.9 5.4L9 8.5l1.6 1.5H14V8z"></path></svg>
Pulse
</a>
<a href="/google/material-design-icons/graphs" class="js-selected-navigation-item reponav-item" data-selected-links="repo_graphs repo_contributors /google/material-design-icons/graphs">
<svg aria-hidden="true" class="octicon octicon-graph" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M16 14v1H0V0h1v14h15zM5 13H3V8h2v5zm4 0H7V3h2v10zm4 0h-2V6h2v7z"></path></svg>
Graphs
</a>
</nav>
</div>
</div>
<div class="container new-discussion-timeline experiment-repo-nav">
<div class="repository-content">
<a href="/google/material-design-icons/blob/a6145e167b4a3a65640dd6279319cbc77a7e4e96/iconfont/MaterialIcons-Regular.svg" class="d-none js-permalink-shortcut" data-hotkey="y">Permalink</a>
<!-- blob contrib key: blob_contributors:v21:cf39e9ea85e4005171b4298f79962d3a -->
<div class="file-navigation js-zeroclipboard-container">
<div class="select-menu branch-select-menu js-menu-container js-select-menu float-left">
<button class="btn btn-sm select-menu-button js-menu-target css-truncate" data-hotkey="w"
type="button" aria-label="Switch branches or tags" tabindex="0" aria-haspopup="true">
<i>Branch:</i>
<span class="js-select-button css-truncate-target">master</span>
</button>
<div class="select-menu-modal-holder js-menu-content js-navigation-container" data-pjax aria-hidden="true">
<div class="select-menu-modal">
<div class="select-menu-header">
<svg aria-label="Close" class="octicon octicon-x js-menu-close" height="16" role="img" version="1.1" viewBox="0 0 12 16" width="12"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
<span class="select-menu-title">Switch branches/tags</span>
</div>
<div class="select-menu-filters">
<div class="select-menu-text-filter">
<input type="text" aria-label="Filter branches/tags" id="context-commitish-filter-field" class="form-control js-filterable-field js-navigation-enable" placeholder="Filter branches/tags">
</div>
<div class="select-menu-tabs">
<ul>
<li class="select-menu-tab">
<a href="#" data-tab-filter="branches" data-filter-placeholder="Filter branches/tags" class="js-select-menu-tab" role="tab">Branches</a>
</li>
<li class="select-menu-tab">
<a href="#" data-tab-filter="tags" data-filter-placeholder="Find a tag…" class="js-select-menu-tab" role="tab">Tags</a>
</li>
</ul>
</div>
</div>
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="branches" role="menu">
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/blob/2.1.0-update/iconfont/MaterialIcons-Regular.svg"
data-name="2.1.0-update"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
2.1.0-update
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/blob/2.2.0/iconfont/MaterialIcons-Regular.svg"
data-name="2.2.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
2.2.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/blob/apache_license/iconfont/MaterialIcons-Regular.svg"
data-name="apache_license"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
apache_license
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/blob/fix-apache-license/iconfont/MaterialIcons-Regular.svg"
data-name="fix-apache-license"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
fix-apache-license
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/blob/generate-device-sprites/iconfont/MaterialIcons-Regular.svg"
data-name="generate-device-sprites"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
generate-device-sprites
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/blob/gh-pages/iconfont/MaterialIcons-Regular.svg"
data-name="gh-pages"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
gh-pages
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open selected"
href="/google/material-design-icons/blob/master/iconfont/MaterialIcons-Regular.svg"
data-name="master"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
master
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/blob/removal-of-gh-pages-from-master/iconfont/MaterialIcons-Regular.svg"
data-name="removal-of-gh-pages-from-master"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
removal-of-gh-pages-from-master
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/blob/update-license/iconfont/MaterialIcons-Regular.svg"
data-name="update-license"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
update-license
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/blob/version-info/iconfont/MaterialIcons-Regular.svg"
data-name="version-info"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
version-info
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/blob/woff2-correction/iconfont/MaterialIcons-Regular.svg"
data-name="woff2-correction"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
woff2-correction
</span>
</a>
</div>
<div class="select-menu-no-results">Nothing to show</div>
</div>
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="tags">
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/tree/v2.1.3/iconfont/MaterialIcons-Regular.svg"
data-name="v2.1.3"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="v2.1.3">
v2.1.3
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/tree/3.0.1/iconfont/MaterialIcons-Regular.svg"
data-name="3.0.1"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="3.0.1">
3.0.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/tree/3.0.0/iconfont/MaterialIcons-Regular.svg"
data-name="3.0.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="3.0.0">
3.0.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/tree/2.2.3/iconfont/MaterialIcons-Regular.svg"
data-name="2.2.3"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="2.2.3">
2.2.3
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/tree/2.2.2/iconfont/MaterialIcons-Regular.svg"
data-name="2.2.2"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="2.2.2">
2.2.2
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/tree/2.2.1/iconfont/MaterialIcons-Regular.svg"
data-name="2.2.1"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="2.2.1">
2.2.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/tree/2.2.0/iconfont/MaterialIcons-Regular.svg"
data-name="2.2.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="2.2.0">
2.2.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/tree/2.1.1/iconfont/MaterialIcons-Regular.svg"
data-name="2.1.1"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="2.1.1">
2.1.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/tree/2.1/iconfont/MaterialIcons-Regular.svg"
data-name="2.1"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="2.1">
2.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/tree/2.0.0/iconfont/MaterialIcons-Regular.svg"
data-name="2.0.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="2.0.0">
2.0.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/tree/2.0/iconfont/MaterialIcons-Regular.svg"
data-name="2.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="2.0">
2.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/tree/1.0.2/iconfont/MaterialIcons-Regular.svg"
data-name="1.0.2"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="1.0.2">
1.0.2
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/tree/1.0.2b/iconfont/MaterialIcons-Regular.svg"
data-name="1.0.2b"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="1.0.2b">
1.0.2b
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/tree/1.0.1/iconfont/MaterialIcons-Regular.svg"
data-name="1.0.1"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="1.0.1">
1.0.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/tree/1.0.0/iconfont/MaterialIcons-Regular.svg"
data-name="1.0.0"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="1.0.0">
1.0.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/google/material-design-icons/tree/1.0.0-pre/iconfont/MaterialIcons-Regular.svg"
data-name="1.0.0-pre"
data-skip-pjax="true"
rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
<span class="select-menu-item-text css-truncate-target" title="1.0.0-pre">
1.0.0-pre
</span>
</a>
</div>
<div class="select-menu-no-results">Nothing to show</div>
</div>
</div>
</div>
</div>
<div class="BtnGroup float-right">
<a href="/google/material-design-icons/find/master"
class="js-pjax-capture-input btn btn-sm BtnGroup-item"
data-pjax
data-hotkey="t">
Find file
</a>
<button aria-label="Copy file path to clipboard" class="js-zeroclipboard btn btn-sm BtnGroup-item tooltipped tooltipped-s" data-copied-hint="Copied!" type="button">Copy path</button>
</div>
<div class="breadcrumb js-zeroclipboard-target">
<span class="repo-root js-repo-root"><span class="js-path-segment"><a href="/google/material-design-icons"><span>material-design-icons</span></a></span></span><span class="separator">/</span><span class="js-path-segment"><a href="/google/material-design-icons/tree/master/iconfont"><span>iconfont</span></a></span><span class="separator">/</span><strong class="final-path">MaterialIcons-Regular.svg</strong>
</div>
</div>
<div class="commit-tease">
<span class="right">
<a class="commit-tease-sha" href="/google/material-design-icons/commit/ac75e8329cc936816f1c5e2de182858efe7530ab" data-pjax>
ac75e83
</a>
<relative-time datetime="2016-02-08T22:05:52Z">Feb 9, 2016</relative-time>
</span>
<div>
<img alt="@shyndman" class="avatar" height="20" src="https://avatars0.githubusercontent.com/u/42326?v=3&amp;s=40" width="20" />
<a href="/shyndman" class="user-mention" rel="contributor">shyndman</a>
<a href="/google/material-design-icons/commit/ac75e8329cc936816f1c5e2de182858efe7530ab" class="message" data-pjax="true" title="2.2.0 release -- 41 new icons!">2.2.0 release -- 41 new icons!</a>
</div>
<div class="commit-tease-contributors">
<button type="button" class="btn-link muted-link contributors-toggle" data-facebox="#blob_contributors_box">
<strong>1</strong>
contributor
</button>
</div>
<div id="blob_contributors_box" style="display:none">
<h2 class="facebox-header" data-facebox-id="facebox-header">Users who have contributed to this file</h2>
<ul class="facebox-user-list" data-facebox-id="facebox-description">
<li class="facebox-user-list-item">
<img alt="@shyndman" height="24" src="https://avatars2.githubusercontent.com/u/42326?v=3&amp;s=48" width="24" />
<a href="/shyndman">shyndman</a>
</li>
</ul>
</div>
</div>
<div class="file">
<div class="file-header">
<div class="file-actions">
<div class="BtnGroup">
<a class="btn btn-sm BtnGroup-item tooltipped tooltipped tooltipped-n source "
href="/google/material-design-icons/blob/master/iconfont/MaterialIcons-Regular.svg?short_path=a449327" aria-label="Display the source blob">
<svg aria-hidden="true" class="octicon octicon-code" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M9.5 3L8 4.5 11.5 8 8 11.5 9.5 13 14 8 9.5 3zm-5 0L0 8l4.5 5L6 11.5 2.5 8 6 4.5 4.5 3z"></path></svg>
</a>
<a class="btn btn-sm BtnGroup-item tooltipped tooltipped-n rendered selected"
href="/google/material-design-icons/blob/master/iconfont/MaterialIcons-Regular.svg" aria-label="Display the rendered blob">
<svg aria-hidden="true" class="octicon octicon-file-text" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M6 5H2V4h4v1zM2 8h7V7H2v1zm0 2h7V9H2v1zm0 2h7v-1H2v1zm10-7.5V14c0 .55-.45 1-1 1H1c-.55 0-1-.45-1-1V2c0-.55.45-1 1-1h7.5L12 4.5zM11 5L8 2H1v12h10V5z"></path></svg>
</a>
</div>
<div class="BtnGroup">
<a href="/google/material-design-icons/raw/master/iconfont/MaterialIcons-Regular.svg" class="btn btn-sm BtnGroup-item" id="raw-url">Raw</a>
<a href="/google/material-design-icons/blame/master/iconfont/MaterialIcons-Regular.svg" class="btn btn-sm js-update-url-with-hash BtnGroup-item">Blame</a>
<a href="/google/material-design-icons/commits/master/iconfont/MaterialIcons-Regular.svg" class="btn btn-sm BtnGroup-item" rel="nofollow">History</a>
</div>
<button type="button" class="btn-octicon disabled tooltipped tooltipped-nw"
aria-label="You must be signed in to make or propose changes">
<svg aria-hidden="true" class="octicon octicon-pencil" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M0 12v3h3l8-8-3-3-8 8zm3 2H1v-2h1v1h1v1zm10.3-9.3L12 6 9 3l1.3-1.3a.996.996 0 0 1 1.41 0l1.59 1.59c.39.39.39 1.02 0 1.41z"></path></svg>
</button>
<button type="button" class="btn-octicon btn-octicon-danger disabled tooltipped tooltipped-nw"
aria-label="You must be signed in to make or propose changes">
<svg aria-hidden="true" class="octicon octicon-trashcan" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M11 2H9c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1H2c-.55 0-1 .45-1 1v1c0 .55.45 1 1 1v9c0 .55.45 1 1 1h7c.55 0 1-.45 1-1V5c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm-1 12H3V5h1v8h1V5h1v8h1V5h1v8h1V5h1v9zm1-10H2V3h9v1z"></path></svg>
</button>
</div>
<div class="file-info">
2374 lines (2373 sloc)
<span class="file-info-divider"></span>
275 KB
</div>
</div>
<div itemprop="text" class="blob-wrapper data type-svg">
<div class="render-wrapper">
<div class="render-container is-render-pending js-render-target "
data-identity="1bef4ae2-c60a-4b20-a112-9dbc2ae5a06b"
data-host="https://render.githubusercontent.com"
data-type="svg">
<img alt="" class="octospinner" height="64" src="https://assets-cdn.github.com/images/spinners/octocat-spinner-128.gif" width="64" />
<div class="render-viewer-error">Sorry, something went wrong. <a href="https://github.com/google/material-design-icons/blob/master/iconfont/MaterialIcons-Regular.svg">Reload?</a></div>
<div class="render-viewer-fatal">Sorry, we cannot display this file.</div>
<div class="render-viewer-invalid">Sorry, this file is invalid so it cannot be displayed.</div>
<iframe class="render-viewer" src="https://render.githubusercontent.com/view/svg?commit=a6145e167b4a3a65640dd6279319cbc77a7e4e96&amp;enc_url=68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f676f6f676c652f6d6174657269616c2d64657369676e2d69636f6e732f613631343565313637623461336136353634306464363237393331396362633737613765346539362f69636f6e666f6e742f4d6174657269616c49636f6e732d526567756c61722e737667&amp;nwo=google%2Fmaterial-design-icons&amp;path=iconfont%2FMaterialIcons-Regular.svg&amp;repository_id=24953448#1bef4ae2-c60a-4b20-a112-9dbc2ae5a06b" sandbox="allow-scripts allow-same-origin allow-top-navigation">Viewer requires iframe.</iframe>
</div>
</div>
</div>
</div>
<button type="button" data-facebox="#jump-to-line" data-facebox-class="linejump" data-hotkey="l" class="d-none">Jump to Line</button>
<div id="jump-to-line" style="display:none">
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="" class="js-jump-to-line-form" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
<input class="form-control linejump-input js-jump-to-line-field" type="text" placeholder="Jump to line&hellip;" aria-label="Jump to line" autofocus>
<button type="submit" class="btn">Go</button>
</form></div>
</div>
<div class="modal-backdrop js-touch-events"></div>
</div>
</div>
</div>
</div>
<div class="container site-footer-container">
<div class="site-footer" role="contentinfo">
<ul class="site-footer-links float-right">
<li><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact GitHub</a></li>
<li><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
<li><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
<li><a href="https://shop.github.com" data-ga-click="Footer, go to shop, text:shop">Shop</a></li>
<li><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
<li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li>
</ul>
<a href="https://github.com" aria-label="Homepage" class="site-footer-mark" title="GitHub">
<svg aria-hidden="true" class="octicon octicon-mark-github" height="24" version="1.1" viewBox="0 0 16 16" width="24"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg>
</a>
<ul class="site-footer-links">
<li>&copy; 2016 <span title="0.06161s from github-fe162-cp1-prd.iad.github.net">GitHub</span>, Inc.</li>
<li><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li>
<li><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li>
<li><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li>
<li><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
<li><a href="https://help.github.com" data-ga-click="Footer, go to help, text:help">Help</a></li>
</ul>
</div>
</div>
<div id="ajax-error-message" class="ajax-error-message flash flash-error">
<svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"></path></svg>
<button type="button" class="flash-close js-flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
<svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
</button>
You can't perform that action at this time.
</div>
<script crossorigin="anonymous" integrity="sha256-UkOt6gRG+T2/d6+yEJixISCaJ41MlkKZuMQ4UaJqOvQ=" src="https://assets-cdn.github.com/assets/frameworks-5243adea0446f93dbf77afb21098b121209a278d4c964299b8c43851a26a3af4.js"></script>
<script async="async" crossorigin="anonymous" integrity="sha256-XqiTA5NotL3FQ2QWE7+otla8ZFs5QqulfuVWw46QDZQ=" src="https://assets-cdn.github.com/assets/github-5ea893039368b4bdc543641613bfa8b656bc645b3942aba57ee556c38e900d94.js"></script>
<div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner d-none">
<svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"></path></svg>
<span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
<span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
</div>
<div class="facebox" id="facebox" style="display:none;">
<div class="facebox-popup">
<div class="facebox-content" role="dialog" aria-labelledby="facebox-header" aria-describedby="facebox-description">
</div>
<button type="button" class="facebox-close js-facebox-close" aria-label="Close modal">
<svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
</button>
</div>
</div>
</body>
</html>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -1 +0,0 @@
/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */.fancybox-wrap,.fancybox-skin,.fancybox-outer,.fancybox-inner,.fancybox-image,.fancybox-wrap iframe,.fancybox-wrap object,.fancybox-nav,.fancybox-nav span,.fancybox-tmp{padding:0;margin:0;border:0;outline:0;vertical-align:top}.fancybox-wrap{position:absolute;top:0;left:0;z-index:8020}.fancybox-skin{position:relative;background:#f9f9f9;color:#444;text-shadow:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.fancybox-opened{z-index:8030}.fancybox-opened .fancybox-skin{-webkit-box-shadow:0 10px 25px rgba(0,0,0,0.5);-moz-box-shadow:0 10px 25px rgba(0,0,0,0.5);box-shadow:0 10px 25px rgba(0,0,0,0.5)}.fancybox-outer,.fancybox-inner{position:relative}.fancybox-inner{overflow:hidden}.fancybox-type-iframe .fancybox-inner{-webkit-overflow-scrolling:touch}.fancybox-error{color:#444;font:14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;margin:0;padding:15px;white-space:nowrap}.fancybox-image,.fancybox-iframe{display:block;width:100%;height:100%}.fancybox-image{max-width:100%;max-height:100%}#fancybox-loading,.fancybox-close,.fancybox-prev span,.fancybox-next span{background-image:url('fancybox/fancybox_sprite.png')}#fancybox-loading{position:fixed;top:50%;left:50%;margin-top:-22px;margin-left:-22px;background-position:0 -108px;opacity:.8;cursor:pointer;z-index:8060}#fancybox-loading div{width:44px;height:44px;background:url('fancybox/fancybox_loading.gif') center center no-repeat}.fancybox-close{position:absolute;top:-18px;right:-18px;width:36px;height:36px;cursor:pointer;z-index:8040}.fancybox-nav{position:absolute;top:0;width:40%;height:100%;cursor:pointer;text-decoration:none;background:transparent url('fancybox/blank.gif');-webkit-tap-highlight-color:rgba(0,0,0,0);z-index:8040}.fancybox-prev{left:0}.fancybox-next{right:0}.fancybox-nav span{position:absolute;top:50%;width:36px;height:34px;margin-top:-18px;cursor:pointer;z-index:8040;visibility:hidden}.fancybox-prev span{left:10px;background-position:0 -36px}.fancybox-next span{right:10px;background-position:0 -72px}.fancybox-nav:hover span{visibility:visible}.fancybox-tmp{position:absolute;top:-99999px;left:-99999px;visibility:hidden;max-width:99999px;max-height:99999px;overflow:visible !important}.fancybox-lock{overflow:hidden !important;width:auto}.fancybox-lock body{overflow:hidden !important}.fancybox-lock-test{overflow-y:hidden !important}.fancybox-overlay{position:absolute;top:0;left:0;overflow:hidden;display:none;z-index:8010;background:url('fancybox/fancybox_overlay.png')}.fancybox-overlay-fixed{position:fixed;bottom:0;right:0}.fancybox-lock .fancybox-overlay{overflow:auto;overflow-y:scroll}.fancybox-title{visibility:hidden;font:normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;position:relative;text-shadow:none;z-index:8050}.fancybox-opened .fancybox-title{visibility:visible}.fancybox-title-float-wrap{position:absolute;bottom:0;right:50%;margin-bottom:-35px;z-index:8050;text-align:center}.fancybox-title-float-wrap .child{display:inline-block;margin-right:-100%;padding:2px 20px;background:transparent;background:rgba(0,0,0,0.8);-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;text-shadow:0 1px 2px #222;color:#FFF;font-weight:bold;line-height:24px;white-space:nowrap}.fancybox-title-outside-wrap{position:relative;margin-top:10px;color:#fff}.fancybox-title-inside-wrap{padding-top:10px}.fancybox-title-over-wrap{position:absolute;bottom:0;left:0;color:#fff;padding:10px;background:#000;background:rgba(0,0,0,.8)}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){#fancybox-loading,.fancybox-close,.fancybox-prev span,.fancybox-next span{background-image:url('fancybox/fancybox_sprite@2x.png');background-size:44px 152px}#fancybox-loading div{background-image:url('fancybox/fancybox_loading@2x.gif');background-size:24px 24px}}

View File

@@ -1 +1 @@
div.tagsinput{border:1px solid #CCC;background:#FFF;padding:5px;width:300px;height:100px;overflow-y:auto}div.tagsinput span.tag{border:1px solid #a5d24a;-moz-border-radius:2px;-webkit-border-radius:2px;display:block;float:left;padding:5px;text-decoration:none;background:#cde69c;color:#638421;margin-right:5px;margin-bottom:5px;font-family:helvetica;font-size:13px}div.tagsinput span.tag a{font-weight:bold;color:#82ad2b;text-decoration:none;font-size:11px}div.tagsinput input{width:80px;margin:0;font-family:helvetica;font-size:13px;border:1px solid transparent;padding:5px;background:transparent;color:#000;outline:0;margin-right:5px;margin-bottom:5px}div.tagsinput div{display:block;float:left}.tags_clear{clear:both;width:100%;height:0}.not_valid{background:#fbd8db !important;color:#90111a !important}div.tagsinput{border:1px solid #dfdfdf;background-color:#fffef0;box-shadow:0 0 8px rgba(0,0,0,0.075) inset;border-radius:5px}div.tagsinput span.tag{width:62px}div.tagsinput input{width:120px}div.tagsinput span.tag{background:url("images/ui-bg_glass_75_e6e6e6_1x400.png") repeat-x scroll 50% 50% #e6e6e6;border:1px solid #d3d3d3;color:#555}div.tagsinput span.tag a{color:#555}
div.tagsinput{border:1px solid #CCC;background:#FFF;padding:5px;width:300px;height:100px;overflow-y:auto}div.tagsinput span.tag{border:1px solid #a5d24a;-moz-border-radius:2px;-webkit-border-radius:2px;display:block;float:left;padding:5px;text-decoration:none;background:#cde69c;color:#638421;margin-right:5px;margin-bottom:5px;font-family:helvetica;font-size:13px}div.tagsinput span.tag a{font-weight:bold;color:#82ad2b;text-decoration:none;font-size:11px}div.tagsinput input{width:80px;margin:0;font-family:helvetica;font-size:13px;border:1px solid transparent;padding:5px;background:transparent;color:#000;outline:0;margin-right:5px;margin-bottom:5px}div.tagsinput div{display:block;float:left}.tags_clear{clear:both;width:100%;height:0}.not_valid{background:#fbd8db !important;color:#90111a !important}div.tagsinput{border:1px solid #dfdfdf;background-color:#fffef0;box-shadow:0 0 8px rgba(0,0,0,0.075) inset;border-radius:5px}div.tagsinput span.tag{min-width:62px}div.tagsinput input{width:120px}div.tagsinput span.tag{background:url("images/ui-bg_glass_75_e6e6e6_1x400.png") repeat-x scroll 50% 50% #e6e6e6;border:1px solid #d3d3d3;color:#555}div.tagsinput span.tag a{color:#555}

374
css/magnific-popup.css Normal file
View File

@@ -0,0 +1,374 @@
/*
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
/* Magnific Popup CSS */
.mfp-bg {
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1042;
overflow: hidden;
position: fixed;
background: #0b0b0b;
opacity: 0.5; }
.mfp-wrap {
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1043;
position: fixed;
outline: none !important;
-webkit-backface-visibility: hidden; }
.mfp-container {
text-align: center;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
padding: 0 8px;
box-sizing: border-box; }
.mfp-container:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle; }
.mfp-align-top .mfp-container:before {
display: none; }
.mfp-content {
position: relative;
display: inline-block;
vertical-align: middle;
margin: 0 auto;
text-align: left;
z-index: 1045; }
.mfp-inline-holder .mfp-content,
.mfp-ajax-holder .mfp-content {
width: 100%;
cursor: auto; }
.mfp-ajax-cur {
cursor: progress; }
.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
cursor: -moz-zoom-out;
cursor: -webkit-zoom-out;
cursor: zoom-out; }
.mfp-zoom {
cursor: pointer;
cursor: -webkit-zoom-in;
cursor: -moz-zoom-in;
cursor: zoom-in; }
.mfp-auto-cursor .mfp-content {
cursor: auto; }
.mfp-close,
.mfp-arrow,
.mfp-preloader,
.mfp-counter {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none; }
.mfp-loading.mfp-figure {
display: none; }
.mfp-hide {
display: none !important; }
.mfp-preloader {
color: #CCC;
position: absolute;
top: 50%;
width: auto;
text-align: center;
margin-top: -0.8em;
left: 8px;
right: 8px;
z-index: 1044; }
.mfp-preloader a {
color: #CCC; }
.mfp-preloader a:hover {
color: #FFF; }
.mfp-s-ready .mfp-preloader {
display: none; }
.mfp-s-error .mfp-content {
display: none; }
button.mfp-close,
button.mfp-arrow {
overflow: visible;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none;
display: block;
outline: none;
padding: 0;
z-index: 1046;
box-shadow: none;
touch-action: manipulation; }
button::-moz-focus-inner {
padding: 0;
border: 0; }
.mfp-close {
width: 44px;
height: 44px;
line-height: 44px;
position: absolute;
right: 0;
top: 0;
text-decoration: none;
text-align: center;
opacity: 0.65;
padding: 0 0 18px 10px;
color: #FFF;
font-style: normal;
font-size: 28px;
font-family: Arial, Baskerville, monospace; }
.mfp-close:hover,
.mfp-close:focus {
opacity: 1; }
.mfp-close:active {
top: 1px; }
.mfp-close-btn-in .mfp-close {
color: #333; }
.mfp-image-holder .mfp-close,
.mfp-iframe-holder .mfp-close {
color: #FFF;
right: -6px;
text-align: right;
padding-right: 6px;
width: 100%; }
.mfp-counter {
position: absolute;
top: 0;
right: 0;
color: #CCC;
font-size: 12px;
line-height: 18px;
white-space: nowrap; }
.mfp-arrow {
position: absolute;
opacity: 0.65;
margin: 0;
top: 50%;
margin-top: -55px;
padding: 0;
width: 90px;
height: 110px;
-webkit-tap-highlight-color: transparent; }
.mfp-arrow:active {
margin-top: -54px; }
.mfp-arrow:hover,
.mfp-arrow:focus {
opacity: 1; }
.mfp-arrow:before,
.mfp-arrow:after {
content: '';
display: block;
width: 0;
height: 0;
position: absolute;
left: 0;
top: 0;
margin-top: 35px;
margin-left: 35px;
border: medium inset transparent; }
.mfp-arrow:after {
border-top-width: 13px;
border-bottom-width: 13px;
top: 8px; }
.mfp-arrow:before {
border-top-width: 21px;
border-bottom-width: 21px;
opacity: 0.7; }
.mfp-arrow-left {
left: 0; }
.mfp-arrow-left:after {
border-right: 17px solid #FFF;
margin-left: 31px; }
.mfp-arrow-left:before {
margin-left: 25px;
border-right: 27px solid #3F3F3F; }
.mfp-arrow-right {
right: 0; }
.mfp-arrow-right:after {
border-left: 17px solid #FFF;
margin-left: 39px; }
.mfp-arrow-right:before {
border-left: 27px solid #3F3F3F; }
.mfp-iframe-holder {
padding-top: 40px;
padding-bottom: 40px; }
.mfp-iframe-holder .mfp-content {
line-height: 0;
width: 100%;
max-width: 900px; }
.mfp-iframe-holder .mfp-close {
top: -40px; }
.mfp-iframe-scaler {
width: 100%;
height: 0;
overflow: hidden;
padding-top: 56.25%; }
.mfp-iframe-scaler iframe {
position: absolute;
display: block;
top: 0;
left: 0;
width: 100%;
height: 100%;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
background: #000; }
/* Main image in popup */
img.mfp-img {
width: auto;
max-width: 100%;
height: auto;
display: block;
line-height: 0;
box-sizing: border-box;
padding: 40px 0 40px;
margin: 0 auto; }
/* The shadow behind the image */
.mfp-figure {
line-height: 0; }
.mfp-figure:after {
content: '';
position: absolute;
left: 0;
top: 40px;
bottom: 40px;
display: block;
right: 0;
width: auto;
height: auto;
z-index: -1;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
background: #444; }
.mfp-figure small {
color: #BDBDBD;
display: block;
font-size: 12px;
line-height: 14px; }
.mfp-figure figure {
margin: 0; }
.mfp-bottom-bar {
margin-top: -36px;
position: absolute;
top: 100%;
left: 0;
width: 100%;
cursor: auto; }
.mfp-title {
text-align: left;
line-height: 18px;
color: #F3F3F3;
word-wrap: break-word;
padding-right: 36px; }
.mfp-image-holder .mfp-content {
max-width: 100%; }
.mfp-gallery .mfp-image-holder .mfp-figure {
cursor: pointer; }
@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
/**
* Remove all paddings around the image on small screen
*/
.mfp-img-mobile .mfp-image-holder {
padding-left: 0;
padding-right: 0; }
.mfp-img-mobile img.mfp-img {
padding: 0; }
.mfp-img-mobile .mfp-figure:after {
top: 0;
bottom: 0; }
.mfp-img-mobile .mfp-figure small {
display: inline;
margin-left: 5px; }
.mfp-img-mobile .mfp-bottom-bar {
background: rgba(0, 0, 0, 0.6);
bottom: 0;
margin: 0;
top: auto;
padding: 3px 5px;
position: fixed;
box-sizing: border-box; }
.mfp-img-mobile .mfp-bottom-bar:empty {
padding: 0; }
.mfp-img-mobile .mfp-counter {
right: 5px;
top: 3px; }
.mfp-img-mobile .mfp-close {
top: 0;
right: 0;
width: 35px;
height: 35px;
line-height: 35px;
background: rgba(0, 0, 0, 0.6);
position: fixed;
text-align: center;
padding: 0; } }
@media all and (max-width: 900px) {
.mfp-arrow {
-webkit-transform: scale(0.75);
transform: scale(0.75); }
.mfp-arrow-left {
-webkit-transform-origin: 0;
transform-origin: 0; }
.mfp-arrow-right {
-webkit-transform-origin: 100%;
transform-origin: 100%; }
.mfp-container {
padding-left: 6px;
padding-right: 6px; } }

1
css/magnific-popup.min.css vendored Normal file

File diff suppressed because one or more lines are too long

60
css/material-icons.css Normal file
View File

@@ -0,0 +1,60 @@
/*
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
/* Iconos de MDL */
.material-icons {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 24px; /* Preferred icon size */
display: inline-block;
width: 1em;
height: 1em;
line-height: 1;
text-transform: none;
letter-spacing: normal;
word-wrap: normal;
/* Support for all WebKit browsers. */
-webkit-font-smoothing: antialiased;
/* Support for Safari and Chrome. */
text-rendering: optimizeLegibility;
/* Support for Firefox. */
-moz-osx-font-smoothing: grayscale;
/* Support for IE. */
font-feature-settings: 'liga';
}
.material-icons.md-18 { font-size: 18px; }
.material-icons.md-24 { font-size: 24px; }
.material-icons.md-36 { font-size: 36px; }
.material-icons.md-48 { font-size: 48px; }
.material-icons.md-60 { font-size: 60px; }
.material-icons.md-dark { color: rgba(0, 0, 0, 0.54); }
.material-icons.md-dark.md-inactive { color: rgba(0, 0, 0, 0.26); }
.material-icons.md-light { color: rgba(255, 255, 255, 1); }
.material-icons.md-light.md-inactive { color: rgba(255, 255, 255, 0.3); }

2
css/reset.min.css vendored
View File

@@ -1 +1 @@
html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:middle;background:transparent}body{line-height:1}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}nav ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}a{margin:0;padding:0;font-size:100%;vertical-align:middle;background:transparent}ins{background-color:#ff9;color:#000;text-decoration:none}mark{background-color:#ff9;color:#000;font-style:italic;font-weight:bold}del{text-decoration:line-through}abbr[title],dfn[title]{border-bottom:1px dotted;cursor:help}table{border-spacing:0}hr{display:block;height:1px;border:0;border-top:1px solid #d9d9d9;margin:1em 0;padding:0}input,select{vertical-align:middle}
html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:middle;background:transparent}body{line-height:1}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}nav ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}a{margin:0;padding:0;font-size:100%;background:transparent}ins{background-color:#ff9;color:#000;text-decoration:none}mark{background-color:#ff9;color:#000;font-style:italic;font-weight:bold}del{text-decoration:line-through}abbr[title],dfn[title]{border-bottom:1px dotted;cursor:help}table{border-spacing:0}hr{display:block;height:1px;border:0;border-top:1px solid #d9d9d9;margin:1em 0;padding:0}input,select{vertical-align:middle}

251
css/toastr.css Normal file
View File

@@ -0,0 +1,251 @@
/*
* sysPass
*
* @author nuxsmin
* @link http://syspass.org
* @copyright 2012-2017, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
* sysPass is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sysPass is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
*/
.toast-title {
font-weight: bold;
}
.toast-message {
-ms-word-wrap: break-word;
word-wrap: break-word;
}
.toast-message a,
.toast-message label {
color: #FFFFFF;
}
.toast-message a:hover {
color: #CCCCCC;
text-decoration: none;
}
.toast-close-button {
position: relative;
right: -0.3em;
top: -0.3em;
float: right;
font-size: 20px;
font-weight: bold;
color: #FFFFFF;
-webkit-text-shadow: 0 1px 0 #ffffff;
text-shadow: 0 1px 0 #ffffff;
opacity: 0.8;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
filter: alpha(opacity=80);
line-height: 1;
}
.toast-close-button:hover,
.toast-close-button:focus {
color: #000000;
text-decoration: none;
cursor: pointer;
opacity: 0.4;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
filter: alpha(opacity=40);
}
.rtl .toast-close-button {
left: -0.3em;
float: left;
right: 0.3em;
}
/*Additional properties for button version
iOS requires the button element instead of an anchor tag.
If you want the anchor version, it requires `href="#"`.*/
button.toast-close-button {
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none;
}
.toast-top-center {
top: 0;
right: 0;
width: 100%;
}
.toast-bottom-center {
bottom: 0;
right: 0;
width: 100%;
}
.toast-top-full-width {
top: 0;
right: 0;
width: 100%;
}
.toast-bottom-full-width {
bottom: 0;
right: 0;
width: 100%;
}
.toast-top-left {
top: 12px;
left: 12px;
}
.toast-top-right {
top: 12px;
right: 12px;
}
.toast-bottom-right {
right: 12px;
bottom: 12px;
}
.toast-bottom-left {
bottom: 12px;
left: 12px;
}
#toast-container {
position: fixed;
z-index: 999999;
pointer-events: none;
/*overrides*/
}
#toast-container * {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#toast-container > div {
position: relative;
pointer-events: auto;
overflow: hidden;
margin: 0 0 6px;
padding: 15px 15px 15px 50px;
width: 300px;
-moz-border-radius: 3px 3px 3px 3px;
-webkit-border-radius: 3px 3px 3px 3px;
border-radius: 3px 3px 3px 3px;
background-position: 15px center;
background-repeat: no-repeat;
-moz-box-shadow: 0 0 12px #999999;
-webkit-box-shadow: 0 0 12px #999999;
box-shadow: 0 0 12px #999999;
color: #FFFFFF;
opacity: 0.8;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
filter: alpha(opacity=80);
}
#toast-container > div.rtl {
direction: rtl;
padding: 15px 50px 15px 15px;
background-position: right 15px center;
}
#toast-container > div:hover {
-moz-box-shadow: 0 0 12px #000000;
-webkit-box-shadow: 0 0 12px #000000;
box-shadow: 0 0 12px #000000;
opacity: 1;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
filter: alpha(opacity=100);
cursor: pointer;
}
#toast-container > .toast-info {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important;
}
#toast-container > .toast-error {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important;
}
#toast-container > .toast-success {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important;
}
#toast-container > .toast-warning {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important;
}
#toast-container.toast-top-center > div,
#toast-container.toast-bottom-center > div {
width: 300px;
margin-left: auto;
margin-right: auto;
}
#toast-container.toast-top-full-width > div,
#toast-container.toast-bottom-full-width > div {
width: 96%;
margin-left: auto;
margin-right: auto;
}
.toast {
background-color: #030303;
}
.toast-success {
background-color: #51A351;
}
.toast-error {
background-color: #BD362F;
}
.toast-info {
background-color: #2F96B4;
}
.toast-warning {
background-color: #F89406;
}
.toast-progress {
position: absolute;
left: 0;
bottom: 0;
height: 4px;
background-color: #000000;
opacity: 0.4;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
filter: alpha(opacity=40);
}
/*Responsive Design*/
@media all and (max-width: 240px) {
#toast-container > div {
padding: 8px 8px 8px 50px;
width: 11em;
}
#toast-container > div.rtl {
padding: 8px 50px 8px 8px;
}
#toast-container .toast-close-button {
right: -0.2em;
top: -0.2em;
}
#toast-container .rtl .toast-close-button {
left: -0.2em;
right: 0.2em;
}
}
@media all and (min-width: 241px) and (max-width: 480px) {
#toast-container > div {
padding: 8px 8px 8px 50px;
width: 18em;
}
#toast-container > div.rtl {
padding: 8px 50px 8px 8px;
}
#toast-container .toast-close-button {
right: -0.2em;
top: -0.2em;
}
#toast-container .rtl .toast-close-button {
left: -0.2em;
right: 0.2em;
}
}
@media all and (min-width: 481px) and (max-width: 768px) {
#toast-container > div {
padding: 15px 15px 15px 50px;
width: 25em;
}
#toast-container > div.rtl {
padding: 15px 50px 15px 15px;
}
}

1
css/toastr.min.css vendored Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Some files were not shown because too many files have changed in this diff Show More