Better sanitize user input in inputInt

This commit is contained in:
2024-03-08 11:23:08 -05:00
parent 8e1987f250
commit f8bf12677f
4 changed files with 17 additions and 6 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ func GenUpdate(targetLocation string, hidePassword bool) {
unencryptedEntry := offline.DecryptGPG(targetLocation)
// generate a new password
unencryptedEntry[0] = offline.StringGen(inputInt("Password length:"), inputBinary("Generate a complex (special characters) password?"), 0.2)
unencryptedEntry[0] = offline.StringGen(inputInt("Password length:", -1), inputBinary("Generate a complex (special characters) password?"), 0.2)
// write and preview the modified entry
writeEntryShortcut(targetLocation, unencryptedEntry, hidePassword)