fix: allow all internal urls
This commit is contained in:
parent
b426c3bedd
commit
6131aa63fd
3 changed files with 890 additions and 839 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -3,7 +3,7 @@ import FileUploaderComponent from "./FileUploader.vue";
|
|||
import { watch } from "vue";
|
||||
|
||||
class FileUploader {
|
||||
static ExtraOptions = []
|
||||
static UploadOptions = []
|
||||
constructor({
|
||||
wrapper,
|
||||
method,
|
||||
|
|
@ -66,7 +66,7 @@ class FileUploader {
|
|||
allow_toggle_private,
|
||||
allow_toggle_optimize,
|
||||
allow_google_drive,
|
||||
other_options: this.constructor.ExtraOptions.map((k) => ({
|
||||
other_options: this.constructor.UploadOptions.map((k) => ({
|
||||
...k,
|
||||
wrappedAction: () =>
|
||||
k.action({
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ def add_attachments(doctype, name, attachments):
|
|||
|
||||
|
||||
def is_safe_path(path: str) -> bool:
|
||||
if path.startswith(("http://", "https://", "/api/method/drive.api.files.get_file_content")):
|
||||
if path.startswith(("http://", "https://", "/api/method/")):
|
||||
return True
|
||||
|
||||
basedir = frappe.get_site_path()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue