From: Omar Polo Subject: gotwebd: percent-encode the quote character too To: gameoftrees@openbsd.org Date: Thu, 05 Jan 2023 13:22:14 +0100 noticed a line in my gotwebd logs: : gotweb_process_request: 3a15e1807a369c0a7827363eca22c9f1a8598d9c>diff | date: Thu Jan 5 11:56:20 2023 UTC gotwebd: urlencode also the " character URLs are embedded as part of the HTML and, while it seems legal from RFC3986 to leave that character unquoted, we need it quoted to avoid breaking the HTML output. diff 4cc7b95a1a3139b5fdf12363376cd6ef877bf3ea 9087ededfe8472a4a54c7e8bbb97250595e8b06d commit - 4cc7b95a1a3139b5fdf12363376cd6ef877bf3ea commit + 9087ededfe8472a4a54c7e8bbb97250595e8b06d blob - 08f7194204d5247935adcee192184a531f881ede blob + a8fdd952ec48f1a229440e115de67205cf20f049 --- gotwebd/gotweb.c +++ gotwebd/gotweb.c @@ -1561,6 +1561,8 @@ should_urlencode(int c) case ',': case ';': case '=': + /* needed because the URLs are embedded into the HTML */ + case '\"': return 1; default: return 0;