You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2007/10/15 12:50:51 UTC

[Bug 5687] New: duplicate loadplugin lines cause eval rules to get incorrect $self object

http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5687

           Summary: duplicate loadplugin lines cause eval rules to get
                    incorrect $self object
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: major
          Priority: P5
         Component: Libraries
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: jm@jmason.org


found this bug just now.

If you "loadplugin" the same class twice, the second time around, the
newly-created plugin object will be discarded since it's a duplicate.  However,
register_eval_rule() will be called in its constructor, resulting in the eval
rules being called on what is effectively a "zombie" plugin; it's not the real
plugin obj for that class.

fix to follow.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5687] [review] duplicate loadplugin lines cause eval rules to get incorrect $self object

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5687


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From jm@jmason.org  2007-10-17 03:11 -------
thanks, applied to 3.2.x:

Sending        lib/Mail/SpamAssassin/PluginHandler.pm
Transmitting file data .
Committed revision 585434.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5687] [review] duplicate loadplugin lines cause eval rules to get incorrect $self object

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5687


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|duplicate loadplugin lines  |[review] duplicate
                   |cause eval rules to get     |loadplugin lines cause eval
                   |incorrect $self object      |rules to get incorrect $self
                   |                            |object
  Status Whiteboard|                            |needs 2 votes for 3.2
   Target Milestone|Undefined                   |3.2.4




------- Additional Comments From jm@jmason.org  2007-10-15 03:53 -------
the fix is basically to do the dupe check earlier, before the plugin's ->new()
is called.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5687] [review] duplicate loadplugin lines cause eval rules to get incorrect $self object

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5687


Mark.Martinec@ijs.si changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|needs 2 votes for 3.2       |needs 1 vote for 3.2




------- Additional Comments From Mark.Martinec@ijs.si  2007-10-15 06:26 -------
+1 makes sense




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5687] duplicate loadplugin lines cause eval rules to get incorrect $self object

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5687





------- Additional Comments From jm@jmason.org  2007-10-15 03:52 -------
Created an attachment (id=4159)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=4159&action=view)
fix

applied to trunk:

: jm 6...; svn commit -m "bug 5687:  fix bug where duplicate loadplugin line
results in eval rule method registered with invalid \$self object"
lib/Mail/SpamAssassin/PluginHandler.pm
Sending        lib/Mail/SpamAssassin/PluginHandler.pm
Transmitting file data .
Committed revision 584726.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5687] [review] duplicate loadplugin lines cause eval rules to get incorrect $self object

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5687





------- Additional Comments From mkettler_sa@verizon.net  2007-10-16 21:38 -------
+1 agreed. Even I can read that code and make good sense of it.

Patches clean even to my regular 3.2.3 image, and builds/tests just fine.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.