mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 10:49:39 +02:00
Allow latin only characters #2613
This commit is contained in:
parent
7f116527c4
commit
aeb3f2c9e0
3 changed files with 25 additions and 0 deletions
|
@ -5,6 +5,7 @@ class EppController < ApplicationController
|
|||
skip_before_action :verify_authenticity_token
|
||||
|
||||
before_action :generate_svtrid
|
||||
before_action :latin_only
|
||||
before_action :validate_request
|
||||
before_action :update_epp_session
|
||||
helper_method :current_user
|
||||
|
@ -106,6 +107,14 @@ class EppController < ApplicationController
|
|||
write_to_epp_log
|
||||
end
|
||||
|
||||
# VALIDATION
|
||||
def latin_only
|
||||
return true if params['frame'].blank?
|
||||
return true if params['frame'].match(/\A[\p{Latin}\p{Z}\p{P}\p{S}\p{Cc}\p{Cf}\w_\'\+\-\.\(\)\/]*\Z/i)
|
||||
render_epp_response '/epp/latin_error'
|
||||
false
|
||||
end
|
||||
|
||||
# VALIDATION
|
||||
def validate_request
|
||||
validation_method = "validate_#{params[:action]}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue