From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68066 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Character of Death locks one out of all newsgroups Date: Mon, 05 Jan 2009 13:18:34 +0900 Organization: Emacsen advocacy group Message-ID: References: <87bpuytys2.fsf@jidanni.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1231129204 16498 80.91.229.12 (5 Jan 2009 04:20:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Jan 2009 04:20:04 +0000 (UTC) Cc: ding@gnus.org To: jidanni@jidanni.org Original-X-From: ding-owner+M16511@lists.math.uh.edu Mon Jan 05 05:21:15 2009 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1LJgxm-0002cs-Jr for ding-account@gmane.org; Mon, 05 Jan 2009 05:21:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1LJgvy-0002rC-M5; Sun, 04 Jan 2009 22:19:22 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1LJgvw-0002qo-Lb for ding@lists.math.uh.edu; Sun, 04 Jan 2009 22:19:20 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1LJgvt-0000aN-C0 for ding@lists.math.uh.edu; Sun, 04 Jan 2009 22:19:20 -0600 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1LJgw9-0004Zh-00 for ; Mon, 05 Jan 2009 05:19:33 +0100 Original-Received: from localhost ([127.0.0.1]:57247) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1LJgvH-0003Wn-W8; Sun, 04 Jan 2009 22:18:40 -0600 X-Hashcash: 1:20:090105:jidanni@jidanni.org::5RsQNdcMCXAUjb+O:0000000000000000000000000000000000000000004GIv X-Hashcash: 1:20:090105:ding@gnus.org::BEaLLh/fLvMge061:00004YvZ X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.1012 (Gnus v5.10.12) Emacs/22.3 (gnu/linux) Cancel-Lock: sha1:ooldiVox1p6R0xpeP4zweZQgwfo= Content-Disposition: inline X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68066 Archived-At: >>>>> jidanni@jidanni.org wrote: > One bad character locks me out of all newsgroups... until when, one > doesn't know. Great denial of service attack. > Debugger entered--Lisp error: (error "Can't rfc2047-encode `\x2563d\x2587= c \x256cf\x7ecf'") > signal(error ("Can't rfc2047-encode `\x2563d\x2587c \x256cf\x7ecf'")) > error("Can't rfc2047-encode `%s'" "\x2563d\x2587c \x256cf\x7ecf") > rfc2047-encode(5 10) > rfc2047-encode-region(1 12) > nnrss-mime-encode-string("Re: \x2563d\x2587c亲\x256cf经= 382; 3") > nnrss-check-group("BDSM \x25322\x25cf0\x25d37\x268a2" "") > nnrss-request-group("BDSM =E4=B8=80=E8=88=AC=E8=A8=8E=E8=AB=96" "" nil) > gnus-activate-group("nnrss:BDSM =E4=B8=80=E8=88=AC=E8=A8=8E=E8=AB=96" s= can) > gnus-get-unread-articles(nil) > gnus-group-get-new-news() I discovered this is due to the `mm-url-decode-entities' function that uses `char-to-string' to convert entities to human-readable characters. When decoding the entity "经", it runs: (char-to-string 32463) That's ok in Emacs 23, however to make it work also with Emacs 22 it should be: (char-to-string (decode-char 'ucs 32463)) Because of this, funny characters are passed to the rfc2047 encoder in Emacs 22. For XEmacs with mule, we will have to do like emacs-w3m does, but there seems to be no way to make it work with Emacs 21. Anyway we will need time to fix this problem (see `w3m-ucs-to-char' provided in w3m-ems.el and w3m-xmas.el and `w3m-decode-entities' in w3m.el.) A workaround: --8<---------------cut here---------------start------------->8--- (eval-after-load "mm-url" '(progn (require 'w3m) (defalias 'mm-url-decode-entities `w3m-decode-entities))) --8<---------------cut here---------------end--------------->8--- I verified it works with Emacs 22.1, 22.2, 22.3, XEmacs 21.4.22, 21.5-b28, and SXEmacs 22.1.10 as follows: (rfc2047-decode-string (nnrss-mime-encode-string "Re: =E6=88=91=E7=9A=84亲=E8=BA=AB经= 历 3")) =3D> "Re: =E6=88=91=E7=9A=84=E4=BA=B2=E8=BA=AB=E7=BB=8F=E5=8E=86 3" Regards,