Skip to content

Conversation

tangowithfoxtrot
Copy link
Contributor

@tangowithfoxtrot tangowithfoxtrot commented Oct 2, 2025

🎟️ Tracking

https://bitwarden.atlassian.net/browse/SM-1162

📔 Objective

Trim trailing forward-slashes on server URLs to avoid an ambiguous 405 method not allowed error in our CLI. All methods of input should be handled:

  • using the --server-url arg
  • using the BWS_SERVER_URL environment variable
  • reading from the server-{base,api,identity} keys in the config file
  • writing to the config file with bws config set server-{base,api,identity}

In any of those cases, the changes here should drop any trailing forward-slashes successfully.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation
    team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@tangowithfoxtrot tangowithfoxtrot requested a review from a team as a code owner October 2, 2025 16:01
@tangowithfoxtrot tangowithfoxtrot force-pushed the fix-panic-on-trailing-forward-slash branch from 4be28ff to 313022f Compare October 2, 2025 16:04
Copy link
Contributor

github-actions bot commented Oct 2, 2025

Logo
Checkmarx One – Scan Summary & Detailscc6e1585-b25b-4866-b216-a0ff3ef089db

Great job! No new security vulnerabilities introduced in this pull request

Copy link

codecov bot commented Oct 2, 2025

Codecov Report

❌ Patch coverage is 90.38462% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 12.17%. Comparing base (9f823d7) to head (313022f).

Files with missing lines Patch % Lines
crates/bws/src/cli.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##            main    #1348      +/-   ##
=========================================
+ Coverage   7.32%   12.17%   +4.84%     
=========================================
  Files         20       21       +1     
  Lines       1378     1429      +51     
=========================================
+ Hits         101      174      +73     
+ Misses      1277     1255      -22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

sonarqubecloud bot commented Oct 3, 2025

@tangowithfoxtrot tangowithfoxtrot changed the title fix: errors when using untrimmed urls fix: 405 method not allowed errors caused by trailing forward slashes Oct 3, 2025
@tangowithfoxtrot tangowithfoxtrot changed the title fix: 405 method not allowed errors caused by trailing forward slashes fix: 405 method not allowed errors caused by trailing forward-slashes Oct 3, 2025
Copy link
Contributor

@cd-bitwarden cd-bitwarden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks great 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants