Reject to unfurl urls with an explicit port
authorjoshuaruesweg <ruesweg@woltlab.com>
Tue, 16 Mar 2021 13:16:45 +0000 (14:16 +0100)
committerjoshuaruesweg <ruesweg@woltlab.com>
Tue, 16 Mar 2021 15:19:16 +0000 (16:19 +0100)
wcfsetup/install/files/lib/system/html/node/HtmlNodeUnfurlLink.class.php

index 1cec6f161744d32cd5be19a812c48cc1ca85b44a..bc2041cddc3cb3d9bd0f5248133d6bc5be7be0a0 100644 (file)
@@ -24,7 +24,7 @@ class HtmlNodeUnfurlLink extends HtmlNodePlainLink
      */
     public static function setUnfurl(HtmlNodePlainLink $link): void
     {
-        if ($link->isStandalone() && Url::is($link->href)) {
+        if ($link->isStandalone() && Url::is($link->href) && !Url::parse($link->href)['port']) {
             self::removeStyling($link);
 
             $object = new UnfurlUrlAction([], 'findOrCreate', [