update_manager_file_get() incorrectly assumes a hard-coded list of remote stream wrapper schemes.

Created on 19 September 2011, almost 13 years ago
Updated 14 February 2023, over 1 year ago

Problem/Motivation

The update_manager_file_get() function checks the argument url against a small hard-coded list of remote file schemes, and assumes that all other URIs may be resolved to paths on the local filesystem. This assumption is wrong and unnecessary. The code may be made simpler and more robust by simply passing the URI to \Drupal::service('file_system')->realpath() A return value of FALSE indicates that the scheme does not support translation to a local filesystem path.

Proposed resolution

The code should be modified as described above.

Remaining tasks

Review patch
Commit

User interface changes

None.

API changes

None.

πŸ› Bug report
Status

Needs work

Version

9.5

Component
UpdateΒ  β†’

Last updated 2 days ago

  • Maintained by
  • πŸ‡ΊπŸ‡ΈUnited States @tedbow
  • πŸ‡ΊπŸ‡ΈUnited States @dww
Created by

πŸ‡ΊπŸ‡ΈUnited States pillarsdotnet

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024