Permalink
Browse files

adminからも消す。

  • Loading branch information...
nna774 committed Sep 16, 2018
1 parent e7440a9 commit ae23afb356f8df40bbdfc4d02ee6773079934777
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/webapp/ruby/lib/torb/web.rb
@@ -376,7 +376,7 @@ def render_report_csv(reports)
password = body_params['password']
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']
session['administrator_id'] = administrator['id']

0 comments on commit ae23afb

Please sign in to comment.