Skip to content

Commit

Permalink
comment that out, it's dangerous right now
Browse files Browse the repository at this point in the history
  • Loading branch information
timfel committed Feb 1, 2010
1 parent 4b4b544 commit 7c3b59a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/bithug/key.rb
Expand Up @@ -16,16 +16,16 @@ class Bithug::Key < Ohm::Model

def remove(user)
# BUG: SANITIZE USERNAME FOR REGEX!
File.open(KEYS_FILE+Time.now.to_i.to_s, 'w') do |out|
File.open(KEYS_FILE, 'r+') do |infile|
line = infile.readline
out << line unless line.end_with?(key)
end
end
#File.open(KEYS_FILE+Time.now.to_i.to_s, 'w') do |out|
# File.open(KEYS_FILE, 'r+') do |infile|
# line = infile.readline
# out << line unless line.end_with?(key)
# end
#end

# BUG: LOCKING HAS TO BE PLACED HERE, OR CHECK IF THE TSTAMP
# OF THE OLD FILE CHANGED
FileUtils.cp(KEYS_FILE+Time.now.to_i.to_s, KEYS_FILE)
#FileUtils.cp(KEYS_FILE+Time.now.to_i.to_s, KEYS_FILE)
user.ssh_keys.delete(self)
self.delete
end
Expand Down

0 comments on commit 7c3b59a

Please sign in to comment.