1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 17:02:47 +00:00

Repair xss bug (#5256)

* repair upload file with same script name bug

* update repo name xss bug

* fix: transform lib xss bug

* optimize code
This commit is contained in:
杨顺强
2022-09-08 16:42:55 +08:00
committed by GitHub
parent db77c8e8ad
commit 91d1751a57
9 changed files with 71 additions and 25 deletions

View File

@@ -231,15 +231,6 @@ export const Utils = {
.innerHTML;
},
generateDialogTitle: function(title, operationTarget) {
/*
* @param title: gettext('...{placeholder}...')
*/
const targetStr = this.HTMLescape(operationTarget);
const str = `<span class="op-target ellipsis ellipsis-op-target" title=${targetStr}>${targetStr}</span>`;
return title.replace('{placeholder}', str);
},
getFileName: function(filePath) {
let lastIndex = filePath.lastIndexOf('/');
return filePath.slice(lastIndex+1);