#2444: TG 2.1a3 dispatcher mistakenly assumes all required positional parameters
are provided
------------------------+---------------------------------------------------
Reporter: mcfletch | Owner:
Type: defect | Status: new
Priority: normal | Milestone: __unclassified__
Component: TurboGears | Version: 2.1a3
Severity: normal | Keywords:
------------------------+---------------------------------------------------
At line 145 of dispatcher.py, the code makes the assumption that it can do
remainder[i]. If the user provides 1 parameter positionally (i.e. as part
of the URL) and the next via keyword argument, the handler raises an
exception trying to assign remainder[i]... fix:
for i,var in enumerate(required_vars):
if i < len(remainder):
remainder[i] = params[var]
del params[var]
that is, check for i< len(remainder) before attempting to assign to it.
--
Ticket URL: <http://trac.turbogears.org/ticket/2444>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en