Commit c1f8a9a
committed
feat: add 30-45s random delay before portal credential POST
Garmin's Cloudflare WAF rate-limits requests that go directly from
the SSO page GET to the login POST without intervening activity.
A random 30-45s delay mimics natural browser behavior and helps
avoid the 429 block. Adapted from upstream PR cyberjunky#346.
The delay only applies to the portal+cffi / portal+requests
fallback strategies. The widget+cffi primary strategy uses a
different (HTML form, no clientId) endpoint that is not subject
to per-clientId rate limiting and does not need this delay.1 parent f2f403b commit c1f8a9a
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
511 | 513 | | |
512 | 514 | | |
513 | 515 | | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
514 | 524 | | |
515 | 525 | | |
516 | 526 | | |
| |||
0 commit comments