From 6902238f1afcc76fb635d4df32218b6fea2e65c3 Mon Sep 17 00:00:00 2001 From: bergware Date: Wed, 11 Oct 2023 21:48:54 +0200 Subject: [PATCH] Disk Settings: add possibility to change encryption phrase/keyfile --- emhttp/plugins/dynamix/include/update.encryption.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emhttp/plugins/dynamix/include/update.encryption.php b/emhttp/plugins/dynamix/include/update.encryption.php index e769a5f12..982e74662 100644 --- a/emhttp/plugins/dynamix/include/update.encryption.php +++ b/emhttp/plugins/dynamix/include/update.encryption.php @@ -68,7 +68,7 @@ if (isset($_POST['oldinput'])) { file_put_contents($oldkey,base64_decode(_var($_POST,'oldluks'))); break; case 'file': - file_put_contents($oldkey,base64_decode(explode(';base64,',_var($_POST,'olddata',';base64,'))[1])); + file_put_contents($oldkey,base64_decode(explode(';base64,',_var($_POST,'olddata','x;base64,'))[1])); break; } } else { @@ -90,7 +90,7 @@ if (isset($_POST['newinput'])) { $data = _var($_POST,'newluks'); break; case 'file': - file_put_contents($newkey,base64_decode(explode(';base64,',_var($_POST,'newdata',';base64,'))[1])); + file_put_contents($newkey,base64_decode(explode(';base64,',_var($_POST,'newdata','x;base64,'))[1])); $luks = 'luksKey=&luksKeyfile'; $data = $newkey; break;