Port validation (in link_validate_url) has the following match for port

$port = '(:([0-9]{1,4}))';

This prevents inserting URLs with 5 digit ports. Since the valid port range is 1 to 65535 - this blocks off quite a few valid ports.

A quick fix is to set 1,4 to 1,5 - but this is non-optimal - since it allows 65536-99999 too. However - I can't see an easy way to fix that issue with just regex pattern matching.

Comments

quicksketch’s picture

Status: Active » Fixed

Allowing too many is certainly much better than cutting off valid ones. The URL checking in link.module used to be very strict, until we discovered that many, many websites don't use proper URLs. The checker is basically a basic typo checker, but not much more. I've bumped the cap to 5 characters to allow for these high number ports. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)