RequestValidator.validate incorrectly decodes query string when removing port
@bhaskar16 がすでに取り組んでいます。
2024年11月18日 から。
評価
この issue はまだ評価されていません。
説明
Issue Summary
When removing the port RequestValidator.validate incorrectly decodes the path, query, and fragment.
e.g.
https://someurl.com:443/somepath?param1=client%3AAnonymous
is converted to
https://someurl.com/somepath?param1=client:Anonymous
A suggestion is to consider using getRawPath, getRawQuery, and getRawFragment instead.
Steps to Reproduce
- The snippet below demonstrates the issue. The
validateoutput should be the same for both URLs.
Code Snippet
import java.net.URI;
import java.util.HashMap;
import com.twilio.security.RequestValidator;
...
String url1 = "https://someurl.com/somepath?param1=client%3AAnonymous";
String url2 = "https://someurl.com:443/somepath?param1=client%3AAnonymous";
String signature = "PM+bjB+ITJ9a3LIYStKWOTMZMlU=";
RequestValidator r= new RequestValidator("1234567890");
System.out.println("valid without port?: " + r.validate(url1, new HashMap<>(), signature));
System.out.println("valid with port?: " + r.validate(url2, new HashMap<>(), signature));
Exception/Log
valid without port?: true
valid with port?: false
Technical details:
- twilio-java version: 7.55.3 (latest as of submission)
- java version: 1.8.0_161
- 主要言語
- Java
- スター
- 529
- フォーク
- 452
- 平均マージ
- 1時間 30分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
twilio/twilio-java のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
twilio/twilio-java#976 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
twilio/twilio-java#975 ·
-
[BUG] Sip.Builder(String) drops SIP destinations with an explicit port when the scheme is omittedオープンtype: bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
twilio/twilio-java#982 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
twilio/twilio-java#960 ·
-
MessageIntent is not supported in the Java SDK再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
twilio/twilio-java#950 · コメント 2 件 ·
twilio/twilio-java の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
federicoiosue/Omni-Notes#1032 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
unitycatalog/unitycatalog#2025 ·
メンテナーはふだん 4 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
krizaka/krizaka-notifications#22 ·
メンテナーはふだん 1 日以内に返信
-
CommandDispatcher.register returns a node that is not in the tree when the literal is already registered対応中かも @auraseb が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
-
ToolCallbackProvider AutoConfiguration does not preserve tool order対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンstatus: waiting-for-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
spring-projects/spring-ai#7206 ·
メンテナーはふだん 2 日以内に返信