From a0b7ff4dc4ac2f67cef84ee4246b0654ab896274 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Wed, 15 Feb 2017 19:41:15 -0500 Subject: [PATCH] Our nonce should actually be random. Also, the state value here is unused, so drop it. --- contrib/submit_build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/submit_build.py b/contrib/submit_build.py index ae6e967e..ea9cfd83 100644 --- a/contrib/submit_build.py +++ b/contrib/submit_build.py @@ -2,6 +2,7 @@ import socket import os import sys +import random try: from urllib.parse import urlencode # py3 @@ -74,7 +75,7 @@ if not token: query = urlencode({ 'response_type': 'token', 'response_mode': 'form_post', - 'nonce': '1234', + 'nonce': random.randint(100, 10000), 'scope': ' '.join([ 'openid', 'profile', @@ -82,7 +83,6 @@ if not token: 'https://id.fedoraproject.org/scope/groups', ]), 'client_id': 'mbs-authorizer', - 'state': 'blahblahblah', }) + "&redirect_uri=http://localhost:13747/" print "https://id.stg.fedoraproject.org/openidc/Authorization?" + query print "We are waiting for you to finish the token generation..."