]> source.dussan.org Git - nextcloud-server.git/commitdiff
Sanitize name of sharee
authorLukas Reschke <lukas@statuscode.ch>
Sat, 14 Jun 2014 18:45:10 +0000 (20:45 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Sat, 14 Jun 2014 18:45:10 +0000 (20:45 +0200)
Fixes a XSS introduced with https://github.com/owncloud/core/commit/271684dcfec16122b88e03780b41af7120f27e45

apps/files_sharing/js/share.js

index 47fe0bd2c571304508df9d8abd457c7dfa599379..0999bfd6bed5e51e73cf921ed181f083724b05b2 100644 (file)
@@ -57,7 +57,7 @@
                                                                        ' data-action="Share-Notification" href="#" original-title="">' +
                                                                        ' <img class="svg" src="' + OC.imagePath('core', 'actions/share') + '"></img>';
                                                        $tr.find('.fileactions').append(function() {
-                                                               var shareBy = t('files_sharing', 'Shared by {owner}', {owner: fileData.shareOwner});
+                                                               var shareBy = t('files_sharing', 'Shared by {owner}', {owner: escapeHTML(fileData.shareOwner)});
                                                                var $result = $(shareNotification + '<span> ' + shareBy + '</span></span>');
                                                                $result.on('click', function() {
                                                                        return false;