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

URL-encode the check path automatically, or reject bad paths #7

Open
cespare opened this issue Oct 22, 2013 · 0 comments
Open

URL-encode the check path automatically, or reject bad paths #7

cespare opened this issue Oct 22, 2013 · 0 comments

Comments

@cespare
Copy link
Collaborator

cespare commented Oct 22, 2013

Writing graphite/shadow checks, I end up with a lot of characters (*, {, <, ...) that require url-encoding. Otherwise, you get an exception from the http request (which is masked and shown to the user as "Error connecting...").

Two options:

  • URL-encode the path that the user gives (either before storing it to the DB, or each time before running the check). This will allow the user to supply a more human-readable URL, but will confuse a user that supplies a URL that's already encoded.
  • Check the validity of a URL by parsing it using the same library that http/get uses. If this fails, alert the user instead of allowing him/her to set a bad check.

Thoughts?

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

No branches or pull requests

1 participant