From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.42.229.71 with SMTP id jh7cs27005icb; Mon, 24 Jan 2011 01:43:02 -0800 (PST) Received: by 10.224.47.75 with SMTP id m11mr3962187qaf.249.1295862182220; Mon, 24 Jan 2011 01:43:02 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id g29si26986870qck.191.2011.01.24.01.43.01; Mon, 24 Jan 2011 01:43:02 -0800 (PST) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id BAC801858361; Mon, 24 Jan 2011 04:43:01 -0500 (EST) Received: from steel.pruts.nl (pruts.nl [82.94.235.106]) by rubyforge.org (Postfix) with ESMTP id 72B4C1858346 for ; Mon, 24 Jan 2011 04:35:31 -0500 (EST) Received: from localhost (localhost.localdomain [127.0.0.1]) by steel.pruts.nl (Postfix) with ESMTP id 1EFA4E20AA for ; Mon, 24 Jan 2011 06:20:59 +0100 (CET) X-Virus-Scanned: amavisd-new at pruts.nl Received: from steel.pruts.nl ([127.0.0.1]) by localhost (steel.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zWcOTKGqmqV1 for ; Mon, 24 Jan 2011 06:20:52 +0100 (CET) Received: by steel.pruts.nl (Postfix, from userid 1000) id F344DE20B9; Mon, 24 Jan 2011 06:20:47 +0100 (CET) From: Ico To: sup-talk Date: Mon, 24 Jan 2011 06:20:47 +0100 Message-Id: <1295845756-sup-308@pruts.nl> User-Agent: Sup/0.12 Subject: [sup-talk] Bug reading/writing contacts with \" in them X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org Hi all, I just found out about Sup yesterday, great stuff, thanks for that to all involved with development! I did run into a small bug yesterday though. I was able to analyze it a bit, but my Ruby is not good enough to propose a solid fix. The problem occurs when contacts have a certain combination of backslashes and quotes in them. I 'imported' my mutt aliases with a simple script converting the format (too bad it is *almost* the same but not quite), and one of the contacts looked like this: somename: \"Some, Name\" It seems there is a problem somewhere with parsing and writing out the backslashes, which get escaped each time sup saves the contact list, doubling the number of backslashes each time. somename: Some, Name\\ somename: Some, Name\\\\ somename: Some, Name\\\\\\\\ and so on. I first got a hint something was wrong when I noticed that sup was starting up slower and slower each time, and took over 10 minutes after a few tries. It seems that the regexp at person.rb:79 when /(.+?) ((\S+?)@\S+) \3/ goes haywire backtracking through all the backslashes, I guess the first .+? probably uses exponential time when trying to match the huge number of \'s Anyway, I did some quick trials to find where exaclty the bug is, but I couldn't come up with the proper fix right away. My problem has of course gone away by just removing the backslashes from the contacts file, but I hope somebody with more ruby-sense is willing to look into this one. Thanks, Ico -- :wq ^X^Cy^K^X^C^C^C^C _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk