From e9834f108a883a3d75b856d398480dc6cb201b4a Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 4 May 2016 16:35:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9pwd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/sso_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/sso_controller.rb b/app/controllers/sso_controller.rb index b4b2866a9..7a1433873 100644 --- a/app/controllers/sso_controller.rb +++ b/app/controllers/sso_controller.rb @@ -27,7 +27,8 @@ class SsoController < ApplicationController def parse(auth) crypted_str = Base64.decode64(auth) pkey = OpenSSL::PKey::RSA.new(File.new(File.join(Rails.root,"config/private.key"))) - content = pkey.private_decrypt(pwd,OpenSSL::PKey::RSA::NO_PADDING) + # content = pkey.private_decrypt(pwd,OpenSSL::PKey::RSA::NO_PADDING) + content = pkey.private_decrypt(crypted_str) JSON.parser(content) end