As ToscaWidgets concatenates the named of nested form widgets by dots,
the request looks like:
/login?login.user=user&login.pass=pass&login.submit=Login
Unfortunately (at least in this case), TurboGears seems to use
formencode.variabledecode.variable_decode to create a nested dict out
of the request params.
The params therefore are:
{'login': {'user': 'user', 'pass': 'pass', 'submit': 'Login'}}
But Identity cannot handle nested request params.
See turbogears.identity.identity_from_form:
submit= params.pop(self.submit_button_name, None)
That, of course, won't work when self.submit_button_name is
"login.submit", because no such key exists.
Instead the value is found in params['login']['submit'].
A simple fix would be to use this as the first line in
identity_from_form:
params = formencode.variabledecode.variable_encode(cherrypy.request.params)
I don't think that it should have negative side effects.
What do you think?
Felix Schwarz suggested to move the NestedVariablesFilter into the
expose function, with NestedVariablesFilter=True by default to
preserve the current behavior.