Commit 014285f
committed
Keep refreshing a connection that has no recorded scope
The scope validation compared the provider's reported scope against the
connection's recorded grant set. When that set is empty the comparison had no
subset to accept, so every reported scope failed the whole refresh — and the
failure is a retryable StorageError, so the connection would retry a grant that
could never succeed, indefinitely.
An empty grant set is a legitimate state, not a corrupt one: RFC 6749 §5.1
lets an authorization server omit the scope it granted, and the refresh request
then omits the scope parameter entirely. With nothing recorded there is also
nothing to widen away from, so the safe action is to keep the refresh and
record no scope. The provider's string is still never persisted, which is the
property the validation exists to hold.1 parent c69cc52 commit 014285f
2 files changed
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2045 | 2045 | | |
2046 | 2046 | | |
2047 | 2047 | | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
2048 | 2057 | | |
2049 | 2058 | | |
2050 | 2059 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
879 | 879 | | |
880 | 880 | | |
881 | 881 | | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
882 | 909 | | |
0 commit comments