Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13131 closed defect (fixed)

MathCaptchaPlugin crashes Trac 1.2

Reported by: Florian Berger <florian.berger@…> Owned by: Ryan J Ollos
Priority: normal Component: MathCaptchaPlugin
Severity: blocker Keywords:
Cc: Trac Release: 1.2

Description

MathCaptchaPlugin looks like a really neat and useful plugin: it sets up a spam barrier, has no external dependencies like TracCaptchaPlugin, and is much more slim than SpamFilter.

Sadly, after installing and enabling it crashes my trac 1.2:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/trac/web/api.py", line 710, in send_error
    data, 'text/html')
  File "/usr/lib/python2.7/site-packages/trac/web/chrome.py", line 1123, in render_template
    stream |= self._filter_stream(req, method, filename, stream, data)
  File "/usr/lib/python2.7/site-packages/genshi/core.py", line 133, in __or__
    return Stream(_ensure(function(self)), serializer=self.serializer)
  File "/usr/lib/python2.7/site-packages/trac/web/chrome.py", line 1436, in inner
    data)
  File ".../plugins/MathCaptcha.py", line 373, in filter_stream
    if self.is_banned(req):
  File ".../plugins/MathCaptcha.py", line 244, in is_banned
    db = self.env.get_db_cnx()
AttributeError: 'Environment' object has no attribute 'get_db_cnx'

Any chance of getting MathCaptche ported to 1.2?

Attachments (0)

Change History (5)

comment:1 Changed 8 years ago by Ryan J Ollos

Owner: changed from Rob McMullen to Ryan J Ollos
Status: newaccepted

comment:2 Changed 8 years ago by Ryan J Ollos

In 16418:

5.0dev: Branch for Trac 1.2 and conform to PEP8

Refs #13131.

comment:3 Changed 8 years ago by Florian Berger <florian.berger@…>

That was probably not supposed to fixed it yet. I checked it out anyway, and the problem AttributeError: 'Environment' object has no attribute 'get_db_cnx' still persists.

comment:4 Changed 8 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 16419:

5.0dev: Adapt to Trac 1.2 database API

Fixes #13131.

comment:5 Changed 8 years ago by Florian Berger <florian.berger@…>

Works like a charm. Thanks!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.