~sircmpwn/gmni-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] gmnlm: use 'trust always' as default in TOFU prompt

Details
Message ID
<20220102073541.24225-1-temp.xanomes@volny.cz>
DKIM signature
pass
Download raw message
Patch: +5 -3
---
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
Details
Message ID
<CGV26NJODCC0.301RV7T8FFVIL@taiga>
In-Reply-To
<20220102073541.24225-1-temp.xanomes@volny.cz> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
NACK. I think this makes the behavior betray the user's expectations.
Reply to thread Export thread (mbox)