diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2021-12-20 18:17:23 +0100 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2021-12-20 20:22:09 +0100 |
commit | a34650acff3740980ef23d900d35004bcfe2ef04 (patch) | |
tree | 5e34b2538df2849832e3971bc7d0cd9546b5adc9 /doc/lispref/text.texi | |
parent | 27be90154d1a4b19efe30c97f221b29e3becc920 (diff) | |
download | emacs-a34650acff3740980ef23d900d35004bcfe2ef04.tar.gz |
Fix sloppy base64 acceptance of some multibyte characters
The base64 encoding functions incorrectly accepted some multibyte
characters; stop doing that (bug#52670).
* src/fns.c (base64_encode_1): Reject all multibyte characters.
* test/src/fns-tests.el (fns-tests-base64-encode-string)
(fns-test-base64url-encode-region)
(fns-test-base64url-encode-string): Add tests.
* doc/lispref/text.texi (Base 64): Rephrase outdated manual text.
* etc/NEWS: Add a notice.
Diffstat (limited to 'doc/lispref/text.texi')
-rw-r--r-- | doc/lispref/text.texi | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 5ab5e5715f0..9771d8a7ed9 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -4793,9 +4793,8 @@ converting to and from this code. This function converts the region from @var{beg} to @var{end} into base 64 code. It returns the length of the encoded text. An error is signaled if a character in the region is multibyte, i.e., in a -multibyte buffer the region must contain only characters from the -charsets @code{ascii}, @code{eight-bit-control} and -@code{eight-bit-graphic}. +multibyte buffer the region must contain only ASCII characters or raw +bytes. Normally, this function inserts newline characters into the encoded text, to avoid overlong lines. However, if the optional argument |