Add pw filtered #2757

This commit is contained in:
Priit Tark 2015-07-13 18:06:59 +03:00
parent 3d33ddd638
commit 027d800b35
2 changed files with 5 additions and 1 deletions

View file

@ -281,7 +281,7 @@ class EppController < ApplicationController
# filter pw # filter pw
if request_command == 'login' && frame.present? if request_command == 'login' && frame.present?
frame.gsub!(/<pw>.+<\/pw>/, '<pw>[FILTERED]</pw>') frame.gsub!(/pw>.+<\//, 'pw>[FILTERED]</')
end end
ApiLog::EppLog.create({ ApiLog::EppLog.create({

View file

@ -2,3 +2,7 @@
# Configure sensitive parameters which will be filtered from the log file. # Configure sensitive parameters which will be filtered from the log file.
Rails.application.config.filter_parameters += [:password] Rails.application.config.filter_parameters += [:password]
Rails.application.config.filter_parameters << lambda do |key, value|
frame.gsub!(/pw>.+<\//, 'pw>[FILTERED]</') if key =~ /frame|raw_frame/i
end