Skip to content

Sub2API 0.1.203

Choose a tag to compare

@github-actions github-actions released this 07 Oct 05:13
· 3 commits to main since this release

Maintenance release covering the 12 audited issues in payments, storage, authentication, expiration, and dashboard time ranges.

Bug fixes

  1. Make non-forced balance refunds deduct the full required balance atomically, preventing concurrent spending from producing an under-deducted cash refund.
  2. Preserve the stored S3 secret ciphertext when backup settings are saved with an empty secret field.
  3. Invalidate authentication and billing balance caches after refund deductions or compensation, respecting transaction commits.
  4. Preserve the exact API key expiration selected in the UI. The new expires_at field takes precedence; existing expires_in_days clients remain supported.
  5. Apply the configured default RPM limit when an OAuth user completes registration by providing an email address.
  6. Preserve partial remaining subscription days when redeeming a negative-day adjustment.
  7. Apply the registration email whitelist only to new OAuth accounts so existing users can still sign in.
  8. Preserve and encrypt the config-file image-storage secret on the first admin settings save.
  9. Rebuild the image uploader after reused backup S3 credentials change. Other application instances refresh their configuration within 60 seconds.
  10. Validate recharge channel limits against the total including fees. Align fee calculations, amount precision, and display with backend currency rules.
  11. Make the image-storage connection test send an authenticated S3 bucket request and report connection or permission errors.
  12. 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.203

Linux amd64/arm64, macOS amd64/arm64, and Windows amd64 archives are available below, along with checksums.txt.

Installation guide