Fixes usage of v-html in metadata and metadata section forms that could lead to XSS attack.

This commit is contained in:
mateuswetah 2023-11-17 16:32:53 -03:00
parent f1609205d5
commit 6a63243ddf
2 changed files with 12 additions and 2 deletions

View File

@ -10,7 +10,12 @@
v-if="form && Object.keys(form).length"
class="tainacan-modal-content">
<div class="tainacan-modal-title">
<h2 v-html="form.name ? ($i18n.get('instruction_configure_the_metadata_section') + ' <em>' + form.name + '</em>') : $i18n.get('instruction_configure_new_metadata_section')" />
<h2 v-if="form.name">
{{ $i18n.get('instruction_configure_the_metadata_section') }}&nbsp;<em>{{ form.name }}</em>
</h2>
<h2 v-else>
{{ $i18n.get('instruction_configure_new_metadata_section') }}
</h2>
<hr>
</div>
<div class="tainacan-form">

View File

@ -10,7 +10,12 @@
v-if="form && Object.keys(form).length"
class="tainacan-modal-content">
<div class="tainacan-modal-title">
<h2 v-html="form.name ? ($i18n.get('instruction_configure_the_metadatum') + ' <em>' + form.name + '</em>') : $i18n.get('instruction_configure_new_metadatum')" />
<h2 v-if="form.name">
{{ $i18n.get('instruction_configure_the_metadatum') }}&nbsp;<em>{{ form.name }}</em>
</h2>
<h2 v-else>
{{ $i18n.get('instruction_configure_new_metadatum') }}
</h2>
<!-- <a
class="back-link"
@click="onEditionCanceled()">