The regexp introduced in by #1388916: Bad port validator in d222449 doesn't work for URLs that includes credentials, which can be of the form

In this case, the regexp matches 'password@host:url' and 'password@host' respectively, and those obviously aren't integers.

Comments

DeFr’s picture

Status: Active » Needs review
StatusFileSize
new1.27 KB

Attaching a patch that seems to fix it here, by checking if parse_url found a user or not and using a different regular expression if it did.

nick_vh’s picture

Would you be able to enrich this with a simpletest? So it will never fail anymore in the future?

DeFr’s picture

StatusFileSize
new2.79 KB
new1.54 KB

There you go, attaching first the test only that should fail, and then a combined test + patch that should come back green.

Not sure why I'm getting two unrelated failures locally that don't seem to happen with the test bot, were apachesolr.index.inc get added when it shouldn't.

Status: Needs review » Needs work

The last submitted patch, 1408190-2-test-and-fix.patch, failed testing.

DeFr’s picture

Status: Needs work » Needs review

#3: 1408190-2-test-and-fix.patch queued for re-testing.

pwolanin’s picture

Version: 7.x-1.x-dev » 6.x-3.x-dev
Status: Needs review » Patch (to be ported)

committed to 7.x

nick_vh’s picture

Status: Patch (to be ported) » Fixed

Committed to 6.x-3.x

nick_vh’s picture

Status: Fixed » Closed (fixed)