Double response and logic error in account settings update
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- typescript
調査の方向性
server/controllers/user.controller/authManagement.ts を開き、特に 159~201 行目と saveUser() の呼び出しを含めて updateSettings() を確認します。issue に記載された social-login のパスワード設定およびパスワード更新のフローを再現します。各リクエストが headers-already-sent エラーや成功後の誤った 401 なしに、必ず 1 つだけレスポンスを送信すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
p5.js version
No response
What is your operating system?
None
Web browser and version
No response
Actual Behavior
In updateSettings() multiple code paths send a response but do not return, so:
- Social login user setting password:
saveUser(res, user)is called (sends 200), then execution continues and can send 401. - Password update:
await saveUser(res, user)sends response, then execution falls through andsaveUser()is called again in theelseblock.
Result: "Cannot set headers after they are sent", inconsistent client state, or users seeing errors despite success.
Location: server/controllers/user.controller/authManagement.ts lines 159–201
Expected Behavior
Each code path that sends a response should return immediately. Only one response per request.
Steps to reproduce
- Log in with a social account (e.g. Google) that has no password set.
- Go to Account settings and set a new password (no current password).
- Submit the form. Observe: success response may be sent, then 401 or double-response error.
- Alternatively: log in with email/password, change password, submit. Observe possible double response or header errors.
Snippet:
// authManagement.ts - updateSettings (simplified)
if (user.password === undefined) {
user.password = req.body.newPassword;
saveUser(res, user); // sends response, no return
}
if (!req.body.currentPassword) {
res.status(401).json({ ... }); // second response
return;
}
// ...
await saveUser(res, user); // line 177 - sends response
// no return - falls through to:
} else {
await saveUser(res, user); // line 201 - sends again
}
- 主要言語
- JavaScript
- スター
- 1.7k
- フォーク
- 1.7k
- 平均マージ
- 3日 7時間
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
processing/p5.js-web-editor のほかの issue
-
Awaiting Maintainer Approval Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
processing/p5.js-web-editor#4348 ·
メンテナーはふだん 3 日以内に返信
-
Fix: example.js stores defaultHTML function reference instead of calling it, causing examples to display raw JavaScript source in preview対応中かも @syedbarkath980 が 4 日前に担当しました。 オープンAwaiting Maintainer Approval Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
processing/p5.js-web-editor#4344 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
signup form gets stuck when signup request fails due to network error対応中かも @PS01K が 33 日前に担当しました。 オープンAwaiting Maintainer Approval Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
processing/p5.js-web-editor#4285 · コメント 3 件 ·
メンテナーはふだん 3 日以内に返信
-
saveProject throws an error when a network request fails対応中かも @dyk1454683243-sudo が 5 日前に担当しました。 オープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
processing/p5.js-web-editor#4276 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
Awaiting Maintainer Approval Enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
processing/p5.js-web-editor#4270 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
processing/p5.js-web-editor の issue をすべて見る
似ている issue
-
Bump Firebase JS SDK (12.19.0 → 13.0.0)対応中かも @SelaseKay が今日担当しました。 オープンNeeds Attention type: enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
invertase/react-native-firebase#9364 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
tchiotludo/akhq#3307 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
DietrichGebert/ponytail#1063 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
zen-browser/desktop#15809 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 90/100