Roundup Tracker - Issues

Issue 2551406

classification
Templating Error: too many values to unpack (expected 2)
Type: crash Severity: major
Components: Web interface Versions: 2.5.0
process
Status: fixed fixed
:
: : cmeerw, rouilj
Priority: high : Effort-Low

Created on 2025-06-02 11:14 by cmeerw, last changed 2025-06-02 12:55 by rouilj.

Messages
msg8392 Author: [hidden] (cmeerw) Date: 2025-06-02 11:14
In cgi/client.py we have:

        # determine if view is oktmpl|errortmpl. If so assign the
        # right one to the view parameter. If we don't have alternate
        # templates, just leave view alone.
        if (view and view.find('|') != -1):
            # we have alternate templates, parse them apart.
            (oktmpl, errortmpl) = view.split("|", 2)

Presumably, the last line should be:

            (oktmpl, errortmpl) = view.split("|", 1)

to avoid a ValueError exception when there is more than one "|".

This can be triggered by something like

  ?%40template=forgotten%7c%7x

as a query parameter.
msg8393 Author: [hidden] (rouilj) Date: 2025-06-02 12:55
Fixed as recommended in changeset:   8320:b07165add61b.

Also added a test to exercise this case and make sure an error was reported to the user.

Thanks for reporting this and the fix Christof.

Also do you have commit rights to the repo? If so feel free to take the ticket and
commit changes like this in the future.
History
Date User Action Args
2025-06-02 12:55:47rouiljsetstatus: new -> fixed
resolution: fixed
messages: + msg8393
nosy: + rouilj
2025-06-02 11:14:39cmeerwcreate