Gustavo Narea wrote:
> On Monday February 9, 2009 21:34:43 Chris McDonough wrote:
>> The thing you sent over a patch and a bugreport for is a plugin for
>> repoze.who's RedirectingFormPlugin.  This plugin happens to ship with
>> repoze.who itself (it's one of the default plugins), but TG2's "what"
>> quickstart doesn't actually use this plugin directly anyway: it overrides
>> it with the Friendly version, which is part of r.what; so fixing the
>> Friendly one in r.what's quickstart should mean you're good to go without
>> requiring any new repoze.who release.
> No exactly. The bug in RedirectingFormPlugin will still be present even if 
> used through FriendlyRedirectingFormPlugin because the challenger of the 
> former redirects to the login page ignoring the script name.

I don't understand.  Why would both a RedirectingFormPlugin and a
FriendlyRedirectingFormPlugin be active in the same configuration?  I see that
you've added the SCRIPT_NAME patch to the challenge method of the friendly
version, that's not enough?

Oh wait.  I see.  You're calling the superclass' "challenge" and "identify".
Can you just not do that?  At this point, FriendlyRedirectingPlugin should just
be a plain old fork I think.  There's no purpose in using RedirectingFormPlugin
as a base class here anymore, as you've overridden every one of its API methods.
 People shouldn't be hamstrung by r.who.plugin implementations; it's fine to
just 100% fork implementation here; cut-n-paste is de rigeur for plugins.  It's
actually preferable, I think, because then unexpected changes in the base class
don't break the subclasses.

>> Of course, we'll fix r.who in the meantime and eventually release a fixed
>> version, but you shouldn't need to wait for us to do so.  I would have just
>> applied the SCRIPT_NAME patch that Gustavo wrote to RedirectingFormPlugin
>> if it had been correct; but as it stands, it can't work, so I'll need to
>> understand the issue and write a correct patch which I haven't had time to
>> do yet.
> The problem of the patch was in the use of SCRIPT_PATH (instead of 

Cool.  You've tested it interactively, I presume, and it does the right thing?
(Just looking for confirmation so I can apply the fix without needing to set up
an interactive test environment).

- C

Repoze-dev mailing list

Reply via email to