Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
2cff78f
Merge pull request #9 from AzureAD/release-0.1.0
rayluo Dec 12, 2018
08b20d4
Merge pull request #21 from AzureAD/release-0.2.0
rayluo Mar 5, 2019
7acfdc5
Merge pull request #28 from AzureAD/release-0.3.0
abhidnya13 Apr 2, 2019
e43de20
MSAL Python 0.3.1
abhidnya13 Apr 16, 2019
fa88282
Merge pull request #45 from AzureAD/release-0.4.0
rayluo May 22, 2019
210103c
Merge pull request #63 from AzureAD/release-0.4.1
rayluo Jun 18, 2019
9638797
Merge pull request #72 from AzureAD/release-0.5.0
rayluo Jul 8, 2019
171d67a
Merge pull request #75 from AzureAD/release-0.5.1
rayluo Jul 10, 2019
bb80636
Merge pull request #82 from AzureAD/release-0.6.0
abhidnya13 Jul 31, 2019
4b34fd6
Merge pull request #85 from AzureAD/release-0.6.1
rayluo Aug 13, 2019
c319ea3
Merge pull request #100 from AzureAD/release-0.7.0
rayluo Sep 25, 2019
ae7f794
Merge pull request #109 from AzureAD/release-0.8.0
rayluo Oct 19, 2019
bee7af0
Merge pull request #121 from AzureAD/release-0.9.0
rayluo Oct 31, 2019
d100f7c
Merge pull request #123 from AzureAD/release-1.0.0
rayluo Nov 1, 2019
da09f25
Merge pull request #145 from AzureAD/release-1.1.0
rayluo Jan 23, 2020
6bade9f
Merge pull request #177 from AzureAD/release-1.2.0
rayluo Mar 31, 2020
3d24f53
Merge pull request #195 from AzureAD/release-1.3.0
rayluo May 15, 2020
814d710
Merge pull request #214 from AzureAD/release-1.4.0
rayluo Jun 25, 2020
d85a11b
Merge pull request #217 from AzureAD/release-1.4.1
abhidnya13 Jun 26, 2020
4e2ed20
Merge pull request #233 from AzureAD/release-1.4.2
abhidnya13 Jul 23, 2020
f285074
Merge pull request #237 from AzureAD/release-1.4.3
rayluo Jul 25, 2020
c0375cf
Merge pull request #252 from AzureAD/release-1.5.0
abhidnya13 Sep 3, 2020
410635e
Merge pull request #266 from AzureAD/release-1.5.1
rayluo Oct 21, 2020
1b09a45
Merge pull request #272 from AzureAD/release-1.6.0
rayluo Nov 2, 2020
3f1e44b
Future releases will be come from main branch
rayluo Dec 5, 2020
7a7d93b
Merge pull request #284 from AzureAD/release-1.7.0
rayluo Dec 7, 2020
82f9f0c
Merge pull request #290 from AzureAD/release-1.8.0
rayluo Dec 16, 2020
72a7250
Merge pull request #309 from AzureAD/release-1.9.0
rayluo Feb 9, 2021
3b9b6aa
Merge pull request #321 from AzureAD/release-1.10.0
rayluo Mar 8, 2021
928d4ea
Merge pull request #346 from AzureAD/release-1.11.0
rayluo Apr 9, 2021
e6f9d8f
Merge pull request #365 from AzureAD/release-1.12.0
rayluo May 19, 2021
b82f0c0
Merge pull request #383 from AzureAD/release-1.13.0
rayluo Jul 20, 2021
be55e2b
Merge pull request #400 from AzureAD/release-1.14.0
rayluo Aug 26, 2021
8a4cdea
Merge pull request #412 from AzureAD/release-1.15.0
rayluo Sep 30, 2021
8573a16
Merge branch 'release-1.15.0' into main
rayluo Oct 1, 2021
5b135b2
Merge pull request #428 from AzureAD/release-1.16.0
rayluo Oct 29, 2021
eff8a1b
Merge pull request #457 from AzureAD/release-1.17.0
rayluo Feb 11, 2022
bc13dd4
Merge pull request #471 from AzureAD/release-1.18.0b1
rayluo May 19, 2022
eae0e25
Merge pull request #476 from AzureAD/release-1.18.0
rayluo May 31, 2022
a0a59f1
Merge pull request #500 from AzureAD/release-1.19.0
rayluo Sep 21, 2022
14cbf59
Merge pull request #502 from AzureAD/release-1.20.0
rayluo Oct 7, 2022
5782059
Merge pull request #531 from AzureAD/release-1.21.0
rayluo Jan 31, 2023
dabc08c
Merge pull request #553 from AzureAD/release-1.22.0
rayluo Apr 17, 2023
1318025
Merge pull request #581 from AzureAD/release-1.23.0
rayluo Jul 22, 2023
edb6c0b
Merge pull request #592 from AzureAD/release-1.24.0
rayluo Sep 12, 2023
db74e80
Merge pull request #601 from AzureAD/release-1.24.1
rayluo Sep 29, 2023
3bd70b9
Merge branch 'release-1.25.0'
rayluo Nov 10, 2023
403a33d
Merge branch 'release-1.26.0'
rayluo Dec 6, 2023
09e9078
Merge pull request #669 from AzureAD/release-1.27
rayluo Feb 23, 2024
9e6ef48
Merge branch 'release-1.28.0'
rayluo Mar 19, 2024
f3a3d43
Replace random.sample() with secrets.choice() for PKCE, nonce, and st…
Copilot Mar 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ deploy:
password:
secure: KkjKySJujYxx31B15mlAZr2Jo4P99LcrMj3uON/X/WMXAqYVcVsYJ6JSzUvpNnCAgk+1hc24Qp6nibQHV824yiK+eG4qV+lpzkEEedkRx6NOW/h09OkT+pOSVMs0kcIhz7FzqChpl+jf6ZZpb13yJpQg2LoZIA4g8UdYHHFidWt4m5u1FZ9LPCqQ0OT3gnKK4qb0HIDaECfz5GYzrelLLces0PPwj1+X5eb38xUVtbkA1UJKLGKI882D8Rq5eBdbnDGsfDnF6oU+EBnGZ7o6HVQLdBgagDoVdx7yoXyntULeNxTENMTOZJEJbncQwxRgeEqJWXTTEW57O6Jo5uiHEpJA9lAePlRbS+z6BPDlnQogqOdTsYS0XMfOpYE0/r3cbtPUjETOmGYQxjQzfrFBfM7jaWnUquymZRYqCQ66VDo3I/ykNOCoM9qTmWt5L/MFfOZyoxLHnDThZBdJ3GXHfbivg+v+vOfY1gG8e2H2lQY+/LIMIJibF+MS4lJgrB81dcNdBzyxMNByuWQjSL1TY7un0QzcRcZz2NLrFGg8+9d67LQq4mK5ySimc6zdgnanuROU02vGr1EApT6D/qUItiulFgWqInNKrFXE9q74UP/WSooZPoLa3Du8y5s4eKerYYHQy5eSfIC8xKKDU8MSgoZhwQhCUP46G9Nsty0PYQc=
on:
branch: master
branch: main
tags: false
Comment on lines +32 to 33
condition: $TRAVIS_PYTHON_VERSION = "2.7"

