pfsense/pfsense — pull request #1381 by phil-davis (2014-12-12 04:54:24+00:00)
Title: Base URL must be specified when alturlenable on

I had a 2.1.5 system that I was wondering why the dashboard always said it could not check for updates. I discovered it had "Use an unofficial server for firmware upgrades" checked, but the "Base URL" field was empty.
That can easily be checked with input validation - might as well catch dumb things like that.
I thought about making it parse the string to see if it seemed like a "valid" URL. But so many strings seem like valid URLs:
var_dump(parse_url("abc"));
array(1) {
["path"]=>
string(3) "abc"
}

It seemed a bit pointless to bother - if the user puts something in then hope that it might point to something some day.