diff options
Diffstat (limited to 'OpenSim/Server/Handlers/Authentication')
-rw-r--r-- | OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs | 8 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs b/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs index d3ea7e2..4f03cf4 100644 --- a/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs | |||
@@ -82,11 +82,11 @@ namespace OpenSim.Server.Handlers.Authentication | |||
82 | switch (p[0]) | 82 | switch (p[0]) |
83 | { | 83 | { |
84 | case "plain": | 84 | case "plain": |
85 | StreamReader sr = new StreamReader(request); | 85 | string body; |
86 | string body = sr.ReadToEnd(); | 86 | using(StreamReader sr = new StreamReader(request)) |
87 | sr.Close(); | 87 | body = sr.ReadToEnd(); |
88 | |||
89 | return DoPlainMethods(body); | 88 | return DoPlainMethods(body); |
89 | |||
90 | case "crypt": | 90 | case "crypt": |
91 | byte[] buffer = new byte[request.Length]; | 91 | byte[] buffer = new byte[request.Length]; |
92 | long length = request.Length; | 92 | long length = request.Length; |
diff --git a/OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs b/OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs index a6605a1..254b82f 100644 --- a/OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs +++ b/OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs | |||
@@ -222,7 +222,10 @@ For more information, see <a href='http://openid.net/'>http://openid.net/</a>. | |||
222 | 222 | ||
223 | try | 223 | try |
224 | { | 224 | { |
225 | NameValueCollection postQuery = HttpUtility.ParseQueryString(new StreamReader(httpRequest.InputStream).ReadToEnd()); | 225 | string forPost; |
226 | using(StreamReader sr = new StreamReader(httpRequest.InputStream)) | ||
227 | forPost = sr.ReadToEnd(); | ||
228 | NameValueCollection postQuery = HttpUtility.ParseQueryString(forPost); | ||
226 | NameValueCollection getQuery = HttpUtility.ParseQueryString(httpRequest.Url.Query); | 229 | NameValueCollection getQuery = HttpUtility.ParseQueryString(httpRequest.Url.Query); |
227 | NameValueCollection openIdQuery = (postQuery.GetValues("openid.mode") != null ? postQuery : getQuery); | 230 | NameValueCollection openIdQuery = (postQuery.GetValues("openid.mode") != null ? postQuery : getQuery); |
228 | 231 | ||