@@ -67,7 +67,7 @@ $cfgClass = $ocVersion >= 7 ? 'section' : 'personalblock';
|
|||||||
<p><label for="col_displayname"><?php p($l -> t('Real Name Column')); ?></label><input type="text" id="col_displayname" name="col_displayname" value="<?php p($_['col_displayname']); ?>" /></p>
|
<p><label for="col_displayname"><?php p($l -> t('Real Name Column')); ?></label><input type="text" id="col_displayname" name="col_displayname" value="<?php p($_['col_displayname']); ?>" /></p>
|
||||||
|
|
||||||
<p><label for="set_crypt_type"><?php p($l -> t('Encryption Type')); ?></label>
|
<p><label for="set_crypt_type"><?php p($l -> t('Encryption Type')); ?></label>
|
||||||
<?php $crypt_types = array('md5' => 'MD5', 'md5crypt' => 'MD5 Crypt', 'cleartext' => 'Cleartext', 'mysql_encrypt' => 'mySQL ENCRYPT()', 'system' => 'System (crypt)', 'mysql_password' => 'mySQL PASSWORD()', 'joomla' => 'Joomla MD5 Encryption', 'joomla2' => 'Joomla > 2.5.18 phpass', 'ssha256' => 'Salted SSHA256', 'redmine' => 'Redmine'); ?>
|
<?php $crypt_types = array('md5' => 'MD5', 'md5crypt' => 'MD5 Crypt', 'cleartext' => 'Cleartext', 'mysql_encrypt' => 'mySQL ENCRYPT()', 'system' => 'System (crypt)', 'mysql_password' => 'mySQL PASSWORD()', 'joomla' => 'Joomla MD5 Encryption', 'joomla2' => 'Joomla > 2.5.18 phpass', 'ssha256' => 'Salted SSHA256', 'redmine' => 'Redmine', 'sha1' => 'SHA1'); ?>
|
||||||
<select id="set_crypt_type" name="set_crypt_type">
|
<select id="set_crypt_type" name="set_crypt_type">
|
||||||
<?php
|
<?php
|
||||||
foreach ($crypt_types as $driver => $name):
|
foreach ($crypt_types as $driver => $name):
|
||||||
|
|||||||
@@ -283,6 +283,10 @@ class OC_USER_SQL extends \OC_User_Backend implements \OCP\IUserBackend, \OCP\Us
|
|||||||
if(!$salt)
|
if(!$salt)
|
||||||
return false;
|
return false;
|
||||||
$enc_password = sha1($salt['salt'].sha1($password));
|
$enc_password = sha1($salt['salt'].sha1($password));
|
||||||
|
}
|
||||||
|
elseif($this -> settings['set_crypt_type'] === 'sha1')
|
||||||
|
{
|
||||||
|
$enc_password = sha1($password);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
$enc_password = $this -> pacrypt($password, $old_password);
|
$enc_password = $this -> pacrypt($password, $old_password);
|
||||||
@@ -336,6 +340,10 @@ class OC_USER_SQL extends \OC_User_Backend implements \OCP\IUserBackend, \OCP\Us
|
|||||||
if(!$salt)
|
if(!$salt)
|
||||||
return false;
|
return false;
|
||||||
$ret = sha1($salt['salt'].sha1($password)) === $db_pass;
|
$ret = sha1($salt['salt'].sha1($password)) === $db_pass;
|
||||||
|
}
|
||||||
|
elseif($this -> settings['set_crypt_type'] == 'sha1')
|
||||||
|
{
|
||||||
|
$ret = sha1($password) === $db_pass;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
$ret = $this -> pacrypt($password, $db_pass) === $db_pass;
|
$ret = $this -> pacrypt($password, $db_pass) === $db_pass;
|
||||||
|
|||||||
Reference in New Issue
Block a user