diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-09-01 23:54:53 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-09-02 00:21:42 +0200 |
commit | 7ba398c9019ee2cf2b0b93afe5428eacd77c60d4 (patch) | |
tree | 0c0e925ba1bc9d13a07f97616ea84e0a2150cf82 | |
parent | 38d1620529866dbf638c6fd8a3e8e438b3c6a43c (diff) |
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.
-rw-r--r-- | src/form.cc | 3 |
1 files changed, 1 insertions, 2 deletions
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 { |