Malformed URI when encrypting string using md5
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 18/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, typescript
- 領域
- cryptography
調査の方向性
Read src/routes/offerwall/index.ts at the reported call site and node_modules/node-forge/lib/util.js around util.decodeUtf8. Reproduce the error with the shown query values, then inspect which value reaches ByteStringBuffer.toString(). Done would require identifying whether the malformed input is in the application usage or in forge's decoding behavior; the issue does not specify a repository change.
索引モデルが issue の本文から書いたものです。
説明
Kindly, help me solve this error of Malformed URI when encrypting string using md5.
The error is:
URIError: URI malformed
at decodeURIComponent (<anonymous>)
at Object.util.decodeUtf8 (/home/pi/Projects/scratcher/node_modules/node-forge/lib/util.js:1671:10)
at ByteStringBuffer.util.ByteStringBuffer.toString (/home/pi/Projects/scratcher/node_modules/node-forge/lib/util.js:716:15)
at /home/pi/Projects/scratcher/src/routes/offerwall/index.ts:32:99
at Generator.next (<anonymous>)
at /home/pi/Projects/scratcher/src/routes/offerwall/index.ts:8:71
at new Promise (<anonymous>)
at __awaiter (/home/pi/Projects/scratcher/src/routes/offerwall/index.ts:4:12)
at /home/pi/Projects/scratcher/src/routes/offerwall/index.ts:12:36
at Layer.handle [as handle_request] (/home/pi/Projects/scratcher/node_modules/express/lib/router/layer.js:95:5)
The code is:
import { md5 } from "node-forge";
const sub_id = encodeURIComponent(req.query.sub_id!.toString());
const amount = encodeURIComponent(req.query.amount!.toString());
const signature = req.query.signature!.toString();
const secret_key = encodeURIComponent(process.env.SECRET_KEY!);
if (!amount || !sub_id || !signature) {
res.send("0");
return;
}
let conn;
const md = md5.create()
const validation_signature = md.update(sub_id + ":" + amount + ":" + secret_key).digest().toString();
Your help would be greatly appreciated.
- 主要言語
- JavaScript
- スター
- 5.4k
- フォーク
- 875
- 平均マージ
- 3分
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
digitalbazaar/forge のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
digitalbazaar/forge#1170 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
digitalbazaar/forge#1147 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
digitalbazaar/forge#1146 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
digitalbazaar/forge#1145 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
digitalbazaar/forge#1144 ·
メンテナーはふだん 1 日以内に返信
digitalbazaar/forge の issue をすべて見る
似ている issue
-
[docs] RELEASE.md: wrong branch name, no check that the prepare PR merged with the right subject, manual publish step対応中かも @albertteoh が今日担当しました。 オープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
jaegertracing/jaeger-ui#4739 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
keepassxreboot/keepassxc-browser#3159 · コメント 1 件 ·
-
Add: ESP 2 RSオープンapproved check:passed feeds:add
難易度 1/5 1時間未満 初心者へのやさしさ 67/100
-
v6: OTP input keeps the rest of a selection when you type over it対応中かも @thejesh23 が今日担当しました。 オープンbug confirmed has-pr js v6
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
twbs/bootstrap#43323 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信