[Mew-dist 3145] Re: Re[2]: [Q] ログイン名に正規表現

SAKAI Kiyotaka ksakai at example.com
1997年 12月 11日 (木) 21:52:48 JST


>> In article <199711211723.CAA04701 at example.com>, taca at example.com (Takahiro Kambe) writes:

>> 似たようなもので、akira++からメールを送られるとimgetの最中に
> imget: Getting new messages from local mailbox into +inbox....
> /^akira++ at example.com$/: nested *?+ in regexp at
> /usr/local/lib/perl5/site_perl/IM/Scan.pm line 633, <MBOX> chun
> k 20.
>> というエラーメッセージが出て、メッセージの受信に失敗してしまう
>> というのがありますね。Perlを使っている以上仕方ないのかもしれま
>> せんが、こっちは悪用可能なだけに困り者ですね。
> うーむ。これはこれでim側で対処すべきなのでしょうか?

こちらの環境では再現しないと思ってソースを読んでみると、~/.im/Config 
の Address: 行に username++ を使っているとエラーが出るのですね。添付の
パッチで直すと思います。

あと、先の imsetup.in のパッチですが、ちょっと勘違いしていたため、先の
パッチは破棄してこのメールに添付するパッチに置き換えて下さい。
-- 
酒井 清隆 (E-mail: ksakai at example.com)

-------------- next part --------------
Index: IM.in/Scan.pm.in
===================================================================
RCS file: /home/cvsroot/im-78/IM.in/Scan.pm.in,v
retrieving revision 1.2
diff -u -r1.2 Scan.pm.in
--- Scan.pm.in	1997/12/11 12:18:01	1.2
+++ Scan.pm.in	1997/12/11 12:47:05
@@ -621,7 +621,7 @@
     unless (defined($ADDRESS_HASH{'init'})) {
 	$ADDRESS_HASH{'addr'} = &addresses_regex();
 	unless ($ADDRESS_HASH{'addr'}) {
-	    $ADDRESS_HASH{'addr'} = '^' . &address() . '$';
+	    $ADDRESS_HASH{'addr'} = '^' . quotemeta(&address()) . '$';
 	    $ADDRESS_HASH{'addr'} =~ s/\s*,\s*/|/g;
 	}
 	    $ADDRESS_HASH{'init'} = 1;
-------------- next part --------------
Index: imsetup.in
===================================================================
RCS file: /home/cvsroot/im-78/imsetup.in,v
retrieving revision 1.1
diff -u -r1.1 imsetup.in
--- imsetup.in	1997/12/03 00:29:22	1.1
+++ imsetup.in	1997/12/11 12:44:14
@@ -91,11 +91,12 @@
 
     my $mymail = "$home/$mail";
     my $mynews = "$home/$news";
+    my $qhome = quotemeta($home);
 
     do {
 	do {
 	    $mymail = &input_config("Where is your Mail directory?", $mymail);
-	} until (($mail = $mymail) =~ s!^$home/!!e
+	} until (($mail = $mymail) =~ s!^$qhome/!!e
 		 || &input_confirm("Sure to use $mail which is not beneath "
 				   . "your home directory?"));
     } while (! &check_and_create_directory($mymail));
@@ -103,7 +104,7 @@
     do {
 	do {
 	    $mynews = &input_config("Where is your News directory?", $mynews);
-	} until (($news = $mynews) =~ s!^$home/!!e
+	} until (($news = $mynews) =~ s!^$qhome/!!e
 		 || &input_confirm("Sure to use $news which is not beneath "
 				   . "your home directory?"));
     } while (! &check_and_create_directory($mynews));


Mew-dist メーリングリストの案内