Bug #7694

permission of irb history file

Added by Nobuhiro IMAI over 1 year ago. Updated over 1 year ago.

[ruby-core:<unknown>]
Status:Closed
Priority:Normal
Assignee:Keiju Ishitsuka
Category:lib
Target version:-
ruby -v:ruby 2.0.0dev (2013-01-14 trunk 38812) [x86_64-linux] Backport:

Description

=begin
Irb outputs its history to world readable file.
This can be a problem. See also #7679.
=end

irb-save-history.patch Magnifier (432 Bytes) Nobuhiro IMAI, 01/15/2013 10:17 PM

Associated revisions

Revision 38813
Added by Keiju Ishitsuka over 1 year ago

  • 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.

Revision 38834
Added by Keiju Ishitsuka over 1 year ago

  • lib/irb/ext/save-history.rb: identify rightly a status of a history file that already exists [Bug #7694]. Thanks Nobuhiro IMAI for this patch.

History

#1 Updated by Keiju Ishitsuka over 1 year 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 Updated by Nobuhiro IMAI over 1 year ago

=begin
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.
=end

Also available in: Atom PDF