Skip to content

Commit 5f049fe

Browse files
Merge pull request #878 from blesildaramirez/i9717
pkp/pkp-lib#9717 Resolve template injection risks in Smarty/Vue interactions
2 parents 8a6e904 + 996ecc7 commit 5f049fe

File tree

4 files changed

+36
-2
lines changed

4 files changed

+36
-2
lines changed

package-lock.json

+33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"cypress-file-upload": "^5.0.8",
5656
"cypress-iframe": "^1.0.1",
5757
"cypress-wait-until": "^2.0.1",
58+
"dompurify": "^3.2.4",
5859
"eslint": "^8.48.0",
5960
"eslint-plugin-vue": "^9.17.0",
6061
"google-closure-compiler-java": "^20200719.0.0",

plugins/importexport/native/templates/index.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
/>
8585
<span
8686
class="listPanel__itemSubTitle"
87-
v-html="localize(
87+
v-strip-unsafe-html="localize(
8888
item.publications.find(p => p.id == item.currentPublicationId).fullTitle,
8989
item.publications.find(p => p.id == item.currentPublicationId).locale
9090
)"

templates/submission/review-relation.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<div class="submissionWizard__reviewPanel__item">
3030
<template v-if="publication.relationStatus === {\APP\publication\Publication::PUBLICATION_RELATION_PUBLISHED}">
3131
<template v-if="publication.vorDoi">
32-
<span v-html="replaceLocaleParams(i18nRelationWithLink, {ldelim}vorDoi: publication.vorDoi{rdelim})"></span>
32+
<span v-strip-unsafe-html="replaceLocaleParams(i18nRelationWithLink, {ldelim}vorDoi: publication.vorDoi{rdelim})"></span>
3333
</template>
3434
<template v-else>
3535
{translate key="publication.relation.published"}

0 commit comments

Comments
 (0)