"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Martin Vahlensieck <openbsd@academicsolutions.ch>
Subject:
Use constant for login timeout in gotwebd(8)
To:
gameoftrees@openbsd.org
Date:
Tue, 30 Sep 2025 22:36:00 +0200

Download raw body.

Thread
Hi

Use GOTWEBD_LOGIN_TIMEOUT (defined as 300) for the login timeout
in gotwebd(8), the same which is used in gotsh(1):

   111  fprintf(out, "Login successful.  Please visit the following "
   112      "URL within the next %d minutes: %s\n",
   113      GOTWEBD_LOGIN_TIMEOUT / 60, line + 3);

Best,

Martin

--- gotwebd/login.c
+++ gotwebd/login.c
@@ -516,7 +516,7 @@ client_read(struct bufferevent *bev, void *d)
 		}
 
 		code = login_gen_token(client->euid, hostname,
-		    5 * 60 /* 5 minutes */,
+		    GOTWEBD_LOGIN_TIMEOUT,
 		    login_token_secret, sizeof(login_token_secret), "login");
 		if (code == NULL) {
 			log_warn("%s: login_gen_token failed", __func__);