1. 15 Mar, 2026 1 commit
    • erio's avatar
      fix(billing): treat nil rate limit window as expired to prevent usage accumulation · 9e8959c5
      erio authored
      When Redis cache is populated from DB with a NULL window_1d_start, the
      Lua increment script only updates usage counters without setting window
      timestamps. IsWindowExpired(nil) previously returned false, so the
      accumulated usage was never reset across time windows, effectively
      turning usage_1d into a lifetime counter. Once this exceeded
      rate_limit_1d the key was incorrectly blocked with "日限额已用完".
      
      Fixes Wei-Shaw/sub2api#1022
      9e8959c5
  2. 07 Mar, 2026 2 commits