Expand All @@ -40,7 +40,7 @@ deploy:
password:
secure: KkjKySJujYxx31B15mlAZr2Jo4P99LcrMj3uON/X/WMXAqYVcVsYJ6JSzUvpNnCAgk+1hc24Qp6nibQHV824yiK+eG4qV+lpzkEEedkRx6NOW/h09OkT+pOSVMs0kcIhz7FzqChpl+jf6ZZpb13yJpQg2LoZIA4g8UdYHHFidWt4m5u1FZ9LPCqQ0OT3gnKK4qb0HIDaECfz5GYzrelLLces0PPwj1+X5eb38xUVtbkA1UJKLGKI882D8Rq5eBdbnDGsfDnF6oU+EBnGZ7o6HVQLdBgagDoVdx7yoXyntULeNxTENMTOZJEJbncQwxRgeEqJWXTTEW57O6Jo5uiHEpJA9lAePlRbS+z6BPDlnQogqOdTsYS0XMfOpYE0/r3cbtPUjETOmGYQxjQzfrFBfM7jaWnUquymZRYqCQ66VDo3I/ykNOCoM9qTmWt5L/MFfOZyoxLHnDThZBdJ3GXHfbivg+v+vOfY1gG8e2H2lQY+/LIMIJibF+MS4lJgrB81dcNdBzyxMNByuWQjSL1TY7un0QzcRcZz2NLrFGg8+9d67LQq4mK5ySimc6zdgnanuROU02vGr1EApT6D/qUItiulFgWqInNKrFXE9q74UP/WSooZPoLa3Du8y5s4eKerYYHQy5eSfIC8xKKDU8MSgoZhwQhCUP46G9Nsty0PYQc=
on:
branch: master
branch: main
tags: true
condition: $TRAVIS_PYTHON_VERSION = "2.7"
Comment on lines +43 to 45

6 changes: 3 additions & 3 deletions msal/oauth2cli/oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import base64
import sys
import functools
import random
import secrets
import string
import hashlib

Expand Down Expand Up @@ -275,7 +275,7 @@ def _scope_set(scope):
def _generate_pkce_code_verifier(length=43):
assert 43 <= length <= 128
verifier = "".join( # https://tools.ietf.org/html/rfc7636#section-4.1
random.sample(string.ascii_letters + string.digits + "-._~", length))
secrets.choice(string.ascii_letters + string.digits + "-._~") for _ in range(length))
Comment on lines 277 to +278
code_challenge = (
# https://tools.ietf.org/html/rfc7636#section-4.2
base64.urlsafe_b64encode(hashlib.sha256(verifier.encode("ascii")).digest())
Expand Down Expand Up @@ -473,7 +473,7 @@ def initiate_auth_code_flow(
raise ValueError('response_type="token ..." is not allowed')
pkce = _generate_pkce_code_verifier()
flow = { # These data are required by obtain_token_by_auth_code_flow()
"state": state or "".join(random.sample(string.ascii_letters, 16)),
"state": state or "".join(secrets.choice(string.ascii_letters) for _ in range(16)),
"redirect_uri": redirect_uri,
"scope": scope,
}
Expand Down
4 changes: 2 additions & 2 deletions msal/oauth2cli/oidc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import base64
import time
import random
import secrets
import string
import warnings
import hashlib
Expand Down Expand Up @@ -238,7 +238,7 @@ def initiate_auth_code_flow(
# Here we just automatically add it. If the caller do not want id_token,
# they should simply go with oauth2.Client.
_scope.append("openid")
nonce = "".join(random.sample(string.ascii_letters, 16))
nonce = "".join(secrets.choice(string.ascii_letters) for _ in range(16))
flow = super(Client, self).initiate_auth_code_flow(
scope=_scope, nonce=_nonce_hash(nonce), **kwargs)
flow["nonce"] = nonce
Expand Down
Loading