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

Potential future shenanigans with service attribute #565

Open
zardus opened this issue Sep 16, 2024 · 0 comments
Open

Potential future shenanigans with service attribute #565

zardus opened this issue Sep 16, 2024 · 0 comments

Comments

@zardus
Copy link
Contributor

zardus commented Sep 16, 2024

This:

service = request.args.get("service")

... leading to
if start_on_demand_service(user, service) is False:

... leading to
f"/run/current-system/sw/bin/dojo-{service_name}",

... only saved by
if service_name not in on_demand_services:

Future refactors can easily turn this into a problem. We need to sanitize the service attribute. The most complex part of that is

service_name, user_id, access_code = service.split("~", 2)
and the question of what chars are valid in an access code. It's that, plus [A-Za-z0-9~]

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

1 participant