プロジェクト

全般

プロフィール

Vote #80956

未完了

URI check (for Custom Fields) overly restrictive (only http, https, ftp and mailto allowed)

Admin Redmine さんがほぼ2年前に追加. ほぼ2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Custom fields_14
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
14
version_id:
0
issue_org_id:
33701
author_id:
369008
assigned_to_id:
0
comments:
1
status_id:
1
tracker_id:
1
plus1:
1
affected_version:
closed_on:
affected_version_id:
160
ステータス-->[New]

説明

When adding Custom Fields it is possible to specify an url to link to ("Link values to URL").

When trying to add a URL that points to a VOIP telephone number (sip scheme) the url is rejected as invalid.

In "CustomField.new" the URL validation happens in the function "validate_custom_field" (https://github.com/redmine/redmine/blob/d050d515448607798f20bb91284654ea78d26c6a/lib/redmine/field_format.rb#L211) with a call to "uri_with_safe_scheme" (https://github.com/redmine/redmine/blob/d050d515448607798f20bb91284654ea78d26c6a/lib/redmine/helpers/url.rb#L25)

In "uri_with_safe_scheme" the only schemes allowed are 'http', 'https', 'ftp' and 'mailto'. There are so many other useful schemes out there nowadays, which Browsers know to handle that this restriction seems overly strict.

Is this check at all necessary? Especially for custom fields, where an administrator defines the URL?

Should not the Client/Brower take care of this anyway?


journals

+1

--------------------------------------------------------------------------------

Admin Redmine さんがほぼ2年前に更新

  • カテゴリCustom fields_14 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0