permission of irb history file
Irb outputs its history to world readable file.
This can be a problem. See also #7679.
#1 Updated by keiju (Keiju Ishitsuka) about 5 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r38813.
Nobuhiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- lib/irb/ext/save-history.rb: outputs its history to owner-only-readable file and change the permission of a file that already exists [Bug #7694]. Thanks Nobuhiro IMAI for bug reports.
#2 [ruby-core:51448] Updated by no6v (Nobuhiro IMAI) about 5 years ago
Thanks to fix this. But
File.stat(history_file).mode & 066
returns true value even if the history file mode is already 0600, so the if-statement is ineffective. I attached a tiny patch.