commit ee003af8b92eb150d8de536c512a0bed7e2c64fd from: Josiah Frentsos via: Thomas Adam date: Thu Jun 15 11:27:15 2023 UTC gotwebd.conf: disallow yes/no for booleans Supporting both "no" and "on" as valid syntax with an opposite meaning could easily result in accidental misconfiguration. Suggested by stsp, tracey agrees. Patch by Josiah Frentsos, thanks! commit - ef44e1362e041fbe4494d61f8e71367e8a66959f commit + ee003af8b92eb150d8de536c512a0bed7e2c64fd blob - 78e7f005317e5620be61b4b2bb064c91e4eff405 blob + 765208e819180a987e11496151b42a2800b2aed9 --- gotwebd/gotwebd.conf.5 +++ gotwebd/gotwebd.conf.5 @@ -205,7 +205,7 @@ server "localhost-unix" { #show_site_owner on #show_repo_owner on #show_repo_age on - #show_repo_description no + #show_repo_description on #show_repo_cloneurl on #respect_exportok off blob - 0b1c88fa2ead6580ce2ca8a27bed7a836c4e54b2 blob + 55fc35dcc50c282329b49affd123735f77cac0ba --- gotwebd/parse.y +++ gotwebd/parse.y @@ -158,12 +158,10 @@ varset : STRING '=' STRING { boolean : STRING { if (strcasecmp($1, "1") == 0 || - strcasecmp($1, "yes") == 0 || strcasecmp($1, "on") == 0) $$ = 1; else if (strcasecmp($1, "0") == 0 || - strcasecmp($1, "off") == 0 || - strcasecmp($1, "no") == 0) + strcasecmp($1, "off") == 0) $$ = 0; else { yyerror("invalid boolean value '%s'", $1); @@ -339,8 +337,7 @@ serveropts1 : REPOS_PATH STRING { new_srv->fcgi_socket = 1; } | LISTEN ON SOCKET STRING { - if (!strcasecmp($4, "off") || - !strcasecmp($4, "no")) { + if (strcasecmp($4, "off") == 0) { new_srv->unix_socket = 0; free($4); YYACCEPT;