CDN UI does not validate user-provided domain, entering URL instead of domain results in assertion error
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #2826937. -->
Reported by: [bradjones1](https://www.drupal.org/user/405824)
>>>
<p>The settings form in cdn_ui does not validate the value of the mapping domain, however if it does not meet the requirements in <code>CdnSettings::buildLookupTable</code>, the module fails an assertion.</p>
<p>Also, it appears the assertion test does not match the message.</p>
<div class="codeblock">
<pre><span style="color: #000000"><span style="color: #0000BB"><?php<br>assert</span><span style="color: #007700">(</span><span style="color: #DD0000">'strpos($domain, "/") === FALSE && strpos($domain, ":") === FALSE'</span><span style="color: #007700">, </span><span style="color: #DD0000">"The provided domain </span><span style="color: #0000BB">$domain</span><span style="color: #DD0000"> is not a valid domain. Provide domains or hostnames of the form 'cdn.com', 'cdn.example.com'. IP addresses and ports are also allowed."</span><span style="color: #007700">);<br></span><span style="color: #0000BB">?></span></span></pre></div>
issue