Repository navigation
fix(auth): use SameSite=Lax for pi_web_session cookie - #818
Merged
Merged
Conversation
SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works. Fixes agegr#806
agegr
added a commit
that referenced
this pull request
Sep 18, 2026
* Show the reasoning level of the running turn The reasoning control is hidden while a turn streams because the level cannot be changed mid-turn. That also hides the level itself, exactly when it decides how long the turn runs and how much budget it spends. Render the active level as a read-only label in the same slot while streaming. It is not a button: nothing can change until the turn ends, so a clickable control would only invite clicks that do nothing. The label reuses the existing display label, icon, padding, height, and mobile collapse rule, so the control row keeps its spacing next to Stop. * Address review: show the level the turn actually runs with Choosing "Use pi default" sets the selector to "auto" without touching the runtime, so the runtime can keep an earlier explicit level. Rendering the selector state while streaming would then label a turn "auto" that is in fact running at, say, "high". When a turn starts, read the runtime's thinking level from the agent state and adopt it, so the read-only label and the selector both reflect the level in effect. The lookup is skipped if the turn has already ended. * Align new session branding with chat input * fix: preserve UNC roots in file API paths * fix(auth): use SameSite=Lax for pi_web_session cookie (#818) SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works. Fixes #806 * fix: preserve newlines in extension dialog titles like pi's TUI * fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in [email protected]) and pulls sharp 0.35.4 for the libheif advisories via npm audit fix. next/image is only used for the static logo, so the /_next/image endpoint is turned off entirely with images.unoptimized. Co-authored-by: Cursor <[email protected]> * fix: keep focused extension select option clear of the scroller edge scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush against the scroll container, where whole-pixel scroll snapping left it a fraction of a pixel outside the viewport and overflow clipping cut off its focus ring. Give options a scroll-margin equal to the container padding so navigation always lands them fully visible; this also unblocks the e2e "Keyboard selection must scroll into view" assertion. Co-authored-by: Cursor <[email protected]> * fix(auth): throttle web password failures with global backoff Route handlers have no reliable client address, so a per-IP limiter would be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access. Use one shared exponential backoff (1s doubling to 60s) for POST /api/web-auth instead; a success or five idle minutes resets it. Return 429 with Retry-After while blocked and surface the wait on the login page. Co-authored-by: Cursor <[email protected]> * Guard the turn-start thinking-level fetch against session/run races Co-authored-by: Cursor <[email protected]> * Align thinking-level display with model selection Show the resolved runtime level instead of the auto placeholder, and keep the same disabled control while a turn runs. Auto stays an uncommitted default, matching isAutoModelSelection. Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: wayne.luo <[email protected]> Co-authored-by: Alex Yang <[email protected]> Co-authored-by: richardmilles <[email protected]> Co-authored-by: Cursor <[email protected]>
agegr
added a commit
that referenced
this pull request
Sep 19, 2026
* fix: count only visible messages toward the session tail budget The tail window was counted in raw entries, so toolResult and other non-rendering entries consumed the budget. In agent-heavy sessions the window starved user messages out of the chat: a real session with 15 user messages across 562 entries loaded exactly ONE user message; every earlier question needed manual "load earlier" paging. - countsTowardTail(): user / assistant messages plus the compaction divider consume the budget; toolResult and hidden custom entries ride along inside the span - regression test for the pagination path * Align new session branding with chat input * fix: preserve UNC roots in file API paths * fix(auth): use SameSite=Lax for pi_web_session cookie (#818) SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works. Fixes #806 * fix: preserve newlines in extension dialog titles like pi's TUI * fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in [email protected]) and pulls sharp 0.35.4 for the libheif advisories via npm audit fix. next/image is only used for the static logo, so the /_next/image endpoint is turned off entirely with images.unoptimized. Co-authored-by: Cursor <[email protected]> * fix: keep focused extension select option clear of the scroller edge scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush against the scroll container, where whole-pixel scroll snapping left it a fraction of a pixel outside the viewport and overflow clipping cut off its focus ring. Give options a scroll-margin equal to the container padding so navigation always lands them fully visible; this also unblocks the e2e "Keyboard selection must scroll into view" assertion. Co-authored-by: Cursor <[email protected]> * fix(auth): throttle web password failures with global backoff Route handlers have no reliable client address, so a per-IP limiter would be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access. Use one shared exponential backoff (1s doubling to 60s) for POST /api/web-auth instead; a success or five idle minutes resets it. Return 429 with Retry-After while blocked and surface the wait on the login page. Co-authored-by: Cursor <[email protected]> * Tighten the raw-entry page cap and restore the sliceActiveBranch doc comment Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Alex Yang <[email protected]> Co-authored-by: richardmilles <[email protected]> Co-authored-by: Cursor <[email protected]>
lclichen
pushed a commit
to lclichen/pi-web
that referenced
this pull request
Sep 22, 2026
…r#810) * fix: count only visible messages toward the session tail budget The tail window was counted in raw entries, so toolResult and other non-rendering entries consumed the budget. In agent-heavy sessions the window starved user messages out of the chat: a real session with 15 user messages across 562 entries loaded exactly ONE user message; every earlier question needed manual "load earlier" paging. - countsTowardTail(): user / assistant messages plus the compaction divider consume the budget; toolResult and hidden custom entries ride along inside the span - regression test for the pagination path * Align new session branding with chat input * fix: preserve UNC roots in file API paths * fix(auth): use SameSite=Lax for pi_web_session cookie (agegr#818) SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works. Fixes agegr#806 * fix: preserve newlines in extension dialog titles like pi's TUI * fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in [email protected]) and pulls sharp 0.35.4 for the libheif advisories via npm audit fix. next/image is only used for the static logo, so the /_next/image endpoint is turned off entirely with images.unoptimized. Co-authored-by: Cursor <[email protected]> * fix: keep focused extension select option clear of the scroller edge scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush against the scroll container, where whole-pixel scroll snapping left it a fraction of a pixel outside the viewport and overflow clipping cut off its focus ring. Give options a scroll-margin equal to the container padding so navigation always lands them fully visible; this also unblocks the e2e "Keyboard selection must scroll into view" assertion. Co-authored-by: Cursor <[email protected]> * fix(auth): throttle web password failures with global backoff Route handlers have no reliable client address, so a per-IP limiter would be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access. Use one shared exponential backoff (1s doubling to 60s) for POST /api/web-auth instead; a success or five idle minutes resets it. Return 429 with Retry-After while blocked and surface the wait on the login page. Co-authored-by: Cursor <[email protected]> * Tighten the raw-entry page cap and restore the sliceActiveBranch doc comment Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Alex Yang <[email protected]> Co-authored-by: richardmilles <[email protected]> Co-authored-by: Cursor <[email protected]> (cherry picked from commit 50a2fd4)
lclichen
pushed a commit
to lclichen/pi-web
that referenced
this pull request
Sep 22, 2026
* Show the reasoning level of the running turn The reasoning control is hidden while a turn streams because the level cannot be changed mid-turn. That also hides the level itself, exactly when it decides how long the turn runs and how much budget it spends. Render the active level as a read-only label in the same slot while streaming. It is not a button: nothing can change until the turn ends, so a clickable control would only invite clicks that do nothing. The label reuses the existing display label, icon, padding, height, and mobile collapse rule, so the control row keeps its spacing next to Stop. * Address review: show the level the turn actually runs with Choosing "Use pi default" sets the selector to "auto" without touching the runtime, so the runtime can keep an earlier explicit level. Rendering the selector state while streaming would then label a turn "auto" that is in fact running at, say, "high". When a turn starts, read the runtime's thinking level from the agent state and adopt it, so the read-only label and the selector both reflect the level in effect. The lookup is skipped if the turn has already ended. * Align new session branding with chat input * fix: preserve UNC roots in file API paths * fix(auth): use SameSite=Lax for pi_web_session cookie (agegr#818) SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works. Fixes agegr#806 * fix: preserve newlines in extension dialog titles like pi's TUI * fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in [email protected]) and pulls sharp 0.35.4 for the libheif advisories via npm audit fix. next/image is only used for the static logo, so the /_next/image endpoint is turned off entirely with images.unoptimized. Co-authored-by: Cursor <[email protected]> * fix: keep focused extension select option clear of the scroller edge scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush against the scroll container, where whole-pixel scroll snapping left it a fraction of a pixel outside the viewport and overflow clipping cut off its focus ring. Give options a scroll-margin equal to the container padding so navigation always lands them fully visible; this also unblocks the e2e "Keyboard selection must scroll into view" assertion. Co-authored-by: Cursor <[email protected]> * fix(auth): throttle web password failures with global backoff Route handlers have no reliable client address, so a per-IP limiter would be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access. Use one shared exponential backoff (1s doubling to 60s) for POST /api/web-auth instead; a success or five idle minutes resets it. Return 429 with Retry-After while blocked and surface the wait on the login page. Co-authored-by: Cursor <[email protected]> * Guard the turn-start thinking-level fetch against session/run races Co-authored-by: Cursor <[email protected]> * Align thinking-level display with model selection Show the resolved runtime level instead of the auto placeholder, and keep the same disabled control while a turn runs. Auto stays an uncommitted default, matching isAutoModelSelection. Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: wayne.luo <[email protected]> Co-authored-by: Alex Yang <[email protected]> Co-authored-by: richardmilles <[email protected]> Co-authored-by: Cursor <[email protected]> (cherry picked from commit 3f07a5f)
HeRockOne
pushed a commit
to HeRockOne/pi-web
that referenced
this pull request
Sep 30, 2026
…r#810) * fix: count only visible messages toward the session tail budget The tail window was counted in raw entries, so toolResult and other non-rendering entries consumed the budget. In agent-heavy sessions the window starved user messages out of the chat: a real session with 15 user messages across 562 entries loaded exactly ONE user message; every earlier question needed manual "load earlier" paging. - countsTowardTail(): user / assistant messages plus the compaction divider consume the budget; toolResult and hidden custom entries ride along inside the span - regression test for the pagination path * Align new session branding with chat input * fix: preserve UNC roots in file API paths * fix(auth): use SameSite=Lax for pi_web_session cookie (agegr#818) SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works. Fixes agegr#806 * fix: preserve newlines in extension dialog titles like pi's TUI * fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in [email protected]) and pulls sharp 0.35.4 for the libheif advisories via npm audit fix. next/image is only used for the static logo, so the /_next/image endpoint is turned off entirely with images.unoptimized. Co-authored-by: Cursor <[email protected]> * fix: keep focused extension select option clear of the scroller edge scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush against the scroll container, where whole-pixel scroll snapping left it a fraction of a pixel outside the viewport and overflow clipping cut off its focus ring. Give options a scroll-margin equal to the container padding so navigation always lands them fully visible; this also unblocks the e2e "Keyboard selection must scroll into view" assertion. Co-authored-by: Cursor <[email protected]> * fix(auth): throttle web password failures with global backoff Route handlers have no reliable client address, so a per-IP limiter would be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access. Use one shared exponential backoff (1s doubling to 60s) for POST /api/web-auth instead; a success or five idle minutes resets it. Return 429 with Retry-After while blocked and surface the wait on the login page. Co-authored-by: Cursor <[email protected]> * Tighten the raw-entry page cap and restore the sliceActiveBranch doc comment Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Alex Yang <[email protected]> Co-authored-by: richardmilles <[email protected]> Co-authored-by: Cursor <[email protected]>
windli2018
pushed a commit
to aiti-ai/aiti-ai
that referenced
this pull request
Nov 6, 2026
SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works. Fixes agegr#806
windli2018
pushed a commit
to aiti-ai/aiti-ai
that referenced
this pull request
Nov 6, 2026
* Show the reasoning level of the running turn The reasoning control is hidden while a turn streams because the level cannot be changed mid-turn. That also hides the level itself, exactly when it decides how long the turn runs and how much budget it spends. Render the active level as a read-only label in the same slot while streaming. It is not a button: nothing can change until the turn ends, so a clickable control would only invite clicks that do nothing. The label reuses the existing display label, icon, padding, height, and mobile collapse rule, so the control row keeps its spacing next to Stop. * Address review: show the level the turn actually runs with Choosing "Use pi default" sets the selector to "auto" without touching the runtime, so the runtime can keep an earlier explicit level. Rendering the selector state while streaming would then label a turn "auto" that is in fact running at, say, "high". When a turn starts, read the runtime's thinking level from the agent state and adopt it, so the read-only label and the selector both reflect the level in effect. The lookup is skipped if the turn has already ended. * Align new session branding with chat input * fix: preserve UNC roots in file API paths * fix(auth): use SameSite=Lax for pi_web_session cookie (agegr#818) SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works. Fixes agegr#806 * fix: preserve newlines in extension dialog titles like pi's TUI * fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in [email protected]) and pulls sharp 0.35.4 for the libheif advisories via npm audit fix. next/image is only used for the static logo, so the /_next/image endpoint is turned off entirely with images.unoptimized. Co-authored-by: Cursor <[email protected]> * fix: keep focused extension select option clear of the scroller edge scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush against the scroll container, where whole-pixel scroll snapping left it a fraction of a pixel outside the viewport and overflow clipping cut off its focus ring. Give options a scroll-margin equal to the container padding so navigation always lands them fully visible; this also unblocks the e2e "Keyboard selection must scroll into view" assertion. Co-authored-by: Cursor <[email protected]> * fix(auth): throttle web password failures with global backoff Route handlers have no reliable client address, so a per-IP limiter would be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access. Use one shared exponential backoff (1s doubling to 60s) for POST /api/web-auth instead; a success or five idle minutes resets it. Return 429 with Retry-After while blocked and surface the wait on the login page. Co-authored-by: Cursor <[email protected]> * Guard the turn-start thinking-level fetch against session/run races Co-authored-by: Cursor <[email protected]> * Align thinking-level display with model selection Show the resolved runtime level instead of the auto placeholder, and keep the same disabled control while a turn runs. Auto stays an uncommitted default, matching isAutoModelSelection. Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: wayne.luo <[email protected]> Co-authored-by: Alex Yang <[email protected]> Co-authored-by: richardmilles <[email protected]> Co-authored-by: Cursor <[email protected]>
windli2018
pushed a commit
to aiti-ai/aiti-ai
that referenced
this pull request
Nov 6, 2026
…r#810) * fix: count only visible messages toward the session tail budget The tail window was counted in raw entries, so toolResult and other non-rendering entries consumed the budget. In agent-heavy sessions the window starved user messages out of the chat: a real session with 15 user messages across 562 entries loaded exactly ONE user message; every earlier question needed manual "load earlier" paging. - countsTowardTail(): user / assistant messages plus the compaction divider consume the budget; toolResult and hidden custom entries ride along inside the span - regression test for the pagination path * Align new session branding with chat input * fix: preserve UNC roots in file API paths * fix(auth): use SameSite=Lax for pi_web_session cookie (agegr#818) SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works. Fixes agegr#806 * fix: preserve newlines in extension dialog titles like pi's TUI * fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in [email protected]) and pulls sharp 0.35.4 for the libheif advisories via npm audit fix. next/image is only used for the static logo, so the /_next/image endpoint is turned off entirely with images.unoptimized. Co-authored-by: Cursor <[email protected]> * fix: keep focused extension select option clear of the scroller edge scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush against the scroll container, where whole-pixel scroll snapping left it a fraction of a pixel outside the viewport and overflow clipping cut off its focus ring. Give options a scroll-margin equal to the container padding so navigation always lands them fully visible; this also unblocks the e2e "Keyboard selection must scroll into view" assertion. Co-authored-by: Cursor <[email protected]> * fix(auth): throttle web password failures with global backoff Route handlers have no reliable client address, so a per-IP limiter would be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access. Use one shared exponential backoff (1s doubling to 60s) for POST /api/web-auth instead; a success or five idle minutes resets it. Return 429 with Retry-After while blocked and surface the wait on the login page. Co-authored-by: Cursor <[email protected]> * Tighten the raw-entry page cap and restore the sliceActiveBranch doc comment Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Alex Yang <[email protected]> Co-authored-by: richardmilles <[email protected]> Co-authored-by: Cursor <[email protected]>
windli2018
pushed a commit
to aiti-ai/aiti-ai
that referenced
this pull request
Nov 8, 2026
SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works. Fixes agegr#806
windli2018
pushed a commit
to aiti-ai/aiti-ai
that referenced
this pull request
Nov 8, 2026
* Show the reasoning level of the running turn The reasoning control is hidden while a turn streams because the level cannot be changed mid-turn. That also hides the level itself, exactly when it decides how long the turn runs and how much budget it spends. Render the active level as a read-only label in the same slot while streaming. It is not a button: nothing can change until the turn ends, so a clickable control would only invite clicks that do nothing. The label reuses the existing display label, icon, padding, height, and mobile collapse rule, so the control row keeps its spacing next to Stop. * Address review: show the level the turn actually runs with Choosing "Use pi default" sets the selector to "auto" without touching the runtime, so the runtime can keep an earlier explicit level. Rendering the selector state while streaming would then label a turn "auto" that is in fact running at, say, "high". When a turn starts, read the runtime's thinking level from the agent state and adopt it, so the read-only label and the selector both reflect the level in effect. The lookup is skipped if the turn has already ended. * Align new session branding with chat input * fix: preserve UNC roots in file API paths * fix(auth): use SameSite=Lax for pi_web_session cookie (agegr#818) SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works. Fixes agegr#806 * fix: preserve newlines in extension dialog titles like pi's TUI * fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in [email protected]) and pulls sharp 0.35.4 for the libheif advisories via npm audit fix. next/image is only used for the static logo, so the /_next/image endpoint is turned off entirely with images.unoptimized. Co-authored-by: Cursor <[email protected]> * fix: keep focused extension select option clear of the scroller edge scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush against the scroll container, where whole-pixel scroll snapping left it a fraction of a pixel outside the viewport and overflow clipping cut off its focus ring. Give options a scroll-margin equal to the container padding so navigation always lands them fully visible; this also unblocks the e2e "Keyboard selection must scroll into view" assertion. Co-authored-by: Cursor <[email protected]> * fix(auth): throttle web password failures with global backoff Route handlers have no reliable client address, so a per-IP limiter would be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access. Use one shared exponential backoff (1s doubling to 60s) for POST /api/web-auth instead; a success or five idle minutes resets it. Return 429 with Retry-After while blocked and surface the wait on the login page. Co-authored-by: Cursor <[email protected]> * Guard the turn-start thinking-level fetch against session/run races Co-authored-by: Cursor <[email protected]> * Align thinking-level display with model selection Show the resolved runtime level instead of the auto placeholder, and keep the same disabled control while a turn runs. Auto stays an uncommitted default, matching isAutoModelSelection. Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: wayne.luo <[email protected]> Co-authored-by: Alex Yang <[email protected]> Co-authored-by: richardmilles <[email protected]> Co-authored-by: Cursor <[email protected]>
windli2018
pushed a commit
to aiti-ai/aiti-ai
that referenced
this pull request
Nov 8, 2026
…r#810) * fix: count only visible messages toward the session tail budget The tail window was counted in raw entries, so toolResult and other non-rendering entries consumed the budget. In agent-heavy sessions the window starved user messages out of the chat: a real session with 15 user messages across 562 entries loaded exactly ONE user message; every earlier question needed manual "load earlier" paging. - countsTowardTail(): user / assistant messages plus the compaction divider consume the budget; toolResult and hidden custom entries ride along inside the span - regression test for the pagination path * Align new session branding with chat input * fix: preserve UNC roots in file API paths * fix(auth): use SameSite=Lax for pi_web_session cookie (agegr#818) SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works. Fixes agegr#806 * fix: preserve newlines in extension dialog titles like pi's TUI * fix(deps): upgrade Next.js to 16.3.5 and disable image optimizer Patches GHSA-2xp9-vwfh-vxw4 / GHSA-p293-qw3h-jr36 (unauthenticated RCE in [email protected]) and pulls sharp 0.35.4 for the libheif advisories via npm audit fix. next/image is only used for the static logo, so the /_next/image endpoint is turned off entirely with images.unoptimized. Co-authored-by: Cursor <[email protected]> * fix: keep focused extension select option clear of the scroller edge scrollIntoView({ block: "nearest" }) parked the keyboard-selected option flush against the scroll container, where whole-pixel scroll snapping left it a fraction of a pixel outside the viewport and overflow clipping cut off its focus ring. Give options a scroll-margin equal to the container padding so navigation always lands them fully visible; this also unblocks the e2e "Keyboard selection must scroll into view" assertion. Co-authored-by: Cursor <[email protected]> * fix(auth): throttle web password failures with global backoff Route handlers have no reliable client address, so a per-IP limiter would be spoofable via x-forwarded-for and empty for direct 127.0.0.1 access. Use one shared exponential backoff (1s doubling to 60s) for POST /api/web-auth instead; a success or five idle minutes resets it. Return 429 with Retry-After while blocked and surface the wait on the login page. Co-authored-by: Cursor <[email protected]> * Tighten the raw-entry page cap and restore the sliceActiveBranch doc comment Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Alex Yang <[email protected]> Co-authored-by: richardmilles <[email protected]> Co-authored-by: Cursor <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SameSite=Strict drops the session cookie on external top-level navigations (common on mobile), forcing a re-login while in-page XHR still works.
Fixes #806