[PR #8475] [CLOSED] fix: update-session should allow input:false on server #7999

Closed
opened 2026-03-13 13:56:14 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8475
Author: @ping-maxwell
Created: 3/7/2026
Status: Closed

Base: canaryHead: fix/update-session-on-server


📝 Commits (2)

  • a5a11f2 fix: /update-session should allow input:false on server
  • 10e0d7d Merge branch 'canary' into fix/update-session-on-server

📊 Changes

2 files changed (+8 additions, -5 deletions)

View changed files

📝 packages/better-auth/src/api/routes/update-session.ts (+7 -5)
📝 packages/better-auth/src/plugins/admin/schema.ts (+1 -0)

📄 Description

This PR allows the update-session endpoint to update fields with input: false to be updated on the server only. The client will remain prohibited from updating fields with input: false

Additionally, it fixes a bug in the admin plugin which allows impersonatedBy to be updated. As of now, they cannot perform any additional action when changing this field because we perform validation against their userId.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/8475 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 3/7/2026 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `fix/update-session-on-server` --- ### 📝 Commits (2) - [`a5a11f2`](https://github.com/better-auth/better-auth/commit/a5a11f20400eddd14d8e5975b010fd9360c589e1) fix: /update-session should allow `input:false` on server - [`10e0d7d`](https://github.com/better-auth/better-auth/commit/10e0d7d4d03b5c640935d0a04bedb9404593e482) Merge branch 'canary' into fix/update-session-on-server ### 📊 Changes **2 files changed** (+8 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/routes/update-session.ts` (+7 -5) 📝 `packages/better-auth/src/plugins/admin/schema.ts` (+1 -0) </details> ### 📄 Description This PR allows the update-session endpoint to update fields with `input: false` to be updated on the server only. The client will remain prohibited from updating fields with `input: false` Additionally, it fixes a bug in the admin plugin which allows `impersonatedBy` to be updated. As of now, they cannot perform any additional action when changing this field because we perform validation against their `userId`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 13:56:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#7999