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 2008/04/23 17:52:20 UTC

[Bug 5893] New: bayes_sql_override_username is ignored if value evaultes to 'false'

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5893

           Summary: bayes_sql_override_username is ignored if value evaultes
                    to 'false'
           Product: Spamassassin
           Version: 3.2.4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: trivial
          Priority: P5
         Component: spamassassin
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: jonh@nmgi.com


Created an attachment (id=4306)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4306)
Proposed patch

In our deployment, we use integers as our 'usernames' in the bayes tables.  A
username of '0' is a "fail-back" value for bayes_sql_override_username for
users who don't want their own per-user bayes configuration.  However, this
evaluates to 'false', so is never used.  SA should use 'if defined' rather than
just 'if' to solve this problem.


-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 5893] bayes_sql_override_username is ignored if value evaultes to 'false'

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


Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|Undefined                   |3.3.0




--- Comment #1 from Mark Martinec <Ma...@ijs.si>  2009-08-06 12:02:33 PST ---
Another manifestation of nonpedantic practice in some parts of code
where user-supplied strings are evaluated in places as Perl booleans,
instead of being tested for being defined or for being an empty string,
just like in Bug 5965.

I hope I caught all such cases dealing with username.
If not, please report and re-open.


  Bug 5893 (and Bug 5965): bayes_sql_override_username is ignored
  if value evalutes to 'false'
Sending        lib/Mail/SpamAssassin/BayesStore/MySQL.pm
Sending        lib/Mail/SpamAssassin/BayesStore/SQL.pm
Sending        lib/Mail/SpamAssassin/Client.pm
Sending        lib/Mail/SpamAssassin/SQLBasedAddrList.pm
Transmitting file data ....
Committed revision 801771 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=801771 ).

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 5893] bayes_sql_override_username is ignored if value evaultes to ' false'

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


Michael Parker <pa...@pobox.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |parkerm@pobox.com




-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.