aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2025-10-18 02:30:27 +0300
committerkaotisk <kaotisk@arching-kaos.org>2025-10-18 02:30:27 +0300
commita48fd0e2fc96e53fa2521d0e11e1c48b2b348849 (patch)
tree9086c67867e6cd247af3c573bc95275a4f3efc94 /lib
parent687219cac67d1bf10549d9911d87eb3df7d78c79 (diff)
downloadarching-kaos-tools-a48fd0e2fc96e53fa2521d0e11e1c48b2b348849.tar.gz
arching-kaos-tools-a48fd0e2fc96e53fa2521d0e11e1c48b2b348849.tar.bz2
arching-kaos-tools-a48fd0e2fc96e53fa2521d0e11e1c48b2b348849.zip
[fs] Adds validity check on dencoding
Diffstat (limited to 'lib')
-rwxr-xr-xlib/_ak_fs7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/_ak_fs b/lib/_ak_fs
index b216e55..3d5ed71 100755
--- a/lib/_ak_fs
+++ b/lib/_ak_fs
@@ -630,11 +630,16 @@ function _ak_fs_net_cat(){
counter="$(expr $counter + 1)"
done
base64 -d output > output.d
+ if [ $? -ne 0 ]
+ then
+ _ak_log_error "Fatal error during dencoding."
+ exit 1
+ fi
shaout="$(sha512sum output.d | awk '{print $1}')"
expHash="$2"
if [ "$shaout" == "$expHash" ]
then
- base64 -d output
+ cat output.d
_ak_log_info "Recreation of $treeRootHash succeeded!"
else
_ak_log_error "Recreation of $treeRootHash failed!"