Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing parameters in URL when authentication is necessary #21

Closed
MarkusAlbrechtSWM opened this issue Feb 5, 2024 · 1 comment
Closed

Comments

@MarkusAlbrechtSWM
Copy link

When calling QWC2 with start parameters in the URL, the parameters get lost if authentication is required.

For example, if QWC2 is called with the following start parameters:

https://qwc2-host/?c=688091.313644,5338424.983487&crs=EPSG:25832&s=500&l=Layer1,Layer2&hc=true

and authentication is required, a redirect to the following URL is sent:

https://qwc2-host/login?url=https://qwc2-host/?c=688091.313644,5338424.983487&crs=EPSG:25832&s=500&l=Layer1,Layer2&hc=true

Unpacking the URL in the qwc-oidc-auth-Module with target_url = request.args.get('url', tenant_base()) leads to the loss of all parameters except one.

The cause of this problem is a missing URL encoding in the qwc-map-viewer's server.py at Line 80.

Suggested Fix

I suggest encoding request.url with urllib's urllib.parse.quote(request.url) to address this issue.

manisandro added a commit that referenced this issue Feb 23, 2024
@manisandro
Copy link
Member

Sorry for the late reply, missed the issue. Thanks for the report, fixed in c42b7d1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants