Requested scopes are lowercased when the SDK appends the `openid` scope
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 75/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
OidcUtils.includeRequiredScopeから始め、ParameterBuilder.setScopeとリクエストAPIでどのように使われるかを追ってください。再現された大文字小文字が混在するscopeと、openidがすでに含まれている場合の結果を比較してください。openidを追加しても要求されたすべてのscopeが変わらない状態になれば完了です。これらのケースに絞ったテストを追加または実行してください。
索引モデルが issue の本文から書いたものです。
説明
Description
When the requested scope does not include openid, the SDK appends it, but it also lowercases every other scope in the string. Scope values are case-sensitive (RFC 6749, section 3.3), so a mixed-case API permission such as read:Messages is sent as read:messages, and the authorization server does not grant the permission that was requested.
The scopes are left untouched when openid is already present, so the result depends on whether the caller included openid.
The code path is OidcUtils.includeRequiredScope, which ParameterBuilder.setScope, Request.addParameter("scope", ...), Request.addParameters(...) and WebAuthProvider.login(...).withScope(...) all use.
Reproduction
val params = ParameterBuilder.newBuilder()
.setScope("profile read:Messages")
.asDictionary()
// Expected: "profile read:Messages openid"
// Actual: "profile read:messages openid"
println(params["scope"])
WebAuthProvider.login(account).withScope(...) goes through the same function.
Additional context
- Auth0.Android:
mainatacf4068. - Workaround: include
openidin the scope string yourself.
- 主要言語
- Kotlin
- スター
- 301
- フォーク
- 183
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 19
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
auth0/Auth0.Android のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
auth0/Auth0.Android#1093 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
auth0/Auth0.Android の issue をすべて見る
似ている issue
-
enhancement impact:U1 P3 reach:R2 size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
ankidroid/Anki-Android#22677 ·
メンテナーはふだん 1 日以内に返信
-
Type Pick Request
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
reactwg/react-native-releases#1456 · コメント 1 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
yschimke/homeassistant-remotecompose#1038 ·
メンテナーはふだん 1 日以内に返信
-
area:data-quality importer size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
enorm-labs/event-junkie#3707 ·
メンテナーはふだん 1 日以内に返信