Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: vulnerability in server error toast messages
  • Loading branch information
Fabio286 committed Jun 25, 2021
1 parent a975df3 commit 3aef7e9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/renderer/components/BaseToast.vue
Expand Up @@ -4,7 +4,7 @@
class="toast mt-2"
:class="toastStatus.className"
>
<span class="p-vcentered text-left" v-html="`${toastStatus.iconTag} ${message}`" />
<span class="p-vcentered text-left"><i class="mdi mdi-24px mr-1" :class="toastStatus.iconName" /> {{ message }}</span>
<button class="btn btn-clear" @click="hideToast" />
</div>
</template>
Expand All @@ -30,27 +30,27 @@ export default {
computed: {
toastStatus () {
let className = '';
let iconTag = '';
let iconName = '';
switch (this.status) {
case 'success':
className = 'toast-success';
iconTag = '<i class="mdi mdi-24px mdi-check mr-1"></i>';
iconName = 'mdi-check';
break;
case 'error':
className = 'toast-error';
iconTag = '<i class="mdi mdi-24px mdi-alert-rhombus mr-1"></i>';
iconName = 'mdi-alert-rhombus';
break;
case 'warning':
className = 'toast-warning';
iconTag = '<i class="mdi mdi-24px mdi-alert mr-1"></i>';
iconName = 'mdi-alert';
break;
case 'primary':
className = 'toast-primary';
iconTag = '<i class="mdi mdi-24px mdi-information-outline mr-1"></i>';
iconName = 'mdi-information-outline';
break;
}
return { className, iconTag };
return { className, iconName };
}
},
watch: {
Expand Down

0 comments on commit 3aef7e9

Please sign in to comment.