From c1f9a470dfcb0b6d062fcf1398c1811d2f9bd251 Mon Sep 17 00:00:00 2001 From: Martin Lensment Date: Wed, 22 Jul 2015 12:45:52 +0300 Subject: [PATCH] Experimental domain validation #2799 --- app/controllers/epp_controller.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/controllers/epp_controller.rb b/app/controllers/epp_controller.rb index 3fec7910b..6da50eab3 100644 --- a/app/controllers/epp_controller.rb +++ b/app/controllers/epp_controller.rb @@ -6,6 +6,23 @@ class EppController < ApplicationController before_action :generate_svtrid before_action :latin_only + # before_action :validate_against_schema + + # def validate_against_schema + # if params[:epp_object_type] == :domain + + # xsd = Nokogiri::XML::Schema(File.read('doc/schemas/domain-eis-1.0.xsd')) + # xsd.validate(Nokogiri::XML(params[:raw_frame])).each do |error| + # epp_errors << { + # code: 2002, + # msg: error + # } + # end + # end + + # handle_errors and return if epp_errors.any? + # end + before_action :validate_request before_action :update_epp_session