mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Filter EPP login password
This commit is contained in:
parent
dd3145b292
commit
254849494f
1 changed files with 9 additions and 2 deletions
|
@ -239,8 +239,15 @@ class EppController < ApplicationController
|
|||
def write_to_epp_log
|
||||
# return nil if EPP_LOG_ENABLED
|
||||
request_command = params[:command] || params[:action] # error receives :command, other methods receive :action
|
||||
frame = params[:raw_frame] || params[:frame]
|
||||
|
||||
# filter pw
|
||||
if request_command == 'login' && frame.present?
|
||||
frame.gsub!(/<pw>.+<\/pw>/, '<pw>[FILTERED]</pw>')
|
||||
end
|
||||
|
||||
ApiLog::EppLog.create({
|
||||
request: params[:raw_frame] || params[:frame],
|
||||
request: frame,
|
||||
request_command: request_command,
|
||||
request_successful: epp_errors.empty?,
|
||||
request_object: params[:epp_object_type],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue