supybot parses regular expressions crudely and incorrectly for String plugin's re command

Bug #235500 reported by Ralph Corderoy
2
Affects Status Importance Assigned to Milestone
supybot (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: supybot

Ubuntu 8.04, supybot 0.83.3-1.

supybot's `re' command in the String plugin doesn't handle backslashes
well. Given `re s/\//x/ a/bc' it correctly seperates the two parts `\/'
and `x', returning `axbc', but it seems to do this by splitting the
string on the `/' separator when it's not preceeded by a backslash.
This logic is flawed:

    re s/\//x/ a/bc
    axbc
    re s/\\/x/ a/bc
    Error: 's/\\\\/x/ a/bc' is not a valid regular expression.

Here, the backslash preceeding the separator is part of the escape
started with the first backslash, so the second `/' isn't escaped and
shouldn't be treated as such. Also, the error message seems to
over-escape the backslashes.

Revision history for this message
James McCoy (jamessan) wrote :

This is now fixed upstream and will be included in 0.83.4. Thanks for the bug report.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package supybot - 0.83.4.1.ds-1

---------------
supybot (0.83.4.1.ds-1) unstable; urgency=low

  * New upstream version.
    - Requesting help for Factoids commands no longer errors out. (LP: #235439)
    - Regular expressions with multiple backslashes are properly parsed.
      (LP: #235500)
  * debian/control
    - Add Vcs-* fields.
    - Bump standards version to 3.8.1.0 - no changes needed.
    - Add python-feedparser to Recommends. (Closes: #490615)
    - Add python-simplejson | python (>= 2.6) to Recommends.
    - Add python-dateutil, python-dictclient to Suggests.
    - Add version to debhelper Build-Depends.
  * debian/rules:
    - Use stamp files as pre-requisites instead of the related phony targets.
    - Call dh_prep instead of dh_clean -k.
  * debian/watch: Call new debian/repack script to remove embedded copies of
    third-party code from new upstream tarballs.
  * debian/docs: Include FAQ and CONFIGURATION docs in the package.
  * Bump compat level to 7.

 -- <email address hidden> (Andres E. Rodriguez Lazo) Fri, 05 Jun 2009 16:50:57 +0100

Changed in supybot (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.