-
Notifications
You must be signed in to change notification settings - Fork 451
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
Review html escaping strategy on vue.js codebase in stable-3_3_0 and stable-3_4_0 #9421
Comments
(Several Vue components are using {{ submissionTitle }} to present submission titles -- this will escape HTML elements that are legitimately there. This will also need to be fixed when we have a good partial filter.) |
…tly stricter DOMPurify
…tly stricter DOMPurify
As first 'catch all' round, replacing v-html with v-pkp-allowed-html, which sanitise the inputs with restricted set of elements and attributes - same as allowed_html in config.inc.php. This is significant improvement over using v-html. These changes should be safe to be applied also for 3.3 and 3.4, without causing regressions. OJS: pkp/ojs#4165 It would be good to even reduce use of v-pkp-allowed-html to the minimum, which I will explore later for 3.5. Goal is really not have any XSS opportunities in Vue.js code base. Should provide enough protection for cases like this - #9408 |
…apiBaseUrl to use same pkp.serverContext object
…y string by sanitize.
For 3.3 and 3.4 just simple replacement of v-html with v-strip-unsafe-html. Thats using dompurify, which is performant & security oriented html sanitiser with default 'html' profile. Keeping things simple just to address security. Having allowed tags is something we can introduce in 3.5. 3.3 3.4 Hope its all correctly created and setup.. Lets see whether tests pass. ping @asmecher @jonasraoni on code review. Thank you! |
Reviewed all and merged (Edit: it's a missing ui-library submodule update. comment) |
* pkp/pkp-lib#9421 replace v-html with v-strip-unsave-html * pkp/pkp-lib#9421 doc tool might require v-html
Thanks, @jardakotesovec! I've merged the I've moved this back to the 3.3.0-17 milestone (where this will first be released) and added a note to #9717 referring back here, so when we revise our strategy on |
Description
Vue.js escape html by default, but to support html in translations and some metadata we use v-html on many places.
The text was updated successfully, but these errors were encountered: