From ca55890ad24de7fbb7dd546377e24b297857143b Mon Sep 17 00:00:00 2001 From: Jai A Date: Tue, 29 Sep 2020 11:46:11 -0700 Subject: [PATCH 1/2] Make scopes safe for browser --- src/routes/auth.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/auth.rs b/src/routes/auth.rs index 3396622e..539597bc 100644 --- a/src/routes/auth.rs +++ b/src/routes/auth.rs @@ -113,7 +113,7 @@ pub async fn init( "https://github.com/login/oauth/authorize?client_id={}&state={}&scope={}", client_id, to_base62(state.0 as u64), - "%20repo%20read%3Aorg%20read%3Auser%20user%3Aemail" + "read%3Aorg%20read%3Auser%20user%3Aemail" ); Ok(HttpResponse::TemporaryRedirect() From 217311211a0389f24eb9be2f5f30b7015025b0e9 Mon Sep 17 00:00:00 2001 From: Jai A Date: Tue, 29 Sep 2020 11:55:12 -0700 Subject: [PATCH 2/2] Remove org read scope --- src/routes/auth.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/auth.rs b/src/routes/auth.rs index 539597bc..18315feb 100644 --- a/src/routes/auth.rs +++ b/src/routes/auth.rs @@ -113,7 +113,7 @@ pub async fn init( "https://github.com/login/oauth/authorize?client_id={}&state={}&scope={}", client_id, to_base62(state.0 as u64), - "read%3Aorg%20read%3Auser%20user%3Aemail" + "read%3Auser%20user%3Aemail" ); Ok(HttpResponse::TemporaryRedirect()