fix: correct split logic in parseSubinfo (#960)

This commit is contained in:
Memory 2025-08-15 20:21:18 +08:00 committed by GitHub
parent a23e23a697
commit e20e46aebe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -226,7 +226,7 @@ function parseFilename(str: string): string {
// subscription-userinfo: upload=1234; download=2234; total=1024000; expire=2218532293
function parseSubinfo(str: string): ISubscriptionUserInfo {
const parts = str.split('; ')
const parts = str.split(/\s*;\s*/)
const obj = {} as ISubscriptionUserInfo
parts.forEach((part) => {
const [key, value] = part.split('=')