Jeff-Lewis / oauth-dot-net

Automatically exported from code.google.com/p/oauth-dot-net
0 stars 0 forks source link

OAuthPipelineModule disrupts AJAX UpdatePanel #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add <add name="OAuthPipelineModule"
type="OAuth.Net.ServiceProvider.OAuthPipelineModule"/> to httpModules
2. Add an asp:UpdatePanel to a page in same project
3. Set a control inside panel (eg button) to postback 

What is the expected output? What do you see instead?
UpdatePanel postback fails and a JScript error
"Sys.WebForms.PageRequestManagerServerErrorException - code 500" appears

What version of the product are you using? On what operating system?
OAuth.Net-source-0.5.1.0

Please provide any additional information below.

Original issue reported on code.google.com by dougal9...@gmail.com on 11 Mar 2009 at 12:50

GoogleCodeExporter commented 9 years ago
PS only happens when user is not authenticated, otherwise this line:
            if (application.Context.User != null) return;
..exits the module.

Seems to be caused by an uncaught exception in the 
"CheckForInvalidParameterNames"
method, changing this:

if (param.StartsWith(Constants.OAuthParameterPrefix, StringComparison.Ordinal)
                                && Constants.ReservedParameterNames.IndexOf(param) <
0) invalid.Add(param);
to add a check for param==null seems to fix it.

Original comment by dougal9...@gmail.com on 11 Mar 2009 at 1:20

GoogleCodeExporter commented 9 years ago
Added a fix to check if the param is null - suspect further issues in 
ParseAuthHeader
that needs more investigation

Original comment by chris.s....@gmail.com on 12 Mar 2009 at 9:41