# G3 Rate limits and request CSRF

[Index](../index.md) | [Tree](../tree.md) | HTML version: [G3.html](G3.html)

Abuse limits on the request form: the 10-minute cooldown seen from a stale second tab, the 5-links-per-24-hours daily limit (reached by DB manipulation), and a forged or stale form token on the request.

<a id="a12"></a>
## A12 Cooldown: second request within 10 min (stale tab)

*Language: EN | Mode: login | Status: PASS | Repo spec: GOL S3 (via request.post)*

two tabs on My Account; link requested in tab 2 (success flash), then the still-enabled button in tab 1 gives the warning flash "We've just sent you a link. Please wait 10 min..."; Mailpit still has exactly 1 confirmation mail, 1 link row

![01. tab 1 notice before any request](../media/G3/A12-01-tab-1-notice-before-any-request.png)
*01. tab 1 notice before any request*

![02. tab 2 success flash](../media/G3/A12-02-tab-2-success-flash.png)
*02. tab 2 success flash*

![03. tab 1 wait warning](../media/G3/A12-03-tab-1-wait-warning.png)
*03. tab 1 wait warning*

Video: [A12-cooldown-stale-tab-tab1](../media/G3/A12-cooldown-stale-tab-tab1.webm)

Video: [A12-cooldown-stale-tab-tab2](../media/G3/A12-cooldown-stale-tab-tab2.webm)

<a id="a13"></a>
## A13 Daily limit: 5 links per 24 h

*Language: EN | Mode: login | Status: PASS | Repo spec: GOL S3*

reached by DB manipulation (A12 link aged 1 h + 4 extra link rows inserted, i.e. 5 in 24 h): My Account shows disabled "Send the link again" + "You've requested too many links today..."; a stale tab's Send click gives the same text as a warning flash; still 1 mail, 5 link rows

![01. tab 2 stale notice send enabled](../media/G3/A13-01-tab-2-stale-notice-send-enabled.png)
*01. tab 2 stale notice send enabled*

![02. tab 1 daily limit reached](../media/G3/A13-02-tab-1-daily-limit-reached.png)
*02. tab 1 daily limit reached*

![03. tab 2 stale click daily warning](../media/G3/A13-03-tab-2-stale-click-daily-warning.png)
*03. tab 2 stale click daily warning*

Video: [A13-daily-limit-tab1](../media/G3/A13-daily-limit-tab1.webm)

Video: [A13-daily-limit-tab2](../media/G3/A13-daily-limit-tab2.webm)

<a id="a14"></a>
## A14 Forged / stale request form

*Language: EN | Mode: login | Status: PASS | Repo spec: GOL S6 (no csrf via request.post)*

hidden csrf field of the notice form set to "forged" in the DOM (simulates a cross-site/stale form): danger flash "Your session has expired. Please try again.", no link row, no mail; a second click with the fresh token succeeds (success flash, 1 mail)

![01. notice before forged click](../media/G3/A14-01-notice-before-forged-click.png)
*01. notice before forged click*

![02. forged token session expired](../media/G3/A14-02-forged-token-session-expired.png)
*02. forged token session expired*

![03. retry with fresh token succeeds](../media/G3/A14-03-retry-with-fresh-token-succeeds.png)
*03. retry with fresh token succeeds*

Video: [A14-forged-request](../media/G3/A14-forged-request.webm)
