Repository navigation
Sub2API 0.1.203
Maintenance release covering the 12 audited issues in payments, storage, authentication, expiration, and dashboard time ranges.
Bug fixes
- Make non-forced balance refunds deduct the full required balance atomically, preventing concurrent spending from producing an under-deducted cash refund.
- Preserve the stored S3 secret ciphertext when backup settings are saved with an empty secret field.
- Invalidate authentication and billing balance caches after refund deductions or compensation, respecting transaction commits.
- Preserve the exact API key expiration selected in the UI. The new
expires_atfield takes precedence; existingexpires_in_daysclients remain supported. - Apply the configured default RPM limit when an OAuth user completes registration by providing an email address.
- Preserve partial remaining subscription days when redeeming a negative-day adjustment.
- Apply the registration email whitelist only to new OAuth accounts so existing users can still sign in.
- Preserve and encrypt the config-file image-storage secret on the first admin settings save.
- Rebuild the image uploader after reused backup S3 credentials change. Other application instances refresh their configuration within 60 seconds.
- Validate recharge channel limits against the total including fees. Align fee calculations, amount precision, and display with backend currency rules.
- Make the image-storage connection test send an authenticated S3 bucket request and report connection or permission errors.
- Initialize the operations dashboard custom time range in local time, avoiding UTC offset shifts.
Refund confirmation
- Pending refunds now retain their original balance or subscription deduction until a confirmed outcome. A confirmed failure restores the retained deduction; a confirmed success does not deduct twice.
- Add Alipay refund queries using the original refund request number, signed SDK requests, and order, merchant, trade, request, and amount validation. Uncertain query results do not restore the reserved balance.
- Legacy pending records that already returned their balance are settled without silently reducing the deduction after a confirmed cash refund.
Upgrade notes
- Existing backup S3 secrets saved as plaintext by an older release cannot be safely distinguished from undecryptable legacy ciphertext. Re-enter the S3 secret once in backup settings with a persistent encryption key configured to ensure encrypted storage. Blank-secret edits preserve the existing stored value exactly.
- Older pending Alipay refunds may have discarded the original refund request number. These records require reconciliation with Alipay before manual correction; the application reports the missing request number instead of guessing a final outcome.
Validation
- Backend unit and integration tests, including refund, OAuth, API key, subscription, and S3 regression coverage.
- Frontend full test suite: 241 test files and 1,719 tests passed, plus lint, TypeScript checks, and production build.
- Go static analysis and embedded server build.
- GitHub CI and security checks passed for commit
f3021daec7f1a3c189221f505262be99a307d303. - Make integration-test email fixtures unique independently of Windows clock resolution.
Installation
docker pull forever94yu/sub2api:0.1.203Linux amd64/arm64, macOS amd64/arm64, and Windows amd64 archives are available below, along with checksums.txt.