From 371ec46f420a769b4d3d9357e31b6a62e5fc8908 Mon Sep 17 00:00:00 2001 From: Vladimir Krylov Date: Wed, 15 Jun 2016 17:28:49 +0300 Subject: [PATCH] Story#121580929 fix when incoming frame is empty --- CHANGELOG.md | 1 + lib/epp_constraint.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd5256897..f3537fd1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ * BUG: nameserver lable maximum 63 char length validation handled inproperly (#114677695) - support currently limited to Estonian IDN characters. * BUG: validation passes out of range ident_type values - now limited to org, priv and birthday (#111601356) * BUG: internal error on hello (#120828283) + * BUG: internal error broken incoming frame (#121580929) * Deploy: * BUG: incorrect version in commit message on deploy - config/deploy-example.rb (#120259603) diff --git a/lib/epp_constraint.rb b/lib/epp_constraint.rb index 992b5e37c..4463a7a04 100644 --- a/lib/epp_constraint.rb +++ b/lib/epp_constraint.rb @@ -12,8 +12,8 @@ class EppConstraint def matches?(request) # TODO: Maybe move this to controller to keep params clean request.params[:raw_frame] = request.params[:raw_frame].gsub!(/(?<=>)(.*?)(?=<)/) { |s| s.strip} if request.params[:raw_frame] - request.params[:nokogiri_frame] ||= Nokogiri::XML(request.params[:raw_frame]) - request.params[:parsed_frame] ||= request.params[:nokogiri_frame].dup.remove_namespaces! + request.params[:nokogiri_frame] ||= Nokogiri::XML(request.params[:raw_frame] || request.params[:frame]) + request.params[:parsed_frame] ||= request.params[:nokogiri_frame].dup.remove_namespaces! unless [:keyrelay, :poll, :session, :not_found].include?(@type) element = "//#{@type}:#{request.params[:action]}"