get_sso assumes request.url.port is set

Bug #2015257 reported by Danny Webb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
skyline apiserver
Fix Committed
Undecided
Unassigned

Bug Description

Skyline can render invalid redirect URIs for keystone if request.url.port isn't properly rendered because a default port (eg 80/443) is used. It will create invalid redirects with :None in them.

https://opendev.org/openstack/skyline-apiserver/src/branch/master/skyline_apiserver/api/v1/login.py#L210

it can be fixed by only setting the port if it's explicitly passed, eg:

        tmp_port = f":{request.url.port}" if request.url.port else ""
        base_url = f"{url_scheme}://{request.url.hostname}{tmp_port}"

Revision history for this message
Danny Webb (dannyswebb) wrote :

Apologies, but it's been some while since I've used launchpad so just going to link a fix:

https://review.opendev.org/c/openstack/skyline-apiserver/+/879465

Revision history for this message
Shuai Qian (iauhsnaiq) wrote :

Yes we fixed it. Thanks for your reports anyway.

Boxiang Zhu (bxzhu-5355)
Changed in skyline-apiserver:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.