From 935adeb14093bdc3b6609ddf03116696c55e87d1 Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:07:24 +0200 Subject: [PATCH] Attempt to clear the password and encoded password from memory --- pkg/command/command.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/command/command.go b/pkg/command/command.go index 4c4698f..d6a1c55 100644 --- a/pkg/command/command.go +++ b/pkg/command/command.go @@ -57,6 +57,8 @@ func Elevate(password string) { errorcheck.ErrorCheck(err, "\nFailed at typing to STDIN") // Clear the password pw = nil + password = "" + stdin.Close() // Wait for the sudo prompt (If the correct password was given, it will not stay behind)