line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
## Domain Registry Interface, AFNIC EPP Notifications |
2
|
|
|
|
|
|
|
## |
3
|
|
|
|
|
|
|
## Copyright (c) 2008-2010,2012 Patrick Mevzek . All rights reserved. |
4
|
|
|
|
|
|
|
## |
5
|
|
|
|
|
|
|
## This file is part of Net::DRI |
6
|
|
|
|
|
|
|
## |
7
|
|
|
|
|
|
|
## Net::DRI is free software; you can redistribute it and/or modify |
8
|
|
|
|
|
|
|
## it under the terms of the GNU General Public License as published by |
9
|
|
|
|
|
|
|
## the Free Software Foundation; either version 2 of the License, or |
10
|
|
|
|
|
|
|
## (at your option) any later version. |
11
|
|
|
|
|
|
|
## |
12
|
|
|
|
|
|
|
## See the LICENSE file that comes with this distribution for more details. |
13
|
|
|
|
|
|
|
#################################################################################################### |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
package Net::DRI::Protocol::EPP::Extensions::AFNIC::Notifications; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
716
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
18
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
20
|
|
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
3
|
use Net::DRI::Util; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
14
|
|
21
|
1
|
|
|
1
|
|
3
|
use Net::DRI::Protocol::EPP::Util; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
22
|
1
|
|
|
1
|
|
3
|
use Net::DRI::Protocol::EPP::Extensions::AFNIC::Contact; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
539
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=pod |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 NAME |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Net::DRI::Protocol::EPP::Extensions::AFNIC::Notifications - AFNIC (.FR/.RE/.TF/.WF/.PM/.YT) EPP Notifications for Net::DRI |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 DESCRIPTION |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Please see the README file for details. |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 SUPPORT |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
For now, support questions should be sent to: |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Enetdri@dotandco.comE |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Please also see the SUPPORT file in the distribution. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 SEE ALSO |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Ehttp://www.dotandco.com/services/software/Net-DRI/E |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 AUTHOR |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Patrick Mevzek, Enetdri@dotandco.comE |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 COPYRIGHT |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Copyright (c) 2008-2010,2012 Patrick Mevzek . |
53
|
|
|
|
|
|
|
All rights reserved. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
56
|
|
|
|
|
|
|
it under the terms of the GNU General Public License as published by |
57
|
|
|
|
|
|
|
the Free Software Foundation; either version 2 of the License, or |
58
|
|
|
|
|
|
|
(at your option) any later version. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
See the LICENSE file that comes with this distribution for more details. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
#################################################################################################### |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub register_commands |
67
|
|
|
|
|
|
|
{ |
68
|
0
|
|
|
0
|
0
|
|
my ($class,$version)=@_; |
69
|
0
|
|
|
|
|
|
my %tmp=( |
70
|
|
|
|
|
|
|
review_zonecheck => [ undef, \&parse_zonecheck ], |
71
|
|
|
|
|
|
|
review_identification => [ undef, \&parse_identification ], |
72
|
|
|
|
|
|
|
review_qualification => [ undef, \&parse_qualification ], |
73
|
|
|
|
|
|
|
); |
74
|
|
|
|
|
|
|
|
75
|
0
|
|
|
|
|
|
return { 'message' => \%tmp }; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
#################################################################################################### |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub parse_zonecheck |
81
|
|
|
|
|
|
|
{ |
82
|
0
|
|
|
0
|
0
|
|
my ($po,$otype,$oaction,$oname,$rinfo)=@_; |
83
|
0
|
|
|
|
|
|
my $mes=$po->message(); |
84
|
0
|
0
|
|
|
|
|
return unless $mes->is_success(); |
85
|
0
|
0
|
|
|
|
|
return unless $mes->node_msg(); ## this is the node in the EPP header |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
## For now there is no namespace |
88
|
|
|
|
|
|
|
#my $zc=$mes->node_msg()->getChildrenByTagNameNS($mes->ns('frnic'),'resZC'); |
89
|
0
|
|
|
|
|
|
my $zc=$mes->node_msg()->getChildrenByTagName('resZC'); |
90
|
0
|
0
|
|
|
|
|
return unless $zc->size(); |
91
|
0
|
|
|
|
|
|
$zc=$zc->shift(); |
92
|
0
|
0
|
|
|
|
|
return unless ($zc->getAttribute('type') eq 'plain-text'); ## we do not know what to do with other types |
93
|
|
|
|
|
|
|
|
94
|
0
|
|
|
|
|
|
$rinfo->{domain}->{$oname}->{review_zonecheck}=$zc->textContent(); ## a blob for now |
95
|
0
|
|
|
|
|
|
$rinfo->{domain}->{$oname}->{action}='review_zonecheck'; |
96
|
0
|
|
|
|
|
|
$rinfo->{domain}->{$oname}->{exist}=1; |
97
|
|
|
|
|
|
|
|
98
|
0
|
|
|
|
|
|
return; |
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
sub parse_identification |
102
|
|
|
|
|
|
|
{ |
103
|
0
|
|
|
0
|
0
|
|
my ($po,$otype,$oaction,$oname,$rinfo)=@_; |
104
|
0
|
|
|
|
|
|
my $mes=$po->message(); |
105
|
0
|
0
|
|
|
|
|
return unless $mes->is_success(); |
106
|
0
|
|
|
|
|
|
my $idt=$mes->get_extension('frnic','ext'); |
107
|
0
|
0
|
|
|
|
|
return unless defined $idt; |
108
|
|
|
|
|
|
|
|
109
|
0
|
|
|
|
|
|
my $ns=$mes->ns('frnic'); |
110
|
0
|
|
|
|
|
|
$idt=Net::DRI::Util::xml_traverse($idt,$ns,'resData','idtData'); |
111
|
0
|
0
|
|
|
|
|
return unless defined $idt; |
112
|
|
|
|
|
|
|
|
113
|
0
|
|
|
|
|
|
my $c=Net::DRI::Util::xml_traverse($idt,$ns,'domain'); |
114
|
0
|
0
|
|
|
|
|
return unless defined $c; |
115
|
|
|
|
|
|
|
|
116
|
0
|
|
|
|
|
|
$oname=lc Net::DRI::Util::xml_child_content($c,$ns,'name'); |
117
|
0
|
|
|
|
|
|
$rinfo->{domain}->{$oname}->{action}='review_identification'; |
118
|
0
|
|
|
|
|
|
$rinfo->{domain}->{$oname}->{exist}=1; |
119
|
0
|
|
|
|
|
|
$rinfo->{domain}->{$oname}->{status}=$po->create_local_object('status')->add(Net::DRI::Protocol::EPP::Util::parse_node_status(Net::DRI::Util::xml_traverse($c,$ns,'status'))); |
120
|
0
|
|
|
|
|
|
$rinfo->{domain}->{$oname}->{contact}=$po->create_local_object('contactset')->set($po->create_local_object('contact')->srid(Net::DRI::Util::xml_child_content($c,$ns,'registrant')),'registrant'); |
121
|
|
|
|
|
|
|
|
122
|
0
|
|
|
|
|
|
return; |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
sub parse_qualification |
126
|
|
|
|
|
|
|
{ |
127
|
0
|
|
|
0
|
0
|
|
my ($po,$otype,$oaction,$oname,$rinfo)=@_; |
128
|
0
|
|
|
|
|
|
my $mes=$po->message(); |
129
|
0
|
0
|
|
|
|
|
return unless $mes->is_success(); |
130
|
0
|
|
|
|
|
|
my $qua=$mes->get_extension('frnic','ext'); |
131
|
0
|
0
|
|
|
|
|
return unless defined $qua; |
132
|
|
|
|
|
|
|
|
133
|
0
|
|
|
|
|
|
my $ns=$mes->ns('frnic'); |
134
|
0
|
|
|
|
|
|
$qua=Net::DRI::Util::xml_traverse($qua,$ns,'resData','quaData'); |
135
|
0
|
0
|
|
|
|
|
return unless defined $qua; |
136
|
|
|
|
|
|
|
|
137
|
0
|
|
|
|
|
|
my $c=Net::DRI::Util::xml_traverse($qua,$ns,'contact'); |
138
|
0
|
0
|
|
|
|
|
return unless defined $c; |
139
|
|
|
|
|
|
|
|
140
|
0
|
|
|
|
|
|
my ($co,@reasons); |
141
|
0
|
|
|
|
|
|
my %q; |
142
|
0
|
|
|
|
|
|
foreach my $el (Net::DRI::Util::xml_list_children($c)) |
143
|
|
|
|
|
|
|
{ |
144
|
0
|
|
|
|
|
|
my ($name,$node)=@$el; |
145
|
0
|
0
|
|
|
|
|
if ($name eq 'id') |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
146
|
|
|
|
|
|
|
{ |
147
|
0
|
|
|
|
|
|
$oname=$node->textContent(); |
148
|
0
|
|
|
|
|
|
$rinfo->{contact}->{$oname}->{action}='review_qualification'; |
149
|
0
|
|
|
|
|
|
$rinfo->{contact}->{$oname}->{exist}=1; |
150
|
0
|
|
|
|
|
|
$co=$po->create_local_object('contact')->srid($oname); |
151
|
0
|
|
|
|
|
|
$rinfo->{contact}->{$oname}->{self}=$co; |
152
|
|
|
|
|
|
|
} elsif ($name eq 'qualificationProcess') |
153
|
|
|
|
|
|
|
{ |
154
|
0
|
|
|
|
|
|
$rinfo->{contact}->{$oname}->{qualification_process_status}=$q{'process_status'}=$node->getAttribute('s'); |
155
|
|
|
|
|
|
|
} elsif ($name eq 'legalEntityInfos') |
156
|
|
|
|
|
|
|
{ |
157
|
0
|
|
|
|
|
|
Net::DRI::Protocol::EPP::Extensions::AFNIC::Contact::parse_legalentityinfos($po,$otype,$oaction,$oname,$rinfo,$node,$co,$mes,\%q); |
158
|
|
|
|
|
|
|
} elsif ($name eq 'individualInfos') |
159
|
|
|
|
|
|
|
{ |
160
|
0
|
|
|
|
|
|
Net::DRI::Protocol::EPP::Extensions::AFNIC::Contact::parse_individualinfos($po,$otype,$oaction,$oname,$rinfo,$node,$co,$mes,\%q); |
161
|
|
|
|
|
|
|
} elsif ($name eq 'reachability') |
162
|
|
|
|
|
|
|
{ |
163
|
0
|
|
|
|
|
|
my %r; |
164
|
0
|
|
|
|
|
|
$r{status}=Net::DRI::Util::xml_child_content($node,$ns,'reStatus'); |
165
|
0
|
|
|
|
|
|
foreach my $v (qw/voice email/) |
166
|
|
|
|
|
|
|
{ |
167
|
0
|
|
|
|
|
|
my $tmp=Net::DRI::Util::xml_child_content($node,$ns,$v); |
168
|
0
|
0
|
|
|
|
|
next unless defined $tmp; |
169
|
0
|
|
|
|
|
|
$r{$v}=$tmp; |
170
|
|
|
|
|
|
|
} |
171
|
0
|
|
|
|
|
|
$q{reachable}=\%r; |
172
|
|
|
|
|
|
|
} |
173
|
|
|
|
|
|
|
} |
174
|
0
|
|
|
|
|
|
$co->qualification(\%q); |
175
|
|
|
|
|
|
|
|
176
|
0
|
|
|
|
|
|
return; |
177
|
|
|
|
|
|
|
} |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
#################################################################################################### |
180
|
|
|
|
|
|
|
1; |