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

feat: add URL validation #443

Merged
merged 6 commits into from
Aug 22, 2023
Merged

feat: add URL validation #443

merged 6 commits into from
Aug 22, 2023

Conversation

mbhrznr
Copy link
Contributor

@mbhrznr mbhrznr commented Aug 22, 2023

closes #378.

adds some naive url validations to the submit route.
adds some tests for these naive validations.

these validations check that:

  • the urls start w/ http: or https:
  • the urls don't use local ip addresses and/or localhost

Copy link
Contributor

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks, Michael!

utils/url_validation.ts Outdated Show resolved Hide resolved
@iuioiua
Copy link
Contributor

iuioiua commented Aug 22, 2023

Note to self: URL.canParse() types are missing.

@iuioiua iuioiua changed the title feat: add url validation feat: add URL validation Aug 22, 2023
@iuioiua iuioiua merged commit 088c0ff into denoland:main Aug 22, 2023
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.

proposal: validate urls
2 participants