mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
Validate request against schemas #2799
This commit is contained in:
parent
c1f9a470df
commit
c79fee5a49
2 changed files with 18 additions and 13 deletions
|
@ -15,6 +15,7 @@ class EppConstraint
|
|||
unless [:keyrelay, :poll].include?(@type)
|
||||
element = "//#{@type}:#{request.params[:action]}"
|
||||
return false if parsed_frame.xpath("#{element}", OBJECT_TYPES[@type]).none?
|
||||
request.params[:schema] = OBJECT_TYPES[@type][@type].split('/').last
|
||||
end
|
||||
|
||||
request.params[:parsed_frame] = parsed_frame.remove_namespaces!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue