@samitouri / QOSami-HFS / commits / 441cdb3e

fix: error ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING using webdav or any clear-text login

Massimo Melina committed Mar 7, 2026 at 15:18 UTC 441cdb3e4995b9747050fd1bc729f34a4fc85d22
1 file changed +3 -2
src/srp.ts
+3 -2
@@ -1,5 +1,7 @@
1 // This file is part of HFS - Copyright 2021-2023, Massimo Melina <a@rejetto.com> - License https://www.gnu.org/licenses/gpl-3.0.txt
2
3 +import { SRPClientSession, SRPParameters, SRPRoutines } from 'tssrp6a'
4 +
5 export async function srpClientSequence(username:string, password:string, apiCall: (cmd:string, params:any) => any, extra?: object) {
6 const { pubKey, salt } = await apiCall('loginSrp1', { username })
7 if (!salt) throw Error('salt')
@@ -10,9 +12,8 @@ export async function srpClientSequence(username:string, password:string, apiCal
12 }
13
14 export async function srpClientPart(username: string, password: string, salt: string, pubKey: string) {
13 - const { SRPClientSession, SRPParameters, SRPRoutines } = await import('tssrp6a')
15 const srp6aNimbusRoutines = new SRPRoutines(new SRPParameters())
16 const srpClient = new SRPClientSession(srp6aNimbusRoutines);
17 const res = await srpClient.step1(username, password)
18 return await res.step2(BigInt(salt), BigInt(pubKey))
18 -}
\ No newline at end of file
19 +}