Stability improvement

This is a follow-up to [7601](https://github.com/gitlabhq/gitlabhq/pull/7601). I'm not sure if there's a possibility of such case, but anyway...
I'm not sure this is necessary. Nothing above should raise an exception, should it? In the case that a password isn't parsed from the URI the return will be the `result` which is just the original url.