Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcos Henrich <marcos.henrich@xamarin.com>2014-09-29 21:56:12 +0400
committerMarcos Henrich <marcos.henrich@xamarin.com>2014-09-29 21:59:42 +0400
commit47db8687f967e876392027da28cf627df9d60877 (patch)
treef87e4759e01dee8a7d43bf58cf08b1ab737a89c2
parent53e316103ed0acdd42a6956568139a65eb1ff1b2 (diff)
Fix Uri UserInfo parsing. Fixes 23246.
-rw-r--r--mcs/class/System/System/UriParseComponents.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/mcs/class/System/System/UriParseComponents.cs b/mcs/class/System/System/UriParseComponents.cs
index 0de6d8f91ef..5e94d3bdf53 100644
--- a/mcs/class/System/System/UriParseComponents.cs
+++ b/mcs/class/System/System/UriParseComponents.cs
@@ -336,7 +336,13 @@ namespace System {
if (ch == '%'){
if (!Uri.IsHexEncoding (part, index))
return false;
+ var oldIndex = index;
ch = Uri.HexUnescape (part, ref index);
+ index--;
+ if (ch == '@') {
+ sb.Append (part.Substring (oldIndex, index - oldIndex + 1));
+ continue;
+ }
}
if (Char.IsLetterOrDigit (ch) || IsUnreserved (ch) || IsSubDelim (ch) || ch == ':'){