-
Notifications
You must be signed in to change notification settings - Fork 2k
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
safely escape <script> injected code #3101
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this up
@@ -1,4 +1,6 @@ | |||
const { URL } = require('url') | |||
const serialize = require('serialize-javascript') | |||
|
|||
const tokenService = require('../helpers/jwt') | |||
const { hasMatch, sanitizeHtml } = require('../helpers/utils') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is sanitizeHtml
still used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right! good catch. I'll remove the whole function. eslint would have caught unused sanitizeHtml but we only use warning for most rules 😄 we need to eventually go through all warnings and fix them so we can upgrade more eslint rules to error. now it's just too many warning so I tend to ignore them all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#3095 ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!!
* main: (23 commits) Release Set node version in `workflows/cdn.yml` to 16.x Release build: add stylelint (#3124) Core: rename allowMultipleUploads to allowMultipleUploadBatches (#3115) meta: enforce `no-unused-vars` linter rule (#3118) writing-plugins: update example to use `i18nInit` (#3122) @uppy/core: reject empty string as valid value for required meta fields (#3119) Safely escape <script> injected code in companion `send-token.js` (#3101) @uppy/dashboard: fix metafield form validation (#3113) Clean up `BACKLOG.md` & add Vimeo as todo Add referrer to transloadit.com link (#3116) @uppy/locales latest version is 1.22.0 🙈 Stricter linter (#3095) @uppy/aws-s3: refactor to use private fields (#3094) build: fix legacy bundle (#3112) Fix locales — point to CDN v1.31.0 Fix typo in `docs/companion.md` Changelog for 1.31.0 and patches Strictly type uppy events (#3085) ...
fixes #2974