mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 07:04:47 +02:00
Handle anonymous user in EPP poll request
Unlike mod_epp, new EPP proxy (https://github.com/internetee/epp_proxy passes through all valid requests even if a user is not logged in, therefore we now need to handle such cases on registry app side. #730
This commit is contained in:
parent
fde323dd0e
commit
58b8c194bc
2 changed files with 16 additions and 2 deletions
|
@ -124,4 +124,19 @@ class EppPollTest < EppTestCase
|
|||
|
||||
assert_epp_response :object_does_not_exist
|
||||
end
|
||||
|
||||
def test_anonymous_user_cannot_access
|
||||
request_xml = <<-XML
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
|
||||
<command>
|
||||
<poll op="req"/>
|
||||
</command>
|
||||
</epp>
|
||||
XML
|
||||
|
||||
post '/epp/command/poll', { frame: request_xml }, 'HTTP_COOKIE' => 'session=non-existent'
|
||||
|
||||
assert_epp_response :authorization_error
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue