Merge branch 'n/decrypt-fix' into main

This commit is contained in:
Norman 2020-12-16 23:41:22 -08:00
commit f943131a19
1 changed files with 1 additions and 3 deletions

View File

@ -1,7 +1,5 @@
<?php
require_once 'config.inc.php';
// Load private key
$privKey = base64_decode(file_get_contents("key.private"));
$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);
// Parse exported variable
eval('$vars = '.$decryptedData.';');
$vars = json_decode($decryptedData, true);
// Print :)
foreach ($vars as $k => $v){