networkaddress: fix parsing of uri with @ after authority
authorWim Taymans <wtaymans@redhat.com>
Mon, 10 Mar 2014 15:27:48 +0000 (16:27 +0100)
committerDan Winship <danw@gnome.org>
Wed, 2 Apr 2014 15:23:29 +0000 (11:23 -0400)
commit20feb23569e61b061b507e995b5438a35676ae51
treea41656f545b6314521eeed516ca7e514cf651935
parent8d037c678d8d3d0c0e4e1ddb22e47306567ed88a
networkaddress: fix parsing of uri with @ after authority

Make sure that the @ sign is inside the authority part before attempting
to parse the userinfo. We do this by checking if the @ sign comes before
any of the possible authority delimiters.
Add unit test to verify parsing of ftp://ftp.gnome.org/start?foo=bar@baz

https://bugzilla.gnome.org/show_bug.cgi?id=726040
gio/gnetworkaddress.c
gio/tests/network-address.c