mirror of
https://github.com/wekan/wekan.git
synced 2026-01-30 21:25:17 +01:00
Try to fix some security issues. Part 2.
Thanks to responsible security disclosure contributors and xet7 !
This commit is contained in:
parent
e34cfad06b
commit
382168a5b4
9 changed files with 2198 additions and 3712 deletions
|
|
@ -151,6 +151,7 @@ if (Meteor.isServer) {
|
|||
check(fileObjId, String);
|
||||
check(newName, String);
|
||||
// If new name is same as sanitized name, does not have XSS, allow rename file
|
||||
// Using isomorphic-dompurify that is isometric so it works also serverside.
|
||||
if (newName === DOMPurify.sanitize(newName)) {
|
||||
const fileObj = Attachments.findOne({_id: fileObjId});
|
||||
rename(fileObj, newName, fileStoreStrategyFactory);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue