4 messages in com.googlegroups.pylons-discussRe: accessing _action awith -action
FromSent OnAttachments
Tomasz Nazar20 Sep 2007 17:13 
Adomas Paltanavičius22 Sep 2007 00:04 
Philip Jenvey23 Sep 2007 14:05 
Tomasz Nazar27 Sep 2007 18:07 
Subject:Re: accessing _action awith -action
From:Philip Jenvey (pjen@public.gmane.org)
Date:09/23/2007 02:05:42 PM
List:com.googlegroups.pylons-discuss

On Sep 22, 2007, at 12:04 AM, Adomas Paltanavičius wrote:

In fact, dashes can be used instead of underscores anywhere, i.e. / controller/this-is-my-action is the same as /controller/this_is_my_action. Python does not allow dashes in method names but underscores look so ugly in links hence this. However, it seems you have found a bug.

Cheers, Adomas

On 9/21/07, Tomasz Nazar <toma@public.gmane.org >
wrote: Hi there!

In the controller I do have 'def _a(self):' action (private method really) It's I think odd what is happening when I access it these ways:

http://localhost:5000/controller/_a , Result is good: "Error 404 Not Found" http://localhost:5000/controller/.a , Result is good: " exceptions.NotImplementedError: Action .a is not implemented " http://localhost:5000/controller/-a , Result is not well: It actually executed action! Is it on purpose? Does 'dash' have a special meaning in the url.. ?

Woops, this is definitely a bug (a nice little security hole in fact). This has been fixed on trunk (so accessing /-a should result in a 404 like /_a); this will warrant a 0.9.6.1 release sooner than later (maybe tomorrow).