[PR #1967] [MERGED] [PS 920] Fix selfhosted url validations #3258

Closed
opened 2025-11-26 23:30:23 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1967
Author: @LRNcardozoWDF
Created: 6/29/2022
Status: Merged
Merged: 7/11/2022
Merged by: @LRNcardozoWDF

Base: masterHead: bug/PS-920-fix-selfhosted-url-validations


📝 Commits (10+)

  • 7c16a01 PS-920 - Added feedback to user when saving bad formed URLs
  • 1535cd0 PS-920 - Refactor to use AsyncCommand
  • cf720e1 PS-920 - Fixed whitespace formatting
  • a99953f Merge branch 'master' into bug/PS-920-fix-selfhosted-url-validations
  • e546d2a Merge branch 'master' into bug/PS-920-fix-selfhosted-url-validations
  • a1913bb PS-920 - Removed unused method
  • e6f288b PS-920 - Fixed validation
  • c755fae PS-920 - Removed unused properties
  • f7237db PS-920 - Added exception handling and logging
  • 69f97ea Merge branch 'master' into bug/PS-920-fix-selfhosted-url-validations

📊 Changes

6 files changed (+64 additions, -14 deletions)

View changed files

📝 src/App/Pages/Accounts/EnvironmentPage.xaml (+1 -1)
📝 src/App/Pages/Accounts/EnvironmentPage.xaml.cs (+0 -8)
📝 src/App/Pages/Accounts/EnvironmentPageViewModel.cs (+31 -3)
📝 src/App/Resources/AppResources.Designer.cs (+13 -1)
📝 src/App/Resources/AppResources.resx (+7 -1)
📝 src/Core/Services/ApiService.cs (+12 -0)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Added feedback to user when saving a bad formed URL in Settings page or trying to perform login with a previously saved bad formed url.

Code changes

  • src/App/Pages/Accounts/EnvironmentPage.xaml: Refactor to use AsyncCommand;
  • src/App/Pages/Accounts/EnvironmentPage.xaml.cs: Since AsyncCommand has proper validation to ensure multiple clicks aren't allowed I removed this validation;
  • src/App/Pages/Accounts/EnvironmentPageViewModel.cs: Added validation for URLs saved and show pop up with error message;
  • src/App/Resources/AppResources.resx: Added string with error message for when user tries to save a bad formed URL;
  • src/Core/Services/ApiService.cs: Added validation for bad formed URL previously saved in Settings and show pop up with error. (Note: Since Bit.Core doesn't have access to src/App/Resources/AppResources.resx the message is hard coded for now).

Screenshots

Before you submit

  • I have checked for formatting errors (dotnet tool run dotnet-format --check) (required)
  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

🔄 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/bitwarden/android/pull/1967 **Author:** [@LRNcardozoWDF](https://github.com/LRNcardozoWDF) **Created:** 6/29/2022 **Status:** ✅ Merged **Merged:** 7/11/2022 **Merged by:** [@LRNcardozoWDF](https://github.com/LRNcardozoWDF) **Base:** `master` ← **Head:** `bug/PS-920-fix-selfhosted-url-validations` --- ### 📝 Commits (10+) - [`7c16a01`](https://github.com/bitwarden/android/commit/7c16a01bd664474184922346f39ded83b780c0ff) PS-920 - Added feedback to user when saving bad formed URLs - [`1535cd0`](https://github.com/bitwarden/android/commit/1535cd019fa10e12b65563839cb5de06b5ce7b05) PS-920 - Refactor to use AsyncCommand - [`cf720e1`](https://github.com/bitwarden/android/commit/cf720e124454ed2fea41f2ae92ef8c2d55db39db) PS-920 - Fixed whitespace formatting - [`a99953f`](https://github.com/bitwarden/android/commit/a99953f20371ac505ad511a03538cadc1e4d9656) Merge branch 'master' into bug/PS-920-fix-selfhosted-url-validations - [`e546d2a`](https://github.com/bitwarden/android/commit/e546d2ad8e057e8363d54d4f00ff73b4abf6a726) Merge branch 'master' into bug/PS-920-fix-selfhosted-url-validations - [`a1913bb`](https://github.com/bitwarden/android/commit/a1913bbc9794f58caa7688d4829fa55313574224) PS-920 - Removed unused method - [`e6f288b`](https://github.com/bitwarden/android/commit/e6f288bb5ec4d2184bbb3f1435990d3212c487ff) PS-920 - Fixed validation - [`c755fae`](https://github.com/bitwarden/android/commit/c755faecaf0ae21182efee55f17aca3655341c41) PS-920 - Removed unused properties - [`f7237db`](https://github.com/bitwarden/android/commit/f7237db1853c9071d80abf85b3e67c330c72db70) PS-920 - Added exception handling and logging - [`69f97ea`](https://github.com/bitwarden/android/commit/69f97ea4b1189630b80d5a0935c6b890fe263fac) Merge branch 'master' into bug/PS-920-fix-selfhosted-url-validations ### 📊 Changes **6 files changed** (+64 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Pages/Accounts/EnvironmentPage.xaml` (+1 -1) 📝 `src/App/Pages/Accounts/EnvironmentPage.xaml.cs` (+0 -8) 📝 `src/App/Pages/Accounts/EnvironmentPageViewModel.cs` (+31 -3) 📝 `src/App/Resources/AppResources.Designer.cs` (+13 -1) 📝 `src/App/Resources/AppResources.resx` (+7 -1) 📝 `src/Core/Services/ApiService.cs` (+12 -0) </details> ### 📄 Description ## Type of change - [X] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective Added feedback to user when saving a bad formed URL in Settings page or trying to perform login with a previously saved bad formed url. ## Code changes - **src/App/Pages/Accounts/EnvironmentPage.xaml**: Refactor to use AsyncCommand; - **src/App/Pages/Accounts/EnvironmentPage.xaml.cs**: Since AsyncCommand has proper validation to ensure multiple clicks aren't allowed I removed this validation; - **src/App/Pages/Accounts/EnvironmentPageViewModel.cs**: Added validation for URLs saved and show pop up with error message; - **src/App/Resources/AppResources.resx**: Added string with error message for when user tries to save a bad formed URL; - **src/Core/Services/ApiService.cs**: Added validation for bad formed URL previously saved in Settings and show pop up with error. (Note: Since Bit.Core doesn't have access to src/App/Resources/AppResources.resx the message is hard coded for now). ## Screenshots ## Before you submit - [X] I have checked for formatting errors (`dotnet tool run dotnet-format --check`) (required) - [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required) - [ ] This change requires a **documentation update** (notify the documentation team) - [ ] This change has particular **deployment requirements** (notify the DevOps team) --- <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 2025-11-26 23:30:23 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3258