---
The TOFU prompt seems to encourage choosing the 'trust always' option
unless the user knows better. In such cases, it is common to default to
such option when no explicit choice is provided by the user.
To me, this seems to make the UX feel much closer to clients that don't
ask at all, while retaining the security benefits.
I considered also modifying the prompt to make this behavior more
visible, but I am not sure about a good way to do it. I am afraid that
capitalizing the first letter, which is the convention, could be
misunderstood by users in this context. Please let me know what you
think about this.
src/gmnlm.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/gmnlm.c b/src/gmnlm.c
index 710473b..73c3230 100644
--- a/src/gmnlm.c+++ b/src/gmnlm.c
@@ -1125,12 +1125,14 @@ tofu_callback(enum tofu_error error, const char *fingerprint,
free(line);
return TOFU_FAIL;
}
- if (line[1] != '\n') {++ char c = line[0];+ if (c == '\n') {+ return TOFU_TRUST_ALWAYS;+ } else if (line[1] != '\n') { free(line);
continue;
}
-- char c = line[0]; free(line);
switch (c) {
--
2.34.1