[upstream] Stream wrapper URIs are incorrectly flagged as invalid (hostname misinterpreted) due to bug in `justinrainbow/json-schema` — bump minimum version to 6.6.2
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3560455. --> Reported by: [mayur-sose](https://www.drupal.org/user/3832406) Related to !374 !366 !371 >>> <h3 id="overview">Overview</h3> <p>The Drupal stream wrapper URIs (e.g. <code>public://path_to_file/file.txt</code>) are validated using JSON Schema <a href="https://github.com/jsonrainbow/json-schema/blob/6.6.1/src/JsonSchema/Tool/Validator/UriValidator.php">UriValidator</a> class. Because they include <code>&lt;schema&gt;://&lt;path&gt;</code> but no host, the regex interprets the first path segment (e.g. <code>path_to_file</code>) as the authority (host), producing false invalid URI violations.</p> <h3 id="root-cause">Root Cause Analysis</h3> <ul> <li>JSON Schema <a href="https://github.com/jsonrainbow/json-schema/blob/6.6.1/src/JsonSchema/Tool/Validator/UriValidator.php">UriValidator</a> assumes <code>RFC 3986</code> structure: <code>scheme://authority/path.</code></li> <li>Drupal stream wrappers intentionally omit hostname in stream wrapper Uri; Syntax is <code>scheme://path</code>.</li> <li>Regex shifts the first path segment as the authority (host) slot, yielding an invalid host condition.</li> <li>This causes false negatives during validation for stored file references managed by Drupal.</li> </ul> <h3 id="proposed-resolution">Proposed resolution</h3> <p>Skip validating Stream Wrapper URIs.</p> > Related issue: [Issue #3352063](https://www.drupal.org/node/3352063)
issue