Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Double URL Decoding of Query Parameters

オープン
#117 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
java
領域
api

調査の方向性

RequestUtils.java の extractQuery、joinFormValues、decodeUrl から始め、そのフローを vertx-core HttpUtils::params が提供する HttpServerRequest のパラメーターと比較します。エンコードされた %25 のクエリ値を再現し、リテラルなパーセント記号とプラスを含む値が、2 回目の URL デコードなしで抽出を通過することを確認します。

索引モデルが issue の本文から書いたものです。

説明

bug
Version

5.0.4

Context

When specifying query parameters that need to be URL-encoded, the extractQuery function of RequestUtils attempts URL decoding of the parameter value. This is incorrect, as parameters are already URL-decoded when retrieving them them from the HttpServerRequest (in vertx-core/io.vertx.core.http.impl.HttpUtils::params).

This behavior is likely to go undetected, as URL decoding will only lead to unexpected results if the decoded parameter value include + characters or fail if the parameter value contains %. We ran into the latter case.

Steps to reproduce
  1. Define an endpoint with a query parameter
  2. Send a request where the parameter value includes the % character (encoded %25)
  3. Observe
io.vertx.openapi.validation.ValidatorException: Can't decode URL value: ((name!=Invalid) AND (name!=Error) and (name like 'thi%') and ( name like '_hin_' ) ) or name=thing
	at io.vertx.openapi.validation.RequestUtils.decodeUrl(RequestUtils.java:175) ~[vertx-openapi-5.0.4.jar:5.0.4]
	at io.vertx.openapi.validation.RequestUtils.lambda$joinFormValues$6(RequestUtils.java:155) ~[vertx-openapi-5.0.4.jar:5.0.4]
	[...]
	at io.vertx.openapi.validation.RequestUtils.joinFormValues(RequestUtils.java:155) ~[vertx-openapi-5.0.4.jar:5.0.4]
	at io.vertx.openapi.validation.RequestUtils.extractQuery(RequestUtils.java:131) ~[vertx-openapi-5.0.4.jar:5.0.4]
	at io.vertx.openapi.validation.RequestUtils.extract(RequestUtils.java:87) ~[vertx-openapi-5.0.4.jar:5.0.4]
	at io.vertx.openapi.validation.RequestUtils.extract(RequestUtils.java:55) ~[vertx-openapi-5.0.4.jar:5.0.4]
	at io.vertx.ext.web.openapi.router.RouterBuilder.lambda$create$0(RouterBuilder.java:61) ~[vertx-web-openapi-router-5.0.4.jar:5.0.4]
	at io.vertx.ext.web.openapi.router.impl.RouterBuilderImpl.lambda$createRouter$3(RouterBuilderImpl.java:131) ~[vertx-web-openapi-router-5.0.4.jar:5.0.4]
	[...]
Caused by: java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - Error at index 0 in: "')"
	at java.base/java.net.URLDecoder.decode(URLDecoder.java:243) ~[?:?]
	at io.vertx.openapi.validation.RequestUtils.decodeUrl(RequestUtils.java:173) ~[vertx-openapi-5.0.4.jar:5.0.4]
	... 68 more
Do you have a reproducer?

No response

主要言語
Java
スター
15
フォーク
19
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

eclipse-vertx/vertx-openapi のほかの issue

eclipse-vertx/vertx-openapi の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。