websockfiy open redirection unit test broken with Python >= 3.10.6 standard lib
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Critical
|
melanie witt | ||
Train |
Fix Released
|
Undecided
|
Unassigned | ||
Ussuri |
Fix Committed
|
Undecided
|
Unassigned | ||
Victoria |
Fix Committed
|
Undecided
|
Unassigned | ||
Wallaby |
Fix Committed
|
Undecided
|
Unassigned | ||
Xena |
Fix Released
|
Undecided
|
Unassigned | ||
Yoga |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Lucas Nussbaum reported this Debian bug:
https:/
so I started investigating it. It took me a while to understand it was due to a change in the Python 3.10.6 standard http/server.py library.
Running these 2 unit tests against Python 3.10.5 works:
test_websocketp
console.
However, under Python 3.10.6, this fails. The reason isn't the interpreter itself, but the standard library, which has additional open redirection protection.
Looking at the changelog here:
https:/
we see this issue:
https:/
which has been addressed by this commit:
https:/
If I "fix" the Python 3.10.5 standard library using the 2 lines of code of the first hunk of this patch, then I can reproduce the issue.
I guess that the unit testing should be skipped if using Python >= 3.10.6, probably, or adapted somehow. I leave this to the Nova maintainers: for the Debian package, I'll just skip these 2 unit tests.
Cheers,
Thomas Goirand (zigo)
Note: we haven't hit this in the gate because it's still running 3.10.4, but it's coming for us.