cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

Fix: use ip address in forgot password rate limitation

Open G3root opened this issue 1 year ago • 9 comments

What does this PR do?

fix for the comments from https://github.com/calcom/cal.com/pull/7700#discussion_r1140716657

Type of change

  • [x] Bug fix (non-breaking change which fixes an issue)

G3root avatar Mar 20 '23 11:03 G3root

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cal ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2023 6:33am
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2023 6:33am
web ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2023 6:33am

vercel[bot] avatar Mar 20 '23 12:03 vercel[bot]

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 233.34 KB (🟡 +1 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Sixty-eight Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/404 8.44 KB 241.77 KB 69.08% (+/- <0.01%)
/[user] 70.84 KB 304.18 KB 86.91% (+/- <0.01%)
/[user]/[type] 92.58 KB 325.92 KB 93.12% (+/- <0.01%)
/[user]/[type]/embed 92.61 KB 325.94 KB 93.13% (+/- <0.01%)
/[user]/book 183.98 KB 417.32 KB 119.23% (🟡 +0.13%)
/[user]/embed 70.91 KB 304.25 KB 86.93% (+/- <0.01%)
/apps 166.08 KB 399.42 KB 114.12% (+/- <0.01%)
/apps/[slug] 187.72 KB 421.06 KB 120.30% (+/- <0.01%)
/apps/[slug]/[...pages] 391.59 KB 624.92 KB 178.55% (🟢 -0.02%)
/apps/categories 148.87 KB 382.21 KB 109.20% (+/- <0.01%)
/apps/categories/[category] 152.76 KB 386.1 KB 110.31% (+/- <0.01%)
/apps/installed/[category] 196.11 KB 429.44 KB 122.70% (🟢 -0.04%)
/auth/error 19.24 KB 252.58 KB 72.17% (🟢 -0.01%)
/auth/forgot-password 25.65 KB 258.99 KB 74.00% (+/- <0.01%)
/auth/forgot-password/[id] 32.85 KB 266.19 KB 76.05% (+/- <0.01%)
/auth/login 40.12 KB 273.46 KB 78.13% (+/- <0.01%)
/auth/logout 7.56 KB 240.9 KB 68.83% (+/- <0.01%)
/auth/setup 79.87 KB 313.21 KB 89.49% (🟢 -0.19%)
/availability 154.4 KB 387.73 KB 110.78% (+/- <0.01%)
/availability/[schedule] 268.94 KB 502.27 KB 143.51% (+/- <0.01%)
/availability/troubleshoot 149.56 KB 382.89 KB 109.40% (+/- <0.01%)
/booking/[uid] 123.85 KB 357.19 KB 102.05% (+/- <0.01%)
/bookings/[status] 272.47 KB 505.8 KB 144.52% (🟢 -0.01%)
/d/[link]/[slug] 92.23 KB 325.57 KB 93.02% (+/- <0.01%)
/d/[link]/[slug]/embed 92.26 KB 325.6 KB 93.03% (+/- <0.01%)
/d/[link]/book 183.64 KB 416.97 KB 119.14% (🟡 +0.12%)
/event-types 348.8 KB 582.14 KB 166.33% (🟡 +0.03%)
/event-types/[type] 381.99 KB 615.33 KB 175.81% (🟢 -0.13%)
/getting-started/[[...step]] 304.18 KB 537.52 KB 153.58% (🟡 +0.03%)
/insights 384.96 KB 618.3 KB 176.66% (+/- <0.01%)
/more 148.49 KB 381.83 KB 109.09% (+/- <0.01%)
/settings/admin 153.95 KB 387.28 KB 110.65% (+/- <0.01%)
/settings/admin/apps 164.79 KB 398.12 KB 113.75% (🟢 -0.10%)
/settings/admin/apps/[category] 164.77 KB 398.11 KB 113.75% (🟢 -0.11%)
/settings/admin/flags 156.83 KB 390.17 KB 111.48% (+/- <0.01%)
/settings/admin/impersonation 154.23 KB 387.57 KB 110.73% (+/- <0.01%)
/settings/billing 154.06 KB 387.4 KB 110.68% (+/- <0.01%)
/settings/developer/api-keys 183.21 KB 416.55 KB 119.01% (+/- <0.01%)
/settings/developer/webhooks 156.71 KB 390.05 KB 111.44% (+/- <0.01%)
/settings/developer/webhooks/[id] 187.4 KB 420.74 KB 120.21% (+/- <0.01%)
/settings/developer/webhooks/new 187.26 KB 420.59 KB 120.17% (+/- <0.01%)
/settings/my-account/appearance 168.53 KB 401.86 KB 114.82% (+/- <0.01%)
/settings/my-account/calendars 188.24 KB 421.58 KB 120.45% (+/- <0.01%)
/settings/my-account/conferencing 159.7 KB 393.04 KB 112.30% (🟢 -0.04%)
/settings/my-account/general 263.21 KB 496.55 KB 141.87% (+/- <0.01%)
/settings/my-account/profile 271.75 KB 505.09 KB 144.31% (🟡 +0.04%)
/settings/security/impersonation 156.1 KB 389.43 KB 111.27% (+/- <0.01%)
/settings/security/password 191.57 KB 424.91 KB 121.40% (+/- <0.01%)
/settings/security/sso 163.79 KB 397.13 KB 113.47% (+/- <0.01%)
/settings/security/two-factor-auth 158.61 KB 391.95 KB 111.98% (+/- <0.01%)
/settings/teams 153.69 KB 387.03 KB 110.58% (+/- <0.01%)
/settings/teams/[id]/appearance 168.55 KB 401.88 KB 114.82% (+/- <0.01%)
/settings/teams/[id]/billing 153.93 KB 387.26 KB 110.65% (+/- <0.01%)
/settings/teams/[id]/members 294.79 KB 528.13 KB 150.89% (+/- <0.01%)
/settings/teams/[id]/profile 266.4 KB 499.73 KB 142.78% (🟡 +0.04%)
/settings/teams/[id]/sso 163.88 KB 397.22 KB 113.49% (+/- <0.01%)
/signup 25.51 KB 258.85 KB 73.96% (+/- <0.01%)
/team/[slug] 72.64 KB 305.98 KB 87.42% (+/- <0.01%)
/team/[slug]/[type] 92.23 KB 325.57 KB 93.02% (+/- <0.01%)
/team/[slug]/[type]/embed 92.26 KB 325.6 KB 93.03% (+/- <0.01%)
/team/[slug]/book 183.64 KB 416.98 KB 119.14% (🟡 +0.12%)
/team/[slug]/embed 72.71 KB 306.05 KB 87.44% (+/- <0.01%)
/teams 148.71 KB 382.05 KB 109.16% (+/- <0.01%)
/video/meeting-ended/[uid] 14.67 KB 248 KB 70.86% (+/- <0.01%)
/video/meeting-not-started/[uid] 14.3 KB 247.63 KB 70.75% (+/- <0.01%)
/video/no-meeting-found 6.6 KB 239.94 KB 68.55% (+/- <0.01%)
/workflows 161.71 KB 395.05 KB 112.87% (+/- <0.01%)
/workflows/[workflow] 291.49 KB 524.82 KB 149.95% (+/- <0.01%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/-

github-actions[bot] avatar Mar 20 '23 12:03 github-actions[bot]

@zomars here's minimal reproduction for this https://ip-ratelimit-test.vercel.app/. requests are rate limited 5 per minute.

source code: https://github.com/G3root/ip-ratelimit-test

G3root avatar Mar 30 '23 15:03 G3root

Current Playwright Test Results Summary

✅ 114 Passing - ⚠️ 5 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 05/22/2023 06:46:30am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: ccdbdf1cc1033c7374f027966b34335d4bb21faf

Started: 05/22/2023 06:35:34am UTC

⚠️ Flakes

📄   apps/web/playwright/managed-event-types.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Managed Event Types tests Can create managed event type
Retry 1Initial Attempt
1.23% (3) 3 / 244 runs
failed over last 7 days
22.95% (56) 56 / 244 runs
flaked over last 7 days

📄   apps/web/playwright/event-types.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Event Types tests user -- new-booker can add multiple organizer address
Retry 1Initial Attempt
0% (0) 0 / 247 runs
failed over last 7 days
8.91% (22) 22 / 247 runs
flaked over last 7 days

📄   apps/web/playwright/embed-code-generator.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Embed Code Generator Tests Event Type Edit Page open Embed Dialog for the Event Type
Retry 1Initial Attempt
6.02% (15) 15 / 249 runs
failed over last 7 days
28.51% (71) 71 / 249 runs
flaked over last 7 days

📄   apps/web/playwright/booking-seats.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking with Seats -- new-booker Reschedule for booking with seats -- old-booker Should reschedule booking with seats and if everyone rescheduled it should be deleted
Retry 1Initial Attempt
0% (0) 0 / 251 runs
failed over last 7 days
84.06% (211) 211 / 251 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/action-based.test.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should be able to reschedule
Retry 2Retry 1Initial Attempt
10.79% (15) 15 / 139 runs
failed over last 7 days
29.50% (41) 41 / 139 runs
flaked over last 7 days

View Detailed Build Results


deploysentinel[bot] avatar Mar 30 '23 15:03 deploysentinel[bot]

This PR is being marked as stale due to inactivity.

github-actions[bot] avatar Apr 25 '23 00:04 github-actions[bot]

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

github-actions[bot] avatar Apr 25 '23 06:04 github-actions[bot]

@Udit-takkar pushed a fix for that

G3root avatar Apr 25 '23 06:04 G3root

This PR is being marked as stale due to inactivity.

github-actions[bot] avatar May 14 '23 00:05 github-actions[bot]

This PR is being closed due to inactivity. Please reopen if work is intended to be continued.

github-actions[bot] avatar May 21 '23 00:05 github-actions[bot]