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

nsqadmin: html-escaping large_graph url breaks inside javascript #1068

Merged
merged 3 commits into from
Aug 4, 2018

Conversation

ploxiln
Copy link
Member

@ploxiln ploxiln commented Aug 3, 2018

ends up like /render?colorList=green&height=450&...
= was not escaped to = before
this starts the url hash which is not sent to the server

I'm still validating that this change actually fixes it
cc @jehiah

Copy link
Member

@jehiah jehiah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 handlebars {{...}} does html escaping not json encoding so this makes sense.

@ploxiln
Copy link
Member Author

ploxiln commented Aug 3, 2018

alrighty, it works now. I'll squash down (all but the .eslintrc) if you approve

@ploxiln
Copy link
Member Author

ploxiln commented Aug 3, 2018

side note, I currently have this mini script I run as ./go-bindata:

#!/bin/sh
set -eu
go-bindata --modtime=1533016989 --pkg=nsqadmin "$@" --prefix=static/build static/build/...
gofmt -w bindata.go

@mreiferson
Copy link
Member

cool

ploxiln added 3 commits August 3, 2018 11:36
ends up like /render?colorList=green&height=450&...
'=' was not escaped to "=" before recent js lib updates
this starts the url "hash" part which is not sent to the server

so put html-escaped url in plainer html part of page (src attribute)
@ploxiln ploxiln force-pushed the admin_counter_graph branch from 701eb95 to d246d15 Compare August 3, 2018 15:38
@ploxiln
Copy link
Member Author

ploxiln commented Aug 3, 2018

squashed a bit

@ploxiln ploxiln merged commit 431792b into nsqio:master Aug 4, 2018
@ploxiln ploxiln deleted the admin_counter_graph branch February 1, 2019 23:21
@mreiferson mreiferson added the bug label Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants