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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: Use constant for login timeout in gotwebd(8)
To:
Martin Vahlensieck <openbsd@academicsolutions.ch>
Cc:
gameoftrees@openbsd.org
Date:
Wed, 1 Oct 2025 09:37:49 +0200

Download raw body.

Thread
On Tue, Sep 30, 2025 at 10:36:00PM +0200, Martin Vahlensieck wrote:
> 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

Applied, thank you 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__);
> 
>