Session and built-in variables are not protected: $SESSION_PASSWORD is logged in clear, built-ins are writable, arithmetic clears the secret flag

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

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

評価

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

調査の方向性

Start with src/script_executor.cpp, reading setInitialVariables() and the INC/DEC/ADD handling around lines 337–351. Trace how variable metadata is set during initialization and arithmetic, and how SET treats built-ins. Reproduce the reported cases; done means session credentials are masked in logs, built-ins cannot be overwritten, and arithmetic preserves secret status.

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

説明

bug
Summary

setInitialVariables() stores $SESSION_* values with secret = false, so LOG "pw=$SESSION_PASSWORD" writes the password to the session log, whereas INPUT PASSWORD values are masked. Built-ins such as $SCREEN_ROWS can be overwritten with SET, and INC/DEC/ADD on a secret variable clear its secret flag.

Location
  • File(s): src/script_executor.cpp
  • Line(s) / function(s): initial variables L72–L74; INC/DEC/ADD L337–L351
Category

security

Severity

medium

Saved-session passwords passed to startup scripts end up in logs.

Reproduction / Evidence

Reproducible at runtime: initial $SESSION_PASSWORD=s3cret, LOG "pw=$SESSION_PASSWORD" → pw=s3cret. SET $SCREEN_ROWS 5 then LOG "$SCREEN_ROWS" → 5.

Expected Behavior

$SESSION_PASSWORD (and other credentials) are secret; built-ins are read-only; derived values keep the secret flag.

Actual Behavior

As above.

Root Cause

secret=false for initial variables; no read-only set; arithmetic re-sets variables without the flag.

主要言語
C++
スター
1
フォーク
2
平均マージ
1時間 34分
マージ済み PR(30日)
7

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

5250ng/5250script のほかの issue

5250ng/5250script の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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