mirror of
https://github.com/internetee/registry.git
synced 2025-06-12 07:34:45 +02:00
parent
0c5284e8f9
commit
66b03e6d11
2 changed files with 19 additions and 20 deletions
|
@ -90,25 +90,6 @@ class EppController < ApplicationController
|
|||
EppSession.find_by(session_id: epp_session_id)
|
||||
end
|
||||
|
||||
def update_epp_session
|
||||
iptables_counter_update
|
||||
|
||||
if !Rails.env.development? && (epp_session.updated_at < Time.zone.now - 5.minutes)
|
||||
@api_user = current_user # cache current_user for logging
|
||||
epp_session.destroy
|
||||
response.headers['X-EPP-Returncode'] = '1500'
|
||||
|
||||
epp_errors << {
|
||||
msg: t('session_timeout'),
|
||||
code: '2201'
|
||||
}
|
||||
|
||||
handle_errors and return
|
||||
else
|
||||
epp_session.update_column(:updated_at, Time.zone.now)
|
||||
end
|
||||
end
|
||||
|
||||
def current_user
|
||||
return unless signed_in?
|
||||
epp_session.user
|
||||
|
@ -398,4 +379,23 @@ class EppController < ApplicationController
|
|||
def epp_session_id
|
||||
cookies[:session]
|
||||
end
|
||||
|
||||
def update_epp_session
|
||||
iptables_counter_update
|
||||
|
||||
if !Rails.env.development? && (epp_session.updated_at < Time.zone.now - 5.minutes)
|
||||
@api_user = current_user # cache current_user for logging
|
||||
epp_session.destroy
|
||||
response.headers['X-EPP-Returncode'] = '1500'
|
||||
|
||||
epp_errors << {
|
||||
msg: t('session_timeout'),
|
||||
code: '2201'
|
||||
}
|
||||
|
||||
handle_errors and return
|
||||
else
|
||||
epp_session.update_column(:updated_at, Time.zone.now)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -681,7 +681,6 @@
|
|||
<text text-anchor="start" x="-72.5" y="74.2" font-family="Times,serif" font-size="14.00">render_epp_response</text>
|
||||
<text text-anchor="start" x="-72.5" y="89.2" font-family="Times,serif" font-size="14.00">requires</text>
|
||||
<text text-anchor="start" x="-72.5" y="104.2" font-family="Times,serif" font-size="14.00">requires_attribute</text>
|
||||
<text text-anchor="start" x="-72.5" y="119.2" font-family="Times,serif" font-size="14.00">update_epp_session</text>
|
||||
<text text-anchor="start" x="-72.5" y="134.2" font-family="Times,serif" font-size="14.00">validate_request</text>
|
||||
<text text-anchor="start" x="-72.5" y="149.2" font-family="Times,serif" font-size="14.00">write_to_epp_log</text>
|
||||
<text text-anchor="start" x="-72.5" y="164.2" font-family="Times,serif" font-size="14.00">xml_attrs_present?</text>
|
||||
|
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
Loading…
Add table
Add a link
Reference in a new issue