Fixes T12526. These URIs are ambiguous and nonstandard, and different versions of different clients parse them differently.
Instead of trying to get this right across PHP versions, just reject these outright. No normal user will ever expect these to work.