Don't use shadow if the flag is not defined

This commit is contained in:
Grégory Soutadé 2017-04-17 20:37:26 +02:00
parent 6fa296ebc4
commit 89465f4c68
3 changed files with 5 additions and 7 deletions

View File

@ -50,10 +50,7 @@ $PBKDF2_LEVEL=1000;
encrypted login/password values and remove them.
It's a kind of challenge.
This option is backward compatible with old version < 0.6, but
once activated it cannot be reverted as access tokens will be
generated for all values. So, if you want to test it, make
a copy of your databases before !
This option is backward compatible with old version < 0.6
For now it's deactivated because it requires high cpu bandwidth
(one derivation + two decryption for each password !). When

View File

@ -251,6 +251,8 @@ function update_entry($user, $mkey, $old_login, $url, $login, $password, $shadow
function list_entries($user)
{
global $USE_SHADOW_LOGINS;
$db = load_database($user);
if ($db == null) return;
@ -265,7 +267,7 @@ function list_entries($user)
{
if ($first) echo ",";
else $first = true;
if (!strlen($row['shadow_login']))
if (!strlen($row['shadow_login']) || !$USE_SHADOW_LOGINS)
echo "{\"login\" : \"" . $row['login'] . "\", \"password\" : \"" . $row['password'] . "\" }\n";
else
echo "{\"shadow_login\" : \"" . $row['shadow_login'] . "\", \"salt\" : \"" . $row['salt'] . "\" }\n";

View File

@ -18,9 +18,8 @@
along with gPass. If not, see <http://www.gnu.org/licenses/>.
*/
include('functions.php');
include('conf.php');
include('functions.php');
session_start();