swhitley/AuthPack — Issue #1: facebook - access token get bug
Author: funvit
Created: 2012-01-17 10:01:18+00:00
State: open

oauth.aspx.cs - buggy return data parse!

replace

string[] access_token_parm = ret.Split('=');
string access_token = "";
if (access_token_parm[0] == "access_token" && access_token_parm.Length == 2)
{
access_token = access_token_parm[1];
}

with

string access_token = "";
Dictionary retData = new Dictionary();
foreach (string param in ret.Split('&'))
{
string[] data = param.Split('=');
retData.Add(data[0], data[1]);
}

if (retData.ContainsKey("access_token"))
access_token = retData["access_token"];