N°3835 Upload file name security hardening

This commit is contained in:
Stephen Abello
2021-12-02 10:40:18 +01:00
parent f039d54a51
commit 7db97c6804

View File

@@ -3,6 +3,7 @@
{% if oUIBlock.GetShowFilename() %}
$('#{{ oUIBlock.GetId() }}').bind('change', function() {
var fileName = $(this).val().replace(/^.*[\\\/]/, '');
fileName = $('<div/>').text(fileName).html();
$('#{{ oUIBlock.GetId() }}-file-name').html(fileName);
});
{% endif %}