mirror of
https://github.com/nextcloud/server.git
synced 2026-05-25 02:34:12 -04:00
Prevent special characters from breaking the file drop remote url
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
140f3d2ee0
commit
8e0ebb10a4
1 changed files with 4 additions and 0 deletions
|
|
@ -28,7 +28,11 @@
|
|||
useHTTPS: OC.getProtocol() === 'https'
|
||||
});
|
||||
|
||||
// We only process one file at a time 🤷♀️
|
||||
var name = data.files[0].name;
|
||||
// removing unwanted characters
|
||||
name = name.replace(/["'#%`]/gm, '');
|
||||
|
||||
try {
|
||||
// FIXME: not so elegant... need to refactor that method to return a value
|
||||
Files.isFileNameValid(name);
|
||||
|
|
|
|||
Loading…
Reference in a new issue