mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 10:26:35 +00:00
fix: safe path join
This commit is contained in:
@@ -317,7 +317,8 @@ export const nodePath = Object.assign({}, path, {
|
||||
|
||||
try {
|
||||
orURI = new URL(input)
|
||||
input = orURI.pathname
|
||||
input = input.replace(orURI.protocol, '')
|
||||
.replace(/^\/+/, '/')
|
||||
} catch (_e) {}
|
||||
|
||||
input = path.join(input, ...paths)
|
||||
|
||||
Reference in New Issue
Block a user