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

Fix #63 by chars restriction #74

Closed
wants to merge 1 commit into from
Closed

Conversation

gmarsay
Copy link
Contributor

@gmarsay gmarsay commented Jun 16, 2020

For fix issue #63, restrict allowed chars with regex : /^[a-zA-Z0-9.:-\\/]*$/

@zorun
Copy link
Collaborator

zorun commented Jun 16, 2020

Cool, another contribution 👍

Please move the reindent to a separate commit or PR, because it's really hard to review the actual change fixing #63

@zorun
Copy link
Collaborator

zorun commented Jun 28, 2020

Hi @gmarsay , any news on this?

@gmarsay gmarsay changed the title Fix #63 by chars restriction and reindent file Fix #63 by chars restriction Jun 28, 2020
@gmarsay
Copy link
Contributor Author

gmarsay commented Jun 28, 2020

Hi @zorun

I change with only patch for #63

@zorun
Copy link
Collaborator

zorun commented Jun 28, 2020

Thanks!

However it looks like this does not really address the root cause of the problem?

From what I understand of #63, it seems to be caused by this line in layout.html:

request_args = "{{session.request_args|safe}}";

This variable is definitely not safe for use in javascript code.

@gmarsay
Copy link
Contributor Author

gmarsay commented Jun 29, 2020

In this case maybe we should not close ticket #63 right away, but that limits the allowed characters.
It's a first step.

@gmarsay
Copy link
Contributor Author

gmarsay commented Aug 23, 2020

Hi @zorun, any news on this?

@zorun
Copy link
Collaborator

zorun commented May 10, 2021

Sorry, I'm not very reactive on the project (see #65)

The main issue is that your fix prevents the web UI from creating invalid URLs, but it does not prevent somebody from manually creating an URL like https://lg.example.com/adv_bgpmap/router/ipv4?q=<javascript injection>

I've fixed the root cause of the issue in #82

@zorun zorun closed this May 10, 2021
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

Successfully merging this pull request may close these issues.

2 participants