瀏覽代碼

fix: insecure connection over LAN

Timothy Jaeryang Baek 2 月之前
父節點
當前提交
660a44c918
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/lib/utils/onedrive-file-picker.ts

+ 3 - 1
src/lib/utils/onedrive-file-picker.ts

@@ -1,3 +1,5 @@
+import { v4 as uuidv4 } from 'uuid';
+
 let CLIENT_ID = '';
 
 async function getCredentials() {
@@ -84,7 +86,7 @@ const params = {
 	authentication: {},
 	messaging: {
 		origin: window?.location?.origin,
-		channelId: crypto.randomUUID()
+		channelId: uuidv4()
 	},
 	typesAndSources: {
 		mode: 'files',