Validate not_found too against schema #2752

This commit is contained in:
Martin Lensment 2015-07-24 16:38:14 +03:00
parent 626fa6d25d
commit c38680a3b1
3 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ class EppController < ApplicationController
before_action :validate_against_schema
def validate_against_schema
return if ['hello', 'error', 'keyrelay', 'not_found'].include?(params[:action])
return if ['hello', 'error', 'keyrelay'].include?(params[:action])
params[:schema] = 'epp-1.0.xsd' unless params[:schema]
xsd = Nokogiri::XML::Schema(File.read("lib/schemas/#{params[:schema]}"))
xsd.validate(params[:nokogiri_frame]).each do |error|