Project

General

Profile

Actions

Patch #44392

open

Replace IO.read with File.read

Added by Go MAEDA 1 day ago. Updated about 20 hours ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:

Description

Redmine reads files with IO.read and IO.binread in a few places.

IO.read and its variants treat an argument beginning with a pipe character as a command to run, while File.read always treats it as a file name. The current call sites build their paths internally, so this is not a vulnerability. However, File.read makes the intent clearer and avoids the risk if these paths ever become user-controlled.

The attached patch replaces IO.read and IO.binread with File.read and File.binread.


Files

use-file-read.patch (4.57 KB) use-file-read.patch Go MAEDA, 2026-08-28 08:21
Actions #1

Updated by Go MAEDA about 20 hours ago

  • Status changed from New to Resolved
  • Assignee set to Go MAEDA
  • Target version set to 6.1.5

Committed the patch in r25018.

Actions

Also available in: Atom PDF