Skip to content

fix: log unsafe URL fallback at warn level - #25181

Closed
vedansh0410 wants to merge 1 commit into
vaadin:mainfrom
vedansh0410:fix-url-safety-warning
Closed

fix: log unsafe URL fallback at warn level#25181
vedansh0410 wants to merge 1 commit into
vaadin:mainfrom
vedansh0410:fix-url-safety-warning

Conversation

@vedansh0410

Copy link
Copy Markdown

Description

No new dependencies are required.

When UrlUtil.isSafeUrl(String) is called without a VaadinService available on the current thread, the URL safety check falls back to the default safe URL schemes. This fallback was previously logged at DEBUG level.

This change raises the log level from DEBUG to WARN so that application developers have a better chance of noticing when the configured URL safety schemes cannot be applied.

A test has been added to verify that the fallback behavior still uses the default safe URL schemes when no VaadinService is available.

Fixes #25086

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

@cla-assistant

cla-assistant Bot commented Aug 11, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cla-assistant

cla-assistant Bot commented Aug 11, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@vedansh0410

Copy link
Copy Markdown
Author

Hi, the TeamCity validation checks appear to be failing with user: vedansh0410 is not a flow team member. Could you please check whether this is related to the CI permissions/configuration for external contributors? The change and tests pass locally.

@vedansh0410 vedansh0410 changed the title Log unsafe URL fallback at warn level fix: log unsafe URL fallback at warn level Aug 11, 2026
@mshabarov mshabarov added the Contribution PRs coming from the community or external to the team label Aug 12, 2026
@mshabarov
mshabarov self-requested a review August 12, 2026 06:52
@Legioth

Legioth commented Aug 12, 2026

Copy link
Copy Markdown
Member

We're considering a slightly more elaborate approach instead: #25185

@mshabarov

Copy link
Copy Markdown
Contributor

Closing this PR in a favor of the mentioned one. Thanks for the contribution nevertheless!

@mshabarov mshabarov closed this Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contribution PRs coming from the community or external to the team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log a more easily noticeable warning if safeUrlSchemes isn't available

3 participants