Edgewall Software
Modify

Ticket #7173 (closed enhancement: fixed)

Opened 2 years ago

Last modified 3 months ago

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

Reported by: anonymous Owned by: cboos
Priority: high Milestone: plugin - spam-filter
Component: plugin/spamfilter Version:
Severity: normal Keywords:
Cc: shendric@…

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

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

Change History

comment:1 Changed 2 years ago by cboos

  • Owner changed from mgood to cboos
  • Priority changed from normal to high
  • Status changed from new to assigned
  • Milestone set to not applicable

Thanks for the reminder :-)

comment:2 Changed 11 months ago by anonymous

  • Status changed from assigned to closed
  • Version set to 0.11rc1
  • Resolution set to fixed
  • 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 Changed 11 months ago by rblank

  • Status changed from closed to reopened
  • Version 0.11rc1 deleted
  • Resolution fixed deleted

Reverted random ticket butchering.

comment:4 Changed 6 months ago by cboos

  • Milestone changed from not applicable to spam-filter-plugin

comment:5 Changed 4 months ago by stoecker

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.

Changed 4 months ago by stoecker

development code to show possible way

Changed 4 months ago by stoecker

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

Changed 4 months ago by stoecker

Final version

comment:6 Changed 4 months ago by anonymous

  • Summary changed from spam-filter-captcha should not require reentering a ticket after resolving an equation to [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 Changed 4 months ago by cboos

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?

Changed 4 months ago by stoecker

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

comment:8 Changed 3 months ago by dstoecker

  • Status changed from reopened to closed
  • Resolution set to fixed

Fixed in r9875.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.