[PR #3837] [MERGED] 🐛 Fix validation issue for invalid server URLs in /config-server page #5084

Closed
opened 2026-02-28 21:05:44 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/3837
Author: @shb9019
Created: 11/15/2024
Status: Merged
Merged: 11/15/2024
Merged by: @MikesGlitch

Base: masterHead: handle-invalid-server-url


📝 Commits (3)

  • 53094df Fix breaking /config-server page logic for invalid server URLs
  • 1811563 Handle missing url in 'subscribe-needs-bootstrap' handler
  • a082c28 Merge branch 'master' into handle-invalid-server-url

📊 Changes

4 files changed (+28 additions, -17 deletions)

View changed files

📝 packages/desktop-client/src/components/manager/ConfigServer.tsx (+9 -16)
📝 packages/loot-core/src/server/main.ts (+5 -1)
📝 packages/loot-core/src/server/server-config.ts (+8 -0)
upcoming-release-notes/3837.md (+6 -0)

📄 Description

Fixes #3784.

Issue
Passing an invalid URL such as "wrong.server.here" does not throw a validation error, but it redirects to the login page without any password input box. See #3784 for details.

Cause
In a recent change, the validation logic returns the global server config if the URL cannot be parsed. This fails if there is no existing server config.

Changes

  1. Append "https://" (if absent) to server URL in ConfigServer.tsx before validating the URL.
  2. Before validating in "subscribe-needs-bootstrap" handler, check if the passed base URL can be used to construct URL().

🔄 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/actualbudget/actual/pull/3837 **Author:** [@shb9019](https://github.com/shb9019) **Created:** 11/15/2024 **Status:** ✅ Merged **Merged:** 11/15/2024 **Merged by:** [@MikesGlitch](https://github.com/MikesGlitch) **Base:** `master` ← **Head:** `handle-invalid-server-url` --- ### 📝 Commits (3) - [`53094df`](https://github.com/actualbudget/actual/commit/53094df05601b84b0fa1037e2430e96f94da607f) Fix breaking /config-server page logic for invalid server URLs - [`1811563`](https://github.com/actualbudget/actual/commit/18115631b7821c691e68b6af0ea880caaddd68d6) Handle missing url in 'subscribe-needs-bootstrap' handler - [`a082c28`](https://github.com/actualbudget/actual/commit/a082c282e784a02ff35b10ad5b8404c165c8b5aa) Merge branch 'master' into handle-invalid-server-url ### 📊 Changes **4 files changed** (+28 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/manager/ConfigServer.tsx` (+9 -16) 📝 `packages/loot-core/src/server/main.ts` (+5 -1) 📝 `packages/loot-core/src/server/server-config.ts` (+8 -0) ➕ `upcoming-release-notes/3837.md` (+6 -0) </details> ### 📄 Description Fixes #3784. **Issue** Passing an invalid URL such as "wrong.server.here" does not throw a validation error, but it redirects to the login page without any password input box. See #3784 for details. **Cause** In a recent change, the validation logic returns the global server config if the URL cannot be parsed. This fails if there is no existing server config. **Changes** 1. Append "https://" (if absent) to server URL in `ConfigServer.tsx` before validating the URL. 2. Before validating in "subscribe-needs-bootstrap" handler, check if the passed base URL can be used to construct `URL()`. <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://github.com/actualbudget/docs#writing-good-release-notes --> --- <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-02-28 21:05:44 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#5084