Skip to content

Commit ae23afb

Browse files
committed
adminからも消す。
1 parent e7440a9 commit ae23afb

File tree

1 file changed

+1
-1
lines changed
  • app/webapp/ruby/lib/torb

1 file changed

+1
-1
lines changed

app/webapp/ruby/lib/torb/web.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def render_report_csv(reports)
376376
password = body_params['password']
377377

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

382382
session['administrator_id'] = administrator['id']

0 commit comments

Comments
 (0)