Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
To: jidanni@jidanni.org
Cc: ding@gnus.org
Subject: Re: Character of Death locks one out of all newsgroups
Date: Thu, 01 Jan 2009 20:57:08 +0100	[thread overview]
Message-ID: <8763ky7qaz.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <87bpuytys2.fsf@jidanni.org> (jidanni@jidanni.org's message of "Sat, 27 Dec 2008 05:25:01 +0800")

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

On Fri, Dec 26 2008, 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\x2587c \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&#20146;\x256cf&#32463;&#21382; 3")
>   nnrss-check-group("BDSM \x25322\x25cf0\x25d37\x268a2" "")
>   nnrss-request-group("BDSM 一般討論" "" nil)
>   gnus-activate-group("nnrss:BDSM 一般討論" scan)
>   gnus-get-unread-articles(nil)
>   gnus-group-get-new-news()
>
> Input was http://www.bdsm.com.tw/phorum/rss.php?1

A minimal recipe to reproduce this in Emacs 22 is this:

[-- Attachment #2: Type: text/plain, Size: 101 bytes --]


(let ((rfc2047-encoding-type 'mime)
	     rfc2047-encode-max-chars)
	 (rfc2047-encode-string "身

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: Type: text/plain; charset=shift_jis, Size: 46 bytes --]

ïn"))

(It works fine with Emacs 23 (CVS))

[-- Attachment #4: Type: text/plain, Size: 398 bytes --]


,----
|       character: 身 (153295, #o453317, #x256cf, U+8EAB)
|         charset: chinese-big5-1
| 		 (Frequently used part (A141-C67F) of Big5 (Chinese traditional).)
|      code point: #x2D #x4F
|          syntax: w 	which means: word
|        category: C:Chinese (Han) characters of 2-byte character sets c:Chinese
| 		 |:While filling, we can break a line at this character.
`----

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: Type: text/plain; charset=shift_jis, Size: 305 bytes --]


,----
|   character: ïn (32463, #o77317, #x7ecf)
|     charset: japanese-jisx0208-1978
| 	     (JISX0208.1978 Japanese Kanji (so called "old JIS"): ISO-IR-42.)
|  code point: #x7D #x4F
|      syntax: w 	which means: word
`----

rfc2047-encode fails because mime-charset is '(iso-2022-jp big5):

[-- Attachment #6: Type: text/plain, Size: 42 bytes --]


ELISP> (with-temp-buffer
	 (insert "身

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #7: Type: text/plain; charset=shift_jis, Size: 2310 bytes --]

ïn")
	 (mm-find-mime-charset-region (point-min) (point-max)))
(iso-2022-jp big5)

> If you can't rfc2047-encode something, then put a "bad character
> character" in its place.

This message (which contains the bad characters) will be split into
parts with utf-8 and shift_jis, see "A message part needs to be split
into %d charset parts." in `mml-parse-1'.

Maybe nnrss could do something similar, e.g. return
"=?utf-8?Q?=E8=BA=AB?= =?shift_jis?Q?=EFn?="?  I know next to nothing
about RSS, so I'm not sure.  Anyone?

> Firefox shows the line as
> Re: ‰ä“I&#20146;g&#32463;&#21382; 3
> That would be still better that bombing out too.

> Anyway, I had to use
> C-k runs the command gnus-group-kill-group
> to be able to use
> g runs the command gnus-group-get-new-news
> ever again. Else one must use many
> M-g (translated from <escape> g) runs the command gnus-group-get-new-news-this-group
> If I dare use
> c runs the command gnus-group-catchup-current
> I just get
>
> Debugger entered--Lisp error: (error "Can't rfc2047-encode `\x2563d\x2587c \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&#20146;\x256cf&#32463;&#21382; 3")
>   nnrss-check-group("BDSM \x25322\x25cf0\x25d37\x268a2" "")
>   nnrss-request-group("BDSM ˆê”Ê“¢˜_" "" nil)
>   gnus-activate-group("nnrss:BDSM ˆê”Ê“¢˜_")
>   gnus-sequence-of-unread-articles("nnrss:BDSM ˆê”Ê“¢˜_")
>   gnus-group-catchup("nnrss:BDSM ˆê”Ê“¢˜_" nil)
>   gnus-group-catchup-current(nil)
>   call-interactively(gnus-group-catchup-current)
>
> Who knows why it must encode things just to mark them as read.
>
> I wonder how I ever can read this group again?

On Mon, Dec 29 2008, jidanni@jidanni.org wrote:

> One needs to unconnect to the Internet, start gnus again, unsubscribe
> the group, and wait several weeks for that thread with the poison
> character to die off RSS (monitoring via e.g., firefox), or else one
> will not be able to read ANY mail or news groups.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

  parent reply	other threads:[~2009-01-01 19:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-26 21:25 jidanni
2008-12-29 22:05 ` jidanni
2009-01-01 19:57 ` Reiner Steib [this message]
2009-01-02 21:11   ` jidanni
2009-01-05  4:18 ` Katsumi Yamaoka
2009-01-05  8:00   ` Katsumi Yamaoka
2009-01-05 17:48     ` jidanni
2009-01-05 22:10       ` Katsumi Yamaoka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8763ky7qaz.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    --cc=ding@gnus.org \
    --cc=jidanni@jidanni.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).