Skip to content

Conversation

@SaintPatrck
Copy link
Contributor

@SaintPatrck SaintPatrck commented Oct 9, 2025

🎟️ Tracking

PM-26750
fixes #5997

📔 Objective

This commit updates the regular expression used for validating URIs in the Block Autofill feature to correctly handle underscores.

The previous regex did not account for underscores in the domain name or path, causing valid URIs to be incorrectly flagged as invalid. This has been fixed by adding the underscore character (_) to the character set in the validation pattern.

Additionally, new test cases have been added to StringExtensionsTest.kt to verify that URIs containing underscores are now correctly identified as valid patterns.

📸 Screenshots

Screen_recording_20251009_132905.mp4

⏰ 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

This commit updates the regular expression used for validating URIs in the Block Autofill feature to correctly handle underscores.

The previous regex did not account for underscores in the domain name or path, causing valid URIs to be incorrectly flagged as invalid. This has been fixed by adding the underscore character (`_`) to the character set in the validation pattern.

Additionally, new test cases have been added to `StringExtensionsTest.kt` to verify that URIs containing underscores are now correctly identified as valid patterns.
@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

Logo
Checkmarx One – Scan Summary & Details91aafc6c-e8de-4c9e-9b41-f2d8784a7d49

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

@SaintPatrck SaintPatrck enabled auto-merge October 9, 2025 17:42
@SaintPatrck SaintPatrck linked an issue Oct 9, 2025 that may be closed by this pull request
1 task
@codecov
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.59%. Comparing base (81fa635) to head (d2492c2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6000      +/-   ##
==========================================
+ Coverage   84.45%   84.59%   +0.13%     
==========================================
  Files         744      722      -22     
  Lines       55582    54877     -705     
  Branches     7576     7568       -8     
==========================================
- Hits        46942    46422     -520     
+ Misses       5989     5805     -184     
+ Partials     2651     2650       -1     

☔ 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.

@SaintPatrck SaintPatrck added this pull request to the merge queue Oct 9, 2025
Merged via the queue into main with commit 2d2b740 Oct 9, 2025
9 checks passed
@SaintPatrck SaintPatrck deleted the issue-5997/allow-underscore-in-blocked-uri branch October 9, 2025 18:26
@vvolkgang vvolkgang changed the title [#5997] Allow underscores in Block Autofill URI patterns [PM-26750] Allow underscores in Block Autofill URI patterns Oct 9, 2025
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.

[PM-26750] blacklist uri check refuse valid path

3 participants