Field validation

Created on 2 December 2024, 3 months ago

Problem/Motivation

As user I can provided "feed://test.com/feed-test" as remote URL what generates a fatal error

Module uses https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Util... which allows to type feed uri.

Steps to reproduce

Edit entity where file_url exists
Type "feed://test.com/feed-test" as remote URL,
press save
visit the entity, system generates a fatal error

InvalidArgumentException: The URI 'feed://test.com/feed-test' is invalid. You must use a valid URI scheme. Use base: for a path, e.g., to a Drupal file that needs the base path. Do not use this for internal paths controlled by Drupal. in Drupal\Core\Utility\UnroutedUrlAssembler->assemble() (line 65 of core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php).

Proposed resolution

Update validation, allow to use only ftp, http, https protocols

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇵🇱Poland alorenc Wolsztyn, 🇵🇱

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024