forked from openprivacy/lockbox-web
Fixed bug in decrypt.php
This commit is contained in:
parent
5d0abf9db9
commit
a8a7fb6b5f
|
@ -1,7 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once 'config.inc.php';
|
|
||||||
|
|
||||||
// Load private key
|
// Load private key
|
||||||
$privKey = base64_decode(file_get_contents("key.private"));
|
$privKey = base64_decode(file_get_contents("key.private"));
|
||||||
$pubKey = base64_decode(file_get_contents("key.public"));
|
$pubKey = base64_decode(file_get_contents("key.public"));
|
||||||
|
@ -18,7 +16,7 @@ foreach ($encrypted_submissions as $encrypted) {
|
||||||
$decryptedData = sodium_crypto_box_seal_open(base64_decode($parts[1]), $keypair);
|
$decryptedData = sodium_crypto_box_seal_open(base64_decode($parts[1]), $keypair);
|
||||||
|
|
||||||
// Parse exported variable
|
// Parse exported variable
|
||||||
eval('$vars = '.$decryptedData.';');
|
$vars = json_decode($decryptedData, true);
|
||||||
|
|
||||||
// Print :)
|
// Print :)
|
||||||
foreach ($vars as $k => $v){
|
foreach ($vars as $k => $v){
|
||||||
|
|
Loading…
Reference in New Issue