mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-06 08:34:16 +01:00
* Closes #48. Passwords fields can be shown to check password characters.
* Fixes #52. User data query fit to required fields. * .PO files added to CVS * Additional checks for db connection
This commit is contained in:
@@ -781,7 +781,7 @@ footer img{border: none;width: 16px;height: 16px;vertical-align: middle;}
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.valField .ui-state-active, #tblTools .ui-state-active{
|
||||
.valField .ui-state-active, #tblTools .ui-state-active, #frmInstall .ui-state-active{
|
||||
background: url("smoothness/images/ui-bg_glass_75_ON_1x400.png") repeat-x scroll 50% 50% #ecfde4;
|
||||
}
|
||||
|
||||
|
||||
BIN
imgs/show.png
Normal file
BIN
imgs/show.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
@@ -404,7 +404,6 @@ class SP_Config
|
||||
self::setValue('demo_enabled', 0);
|
||||
self::setValue('files_enabled', 1);
|
||||
self::setValue('checkupdates', 1);
|
||||
|
||||
self::setValue('files_allowed_exts', 'PDF,JPG,GIF,PNG,ODT,ODS,DOC,DOCX,XLS,XSL,VSD,TXT,CSV,BAK');
|
||||
self::setValue('files_allowed_size', 1024);
|
||||
self::setValue('wiki_searchurl', '');
|
||||
@@ -416,7 +415,6 @@ class SP_Config
|
||||
self::setValue('ldap_userattr', '');
|
||||
self::setValue('mail_server', '');
|
||||
self::setValue('mail_from', '');
|
||||
self::setValue('wiki_filter', '');
|
||||
self::setValue('site_lang', str_replace('.utf8','',SP_Init::$LANG));
|
||||
self::setValue('session_timeout', '300');
|
||||
self::setValue('account_link', 1);
|
||||
|
||||
@@ -77,7 +77,7 @@ class DB
|
||||
*/
|
||||
private static function connection()
|
||||
{
|
||||
if (self::$_db) {
|
||||
if (is_object(self::$_db)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ class DB
|
||||
|
||||
self::$_db = @new mysqli($dbhost, $dbuser, $dbpass, $dbname);
|
||||
|
||||
if (self::$_db->connect_errno) {
|
||||
if (!is_object(self::$_db) || self::$_db->connect_errno) {
|
||||
if ($isInstalled) {
|
||||
if (self::$_db->connect_errno === 1049) {
|
||||
SP_Config::setValue('installed', '0');
|
||||
|
||||
@@ -193,9 +193,9 @@ class SP_Installer
|
||||
*/
|
||||
private static function checkDatabaseAdmin($dbhost, $dbadmin, $dbpass)
|
||||
{
|
||||
self::$dbc = new mysqli($dbhost, $dbadmin, $dbpass);
|
||||
self::$dbc = @new mysqli($dbhost, $dbadmin, $dbpass);
|
||||
|
||||
if (self::$dbc->connect_errno) {
|
||||
if (!is_object(self::$dbc) || self::$dbc->connect_errno) {
|
||||
throw new InstallerException('critical'
|
||||
, _('El usuario/clave de MySQL no es correcto')
|
||||
, _('Verifique el usuario de conexión con la Base de Datos'));
|
||||
|
||||
Binary file not shown.
3695
inc/locales/de_DE/LC_MESSAGES/messages.po
Normal file
3695
inc/locales/de_DE/LC_MESSAGES/messages.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
2994
inc/locales/en_US/LC_MESSAGES/messages.po
Normal file
2994
inc/locales/en_US/LC_MESSAGES/messages.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
3690
inc/locales/hu_HU/LC_MESSAGES/messages.po
Normal file
3690
inc/locales/hu_HU/LC_MESSAGES/messages.po
Normal file
File diff suppressed because it is too large
Load Diff
@@ -39,13 +39,14 @@ if (isset($_POST['install']) AND $_POST['install'] == 'true') {
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<div id="actions" align="center">
|
||||
<div id="logo">
|
||||
<img src="imgs/logo_full.png" alt="sysPass logo"/>
|
||||
<span ID="pageDesc"><?php echo _('Instalación ') . ' ' . SP_Util::getVersionString(); ?></span>
|
||||
</div>
|
||||
|
||||
<form action="index.php" method="post">
|
||||
<form id="frmInstall" action="index.php" method="post">
|
||||
<input type="hidden" name="install" value="true"/>
|
||||
|
||||
<?php
|
||||
@@ -83,13 +84,19 @@ if (isset($_POST['install']) AND $_POST['install'] == 'true') {
|
||||
<fieldset id="adminaccount">
|
||||
<legend><?php echo _('Crear cuenta de admin de sysPass'); ?></legend>
|
||||
<p>
|
||||
<img src="imgs/help.png" class="inputImg"
|
||||
title="<?php echo _('Login del usuario administrador de sysPass'); ?>"/>
|
||||
<input type="text" name="adminlogin" id="adminlogin" title="<?php echo _('Usuario'); ?>"
|
||||
placeholder="<?php echo _('Usuario'); ?>"
|
||||
value="<?php echo SP_Util::init_var('adminlogin'); ?>" autocomplete="off" autofocus required/>
|
||||
value="<?php echo SP_Util::init_var('adminlogin'); ?>" autocomplete="off" autofocus
|
||||
required/>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<input type="password" name="adminpass" id="adminpass" title="<?php echo _('Clave'); ?>"
|
||||
<img class="showpass inputImg" src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
|
||||
alt="<?php echo _('Mostrar Clave'); ?>"/>
|
||||
<input type="password" name="adminpass" id="adminpass"
|
||||
title="<?php echo _('Clave'); ?>"
|
||||
placeholder="<?php echo _('Clave'); ?>"
|
||||
value="<?php echo SP_Util::init_var('adminpass'); ?>" autocomplete="off" required/>
|
||||
</p>
|
||||
@@ -98,6 +105,8 @@ if (isset($_POST['install']) AND $_POST['install'] == 'true') {
|
||||
<fieldset id="masterpwd">
|
||||
<legend><?php echo _('Clave Maestra'); ?></legend>
|
||||
<p>
|
||||
<img class="showpass inputImg" src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
|
||||
alt="<?php echo _('Mostrar Clave'); ?>"/>
|
||||
<input type="password" name="masterpassword" id="masterpassword"
|
||||
title="<?php echo _('Clave Maestra'); ?> "
|
||||
placeholder="<?php echo _('Clave Maestra'); ?>"
|
||||
@@ -111,18 +120,24 @@ if (isset($_POST['install']) AND $_POST['install'] == 'true') {
|
||||
<input type="hidden" id="dbtype" name="dbtype" value="mysql"/>
|
||||
|
||||
<p>
|
||||
<img src="imgs/help.png" class="inputImg"
|
||||
title="<?php echo _('Login de usuario con permisos de administrador de MySQL'); ?>"/>
|
||||
<input type="text" name="dbuser" id="dbuser" title="<?php echo _('Usuario BBDD'); ?>"
|
||||
placeholder="<?php echo _('Usuario BBDD'); ?>"
|
||||
value="<?php echo SP_Util::init_var('dbuser', 'root'); ?>" autocomplete=off" required/>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<img class="showpass inputImg " src="imgs/show.png" title="<?php echo _('Mostrar Clave'); ?>"
|
||||
alt="<?php echo _('Mostrar Clave'); ?>"/>
|
||||
<input type="password" name="dbpass" id="dbpass" title="<?php echo _('Clave BBDD'); ?>"
|
||||
placeholder="<?php echo _('Clave BBDD'); ?>"
|
||||
value="<?php echo SP_Util::init_var('dbpass'); ?>" required/>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<img src="imgs/help.png" class="inputImg"
|
||||
title="<?php echo _('Nombre de la base de datos para sysPass'); ?>"/>
|
||||
<input type="text" name="dbname" id="dbname" title="<?php echo _('Nombre BBDD'); ?>"
|
||||
placeholder="<?php echo _('Nombre BBDD'); ?>"
|
||||
value="<?php echo SP_Util::init_var('dbname', 'syspass'); ?>" autocomplete=off"
|
||||
@@ -130,21 +145,48 @@ if (isset($_POST['install']) AND $_POST['install'] == 'true') {
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<img src="imgs/help.png" class="inputImg"
|
||||
title="<?php echo _('Nombre del servidor de la base de datos de sysPass'); ?>"/>
|
||||
<input type="text" name="dbhost" id="dbhost" title="<?php echo _('Servidor BBDD'); ?>"
|
||||
placeholder="<?php echo _('Servidor BBDD'); ?>"
|
||||
value="<?php echo SP_Util::init_var('dbhost', 'localhost'); ?>" required/>
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
||||
<p>
|
||||
<label for="hostingmode"><?php echo _('Modo Hosting'); ?></label>
|
||||
<img src="imgs/help.png" class="iconMini"
|
||||
<img src="imgs/help.png" class="inputImg"
|
||||
title="<?php echo _('No crea ni verifica los permisos del usuario sobre la BBDD'); ?>"/>
|
||||
<label
|
||||
for="hostingmode"><?php echo (SP_Util::init_var('hostingmode')) ? _('Modo Hosting') . ' ON' : _('Modo Hosting') . ' OFF'; ?></label>
|
||||
<input type="checkbox" name="hostingmode"
|
||||
id="hostingmode" <?php echo SP_Util::init_var('hostingmode', ''); ?> />
|
||||
id="hostingmode" class="checkbox" <?php echo SP_Util::init_var('hostingmode', ''); ?> />
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
<div class="buttons"><input type="submit" class="button" value="<?php echo _('Instalar'); ?>"/></div>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('#frmInstall').find('.checkbox').button();
|
||||
$('#frmInstall').find('.ui-button').click(function () {
|
||||
// El cambio de clase se produce durante el evento de click
|
||||
// Si tiene la clase significa que el estado anterior era ON y ahora es OFF
|
||||
if ($(this).hasClass('ui-state-active')) {
|
||||
$(this).children().html('<?php echo _('Modo Hosting');?> OFF');
|
||||
} else {
|
||||
$(this).children().html('<?php echo _('Modo Hosting');?> ON');
|
||||
}
|
||||
});
|
||||
$('.showpass').click(function () {
|
||||
var passInput = $(this).next();
|
||||
|
||||
if (passInput.attr('type') == 'password') {
|
||||
passInput.get(0).type = 'text';
|
||||
} else {
|
||||
passInput.get(0).type = 'password';
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -768,6 +768,8 @@ class SP_Users
|
||||
. "user_notes = '" . DB::escape($this->userNotes) . "',"
|
||||
. "user_groupId = " . (int)$this->userGroupId . ","
|
||||
. "user_profileId = " . (int)$this->userProfileId . ","
|
||||
. "user_mPass = '',"
|
||||
. "user_mIV = '',"
|
||||
. "user_isAdminApp = " . (int)$this->userIsAdminApp . ","
|
||||
. "user_isAdminAcc = " . (int)$this->userIsAdminAcc . ","
|
||||
. "user_isDisabled = " . (int)$this->userIsDisabled . ","
|
||||
|
||||
Reference in New Issue
Block a user