From 7ba398c9019ee2cf2b0b93afe5428eacd77c60d4 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Sun, 1 Sep 2024 23:54:53 +0200 Subject: Restrict boundary to alphanum characters Makes it less likely that server implementations may break due to unexpected boundary characters. It also allows us to avoid quotes around the boundary. --- src/form.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/form.cc b/src/form.cc index 6e81edf6..4a401a91 100644 --- a/src/form.cc +++ b/src/form.cc @@ -1252,8 +1252,7 @@ static void generate_boundary(Dstr *boundary) /* Extracted from RFC 2046, section 5.1.1. */ static const char set[] = "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "0123456789" - "'()+_,-./:=? "; + "0123456789"; char s[sizeof " "] = {0}; do { -- cgit v1.2.3