Skip to content

Commit

Permalink
adminからも消す。
Browse files Browse the repository at this point in the history
  • Loading branch information
nna774 committed Sep 16, 2018
1 parent e7440a9 commit ae23afb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/webapp/ruby/lib/torb/web.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def render_report_csv(reports)
password = body_params['password'] password = body_params['password']


administrator = db.xquery('SELECT * FROM administrators WHERE login_name = ?', login_name).first administrator = db.xquery('SELECT * FROM administrators WHERE login_name = ?', login_name).first
pass_hash = db.xquery('SELECT SHA2(?, 256) AS pass_hash', password).first['pass_hash'] pass_hash = OpenSSL::Digest::SHA256.hexdigest(password)
halt_with_error 401, 'authentication_failed' if administrator.nil? || pass_hash != administrator['pass_hash'] halt_with_error 401, 'authentication_failed' if administrator.nil? || pass_hash != administrator['pass_hash']


session['administrator_id'] = administrator['id'] session['administrator_id'] = administrator['id']
Expand Down

0 comments on commit ae23afb

Please sign in to comment.