Skip to content

State value in callback query doesn't compared with session stored value #218

Open
@AlexanderSysoev

Description

@AlexanderSysoev

At BaseOAuth20Provider.cs:

        // Start with the Cross Site Request Forgery check.
        var callbackState = queryStringParameters[StateKey];
        if (string.IsNullOrEmpty(callbackState))
        {
            var errorMessage =
                "The callback querystring doesn't include a state key/value parameter. We need one of these so we can to a CSRF check. Please check why the request url from the provider is missing the parameter: " +
                StateKey + ". eg. &state=something...";
            TraceSource.TraceError(errorMessage);
            throw new AuthenticationException(errorMessage);
        }

May be this line of code needed:
callbackState.Equals(state, StringComparison.OrdinalIgnoreCase)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions