From 9001852a40a8201f5ed79edd9b23f50a7597be35 Mon Sep 17 00:00:00 2001 From: Dave Pifke Date: Wed, 14 Mar 2012 10:56:52 -0700 Subject: [PATCH] Pass the state value in OAuth2 error redirects. --- r2/r2/controllers/oauth2.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/r2/r2/controllers/oauth2.py b/r2/r2/controllers/oauth2.py index 4d272aebb..e00d041fc 100644 --- a/r2/r2/controllers/oauth2.py +++ b/r2/r2/controllers/oauth2.py @@ -118,6 +118,9 @@ class OAuth2FrontendController(RedditController): self._check_redirect_uri(client, redirect_uri) resp = {} + if state: + resp["state"] = state + if not c.errors: c.deny_frames = True return OAuth2AuthorizationPage(client, redirect_uri, scope_info[scope], state).render()