Edgewall Software
Modify

Opened 14 years ago

Closed 12 years ago

#7173 closed enhancement (fixed)

[PATCH] spam-filter-captcha should not require reentering a ticket after resolving an equation

Reported by: anonymous Owned by: Christian Boos
Priority: high Milestone: plugin - spam-filter
Component: plugin/spamfilter Version:
Severity: normal Keywords:
Cc: shendric@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I am now able to use the non-image spam-filter-captcha handler. However, after resolving the equation, I have to start over with a new ticket. Assuming that the person spent a long time submitting the ticket, it would probably be preferable to submit the ticket that they were trying to fill out the first time.

This is a follow up to #7148

Attachments (4)

captchahandler.diff (4.7 KB ) - added by stoecker 12 years ago.
development code to show possible way
captchapass.diff (4.8 KB ) - added by stoecker 12 years ago.
Working version (tested with newticket) still including lots of debug code
captchapass_final.diff (4.2 KB ) - added by stoecker 12 years ago.
Final version
captchapass_final_errorfix.diff (3.6 KB ) - added by stoecker 12 years ago.
There was still a small glitch in error handling (value already deleted), which should be fixed in this version

Download all attachments as: .zip

Change History (12)

comment:1 by Christian Boos, 14 years ago

Milestone: not applicable
Owner: changed from Matthew Good to Christian Boos
Priority: normalhigh
Status: newassigned

Thanks for the reminder :-)

comment:2 by anonymous, 12 years ago

Resolution: fixed
Status: assignedclosed
Version: 0.11rc1
  • owner changed from mgood to cboos
  • priority changed from normal to high
  • status changed from new to assigned
  • milestone set to not applicable

comment:3 by Remy Blank, 12 years ago

Resolution: fixed
Status: closedreopened
Version: 0.11rc1

Reverted random ticket butchering.

comment:4 by Christian Boos, 12 years ago

Milestone: not applicablespam-filter-plugin

comment:5 by stoecker, 12 years ago

I was able to change the code, so the data is passed through to the captch verification code, but I found no way to tell Trac that it should revalidate the request. I'm stuck in IRequesthandler or IRequestFilter, as I can change the request, but am unable to tell trac about it and the check what handler is responsible is done before I get the chance to change it.

IRequestFilter gets a handler parameter and also returns it, so it is probably possible to replace the handler - How I'm able to find the correct new one?

I attach my current test code which is partly commented out and contains lots of debug statements.

by stoecker, 12 years ago

Attachment: captchahandler.diff added

development code to show possible way

by stoecker, 12 years ago

Attachment: captchapass.diff added

Working version (tested with newticket) still including lots of debug code

by stoecker, 12 years ago

Attachment: captchapass_final.diff added

Final version

comment:6 by anonymous, 12 years ago

Summary: spam-filter-captcha should not require reentering a ticket after resolving an equation[PATCH] spam-filter-captcha should not require reentering a ticket after resolving an equation

Attached a final version cleaning up a lot and removing debug stuff. This one works fine for new wiki pages and new and existing tickets. Maybe additional variables must be saved for other places, but the general structure should be correct and working fine.

comment:7 by Christian Boos, 12 years ago

Thanks for the patch, I'll try it soon.

Btw, have you tried to see if this works in all common situations,after creating a new wiki page or ticket, after editing a page or submitting a ticket change?

by stoecker, 12 years ago

There was still a small glitch in error handling (value already deleted), which should be fixed in this version

comment:8 by Dirk Stöcker, 12 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in r9875.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.