Story#121580929 fix when incoming frame is empty

This commit is contained in:
Vladimir Krylov 2016-06-15 17:28:49 +03:00
parent 37952d22ed
commit 371ec46f42
2 changed files with 3 additions and 2 deletions

View file

@ -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)

View file

@ -12,7 +12,7 @@ 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[: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)