blib/lib/Lemonldap/NG/Portal/Main/Init.pm

filter: Statementstmt 84.9% 321 / 378 Branchbran 69.3% 79 / 114 Conditioncond 52.8% 37 / 70 MC/DCmcdc 17.9% 7 / 39 Subroutinesub 82.0% 41 / 50 Podpod 0.0% 0 / 13 totaltotal 73.0% 485 / 664 CC 106 SCAR 40.3
CC
106
Cov
78%
findEP
176.5
reloadConf
45.1
init
11.5
CRAP 56.1
« blib/lib/Lemonldap/NG/Portal/Plugins/CDA.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/UserDB/Demo.pm »
1 ##@class Lemonldap::NG::Portal::Main::Init
2 # Initialization part of Lemonldap::NG portal
3 #
4 # 2 public methods:
5 # - init(): launch at startup. Load 'portal' section of lemonldap-ng.ini,
6 # initialize default route and launch reloadConf()
7 # - reloadConf(): (re)load configuration using localConf (ie 'portal' section
8 # of lemonldap-ng.ini) and underlying handler configuration
9 package Lemonldap::NG::Portal::Main::Init;
10  
11 429 our $VERSION = '2.22.0';
12  
13 package Lemonldap::NG::Portal::Main;
14  
15 429 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 429 ▶use Mouse;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 429 ▶use Regexp::Assemble;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 429 ▶use Lemonldap::NG::Common::Util qw(getSameSite);
Subroutine BEGIN: called CC=1 SCAR=0.0
19 429 ▶use URI;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 429 ▶use Lemonldap::NG::Portal;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 429 ▶use MIME::Base64;
Subroutine BEGIN: called CC=1 SCAR=0.0
22 429 ▶use Digest::SHA;
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 # PROPERTIES
25  
26 # Configuration storage
27 423 ▶has localConfig => ( is => 'rw', default => sub { {} } );
Subroutine __ANON__: called CC=1 SCAR=0.0
28 423 ▶has conf => ( is => 'rw', default => sub { {} } );
Subroutine __ANON__: called CC=1 SCAR=0.0
29 423 ▶has trOver => ( is => 'rw', default => sub { { all => {} } } );
Subroutine __ANON__: called CC=1 SCAR=0.0
30  
31 # Sub modules
32 429 has _authentication => ( is => 'rw' );
33 429 has _userDB => ( is => 'rw' );
34 429 has _passwordDB => ( is => 'rw' );
35  
36 423 ▶has _loadedServices => ( is => 'rw', default => sub { {} } );
Subroutine __ANON__: called CC=1 SCAR=0.0
37 423 ▶has _loadedPlugins => ( is => 'rw', default => sub { {} } );
Subroutine __ANON__: called CC=1 SCAR=0.0
38  
39 # Legacy
40 0 ▶sub _captcha { $_[0]->getService('captcha') }
Subroutine _captcha: not called CC=1 SCAR=6.9
41 0 ▶sub _trustedBrowser { $_[0]->getService('trustedBrowser') }
Subroutine _trustedBrowser: not called CC=1 SCAR=6.9
42 0 ▶sub _sfEngine { $_[0]->getService('secondFactor') }
Subroutine _sfEngine: not called CC=1 SCAR=6.9
43 0 ▶sub menu { $_[0]->getService('menu') }
Subroutine menu: not called CC=1 SCAR=6.9
Pod undocumented
44  
45 423 ▶has _ppRules => ( is => 'rw', default => sub { {} } );
Subroutine __ANON__: called CC=1 SCAR=0.0
46  
47 429 has loadedModules => ( is => 'rw' );
48  
49 # Macros and groups
50 429 has _macros => ( is => 'rw' );
51 429 has _groups => ( is => 'rw' );
52 429 has _jsRedirect => ( is => 'rw' );
53  
54 # TrustedDomain regexp
55 429 has trustedDomainsRe => ( is => 'rw' );
56 423 ▶has additionalTrustedDomains => ( is => 'rw', default => sub { [] } );
Subroutine __ANON__: called CC=1 SCAR=0.0
57  
58 429 has cacheTag => ( is => 'rw' );
59  
60 # Entrypoints
61 has _pluginEntryPoints =>
62 423 ▶ ( is => 'rw', isa => 'ArrayRef', default => sub { [] } );
Subroutine __ANON__: called CC=1 SCAR=0.0
63  
64 # Lists to store plugins entry-points
65 429 my @entryPoints;
66  
67 BEGIN {
68 429 ▶ @entryPoints = (
Subroutine BEGIN: called CC=2 SCAR=6.9
69  
70 # Auth process entrypoints
71 qw(beforeAuth betweenAuthAndData afterData endAuth),
72  
73 # Authenticated users entrypoint
74 'forAuthUser',
75  
76 # Logout entrypoint
77 'beforeLogout',
78  
79 # Special endpoint
80 'authCancel', # Clean pdata when user click on "cancel"
81 );
82  
83 429 foreach (@entryPoints) {
84 has $_ => (
85 is => 'rw',
86 isa => 'ArrayRef',
87 2961 ▶ default => sub { [] }
Subroutine __ANON__: called CC=1 SCAR=0.0
88 3003 );
89 }
90 }
91  
92 # Endpoints inserted after any main sub
93 423 ▶has afterSub => ( is => 'rw', default => sub { {} } );
Subroutine __ANON__: called CC=1 SCAR=0.0
94 423 ▶has aroundSub => ( is => 'rw', default => sub { {} } );
Subroutine __ANON__: called CC=1 SCAR=0.0
95  
96 # Issuer hooks
97 423 ▶has hook => ( is => 'rw', default => sub { {} } );
Subroutine __ANON__: called CC=1 SCAR=0.0
98  
99 has spRules => (
100 is => 'rw',
101 423 ▶ default => sub { {} }
Subroutine __ANON__: called CC=1 SCAR=0.0
102 429 );
103  
104 # Custom template parameters
105 423 ▶has customParameters => ( is => 'rw', default => sub { {} } );
Subroutine __ANON__: called CC=1 SCAR=0.0
106  
107 # Content-Security-Policy headers
108 429 has csp => ( is => 'rw' );
109  
110 # Cross-Origine Resource Sharing headers
111 429 has cors => ( is => 'rw' );
112  
113 # Cookie SameSite value
114 429 has cookieSameSite => ( is => 'rw' );
115  
116 # Plugins may declare the session data they want to store in login history here
117 has pluginSessionDataToRemember =>
118 423 ▶ ( is => 'rw', isa => "HashRef", default => sub { {} } );
Subroutine __ANON__: called CC=1 SCAR=0.0
119  
120 # INITIALIZATION
121  
122 sub _resetPluginsAndServices {
123 913 ▶ my ($self) = @_;
Subroutine _resetPluginsAndServices: called CC=2 SCAR=6.9
124 913 $self->loadedModules( {} );
125 913 $self->_loadedServices( {} );
126 913 $self->_loadedPlugins( {} );
127 913 $self->afterSub( {} );
128 913 $self->aroundSub( {} );
129 913 $self->spRules( {} );
130 913 $self->hook( {} );
131 913 $self->pluginSessionDataToRemember( {} );
132 913 $self->_pluginEntryPoints( [] );
133  
134 # Reinitialize arrays
135 913 foreach ( qw(_macros _groups), @entryPoints ) {
136 8217 $self->{$_} = [];
137 }
138 }
139  
140 sub init {
141 421 ▶ my ( $self, $args ) = @_;
Subroutine init: called CC=11 SCAR=24.4
Pod undocumented
142 421 ▶ $args ||= {};
Condition50%1/2
$args ||= {}
l!l
4210
MC/DC0%0/1
$args ||= {}
$args
Truth table50%1/2
A
A= $args
Aresult
11
00
143 421 my $confAcc = Lemonldap::NG::Common::Conf->new( $args->{configStorage} );
144 421 ▶ unless ($confAcc) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($confAcc) 0 421 421
145 0 die( 'Could not read configuration: '
146 . $Lemonldap::NG::Common::Conf::msg );
147 }
148 421 $self->localConfig( { %{ $confAcc->getLocalConf('portal') }, %$args } );
149  
150 # Load override messages from lemonldap-ng.ini
151 421 foreach my $k ( keys %{ $self->localConfig } ) {
152 10517 ▶ if ( $k =~ /tpl_(.*)/ ) {
Branch: 3 branches
BranchTrueFalseTotal
if ($k =~ /tpl_(.*)/) { } 1 10516 10517
elsif ($k =~ /error_(?:(\w+?)_)?(\d+)$/) { } 1 10515 10516
elsif ($k =~ /msg_(?:([a-z][a-z](?:_[A-Z][A-Z])?)_)?(\w+)$/) { } 1 10514 10515
153 1 $self->customParameters->{$1} = $self->localConfig->{$k};
154 }
155 elsif ( $k =~ /error_(?:(\w+?)_)?(\d+)$/ ) {
156 1 ▶ my $lang = $1 || 'all';
Condition50%1/2
$1 || 'all'
l!l
10
MC/DC0%0/1
$1 || 'all'
$1
Truth table50%1/2
A
A= $1
Aresult
11
00
157 1 $self->trOver->{$lang}->{"PE$2"} = $self->localConfig->{$k};
158 }
159 elsif ( $k =~ /msg_(?:([a-z][a-z](?:_[A-Z][A-Z])?)_)?(\w+)$/ ) {
160 1 ▶ my $lang = $1 || 'all';
Condition50%1/2
$1 || 'all'
l!l
01
MC/DC0%0/1
$1 || 'all'
$1
Truth table50%1/2
A
A= $1
Aresult
11
00
161 1 $self->trOver->{$lang}->{$2} = $self->localConfig->{$k};
162 }
163 else {
164 10514 $self->conf->{$k} = $self->localConfig->{$k};
165 }
166 }
167 421 $self->trOver( JSON::to_json( $self->trOver ) );
168  
169 # Purge loaded module list
170 421 $self->_resetPluginsAndServices;
171  
172 # Insert `reloadConf` in handler reload stack
173 421 Lemonldap::NG::Handler::Main->onReload( $self, 'reloadConf' );
174  
175 # Register logout event (unlog event is only a local unlog: clean cache)
176 &Lemonldap::NG::Handler::Main::MsgActions::addMsgAction(
177 'logout',
178 sub {
179 2 ▶ my ( $class, $id, $req ) = @_;
Subroutine __ANON__: called CC=1 SCAR=0.0
180 2 return $self->eventLogout( $req, $id );
181 }
182 421 );
183  
184 # Handler::PSGI::Try initialization
185 421 ▶ unless ( $self->SUPER::init( $self->localConfig ) ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->SUPER::init($self->localConfig)) 323 98 421
186 323 $self->logger->error( 'Initialization failed: ' . $self->error );
187 323 return 0;
188 }
189 98 ▶ if ( $self->error ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->error) 0 98 98
190 0 $self->logger->error( $self->error );
191 0 return 0;
192 }
193  
194 # Default routes must point to routines declared above
195 98 $self->defaultAuthRoute('');
196 98 $self->defaultUnauthRoute('');
197 98 return 1;
198 }
199  
200 sub setPortalRoutes {
201 492 ▶ my ($self) = @_;
Subroutine setPortalRoutes: called CC=1 SCAR=0.0
Pod undocumented
202 492 $self->authRoutes( {
203 GET => {},
204 POST => {},
205 PUT => {},
206 PATCH => {},
207 DELETE => {},
208 OPTIONS => {}
209 }
210 );
211 492 $self->unAuthRoutes( {
212 GET => {},
213 POST => {},
214 PUT => {},
215 PATCH => {},
216 DELETE => {},
217 OPTIONS => {}
218 }
219 );
220 492 $self
221  
222 # "/" or undeclared paths
223 ->addUnauthRoute( '*' => 'login', ['GET'] )
224 ->addUnauthRoute( '*' => 'postLogin', ['POST'] )
225 ->addAuthRoute( '*' => 'authenticatedRequest', ['GET'] )
226 ->addAuthRoute( '*' => 'postAuthenticatedRequest', ['POST'] )
227  
228 # psgi.js
229 ->addUnauthRoute( 'psgi.js' => 'sendJs', ['GET'] )
230 ->addAuthRoute( 'psgi.js' => 'sendJs', ['GET'] )
231  
232 # portal.css
233 ->addUnauthRoute( 'portal.css' => 'sendCss', ['GET'] )
234 ->addAuthRoute( 'portal.css' => 'sendCss', ['GET'] )
235  
236 # lmerror
237 ->addUnauthRoute( lmerror => { ':code' => 'lmError' }, ['GET'] )
238 ->addAuthRoute( lmerror => { ':code' => 'lmError' }, ['GET'] )
239  
240 # Core REST API
241 ->addUnauthRoute( ping => 'pleaseAuth', ['GET'] )
242 ->addAuthRoute( ping => 'authenticated', ['GET'] )
243  
244 # Refresh session
245 ->addAuthRoute( refresh => 'refresh', ['GET'] )
246  
247 ->addAuthRoute( '*' => 'corsPreflight', ['OPTIONS'] )
248 ->addUnauthRoute( '*' => 'corsPreflight', ['OPTIONS'] )
249  
250 # Logout
251 ->addAuthRoute( logout => 'logout', ['GET'] )
252 ->addUnauthRoute( logout => 'unauthLogout', ['GET'] );
253  
254 # Default routes must point to routines declared above
255 492 $self->defaultAuthRoute('');
256 492 $self->defaultUnauthRoute('');
257 492 return 1;
258  
259 }
260  
261 sub reloadConf {
262 492 ▶ my ( $self, $conf ) = @_;
Subroutine reloadConf: called CC=40 SCAR=38.1
Pod undocumented
263  
264 # Store default portal value in $self->portal
265 492 $self->portal( Lemonldap::NG::Handler::Main->tsv->{portal}->() );
266  
267 # Handle requests (other path may be declared in enabled plugins)
268 492 $self->setPortalRoutes;
269  
270 # Reinitialize $self->conf
271 492 %{ $self->{conf} } = %{ $self->localConfig };
272  
273 # Purge loaded module list
274 492 $self->_resetPluginsAndServices;
275  
276 # Load conf in portal object
277 492 foreach my $key ( keys %$conf ) {
278 203979 ▶ $self->{conf}->{$key} ||= $conf->{$key};
Condition100%3/3
$self->{"conf"}{$key} ||= $conf->{$key}
l!l&&r!l&&!r
1045615880334720
MC/DC100%2/2
$self->{"conf"}{$key} ||= $conf->{$key}
$self->{"conf"}{$key} $conf->{$key}
Truth table100%3/3
A ||= B
A= $self->{"conf"}{$key}B= $conf->{$key}
ABresult
1X1
011
000
279 }
280  
281 # Initialize content-security-policy headers
282 492 my $csp = '';
283 492 foreach (qw(default img src style font connect script)) {
284 3444 my $prm = $self->conf->{ 'csp' . ucfirst($_) };
285 3444 ▶ $csp .= "$_-src $prm;" if ($prm);
Branch: 1 branch
BranchTrueFalseTotal
if $prm 2940 504 3444
286 }
287 492 $self->csp($csp);
288 492 $self->logger->debug( "Initialized CSP headers : " . $self->csp );
289  
290 # Initialize Cross-Origin Resource Sharing headers
291 492 my $cors = '';
292 492 foreach (
293 qw(Allow_Origin Allow_Credentials Allow_Headers Allow_Methods Expose_Headers Max_Age)
294 )
295 {
296 2952 my $header = $_;
297 2952 my $prm = $self->conf->{ 'cors' . $_ };
298 2952 ▶ if ( $header and $prm ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($header and $prm) 2939 13 2952
Condition66%2/3
$header and $prm
!ll&&!rl&&r
0132939
MC/DC50%1/2
$header and $prm
$header $prm
Truth table66%2/3
A and B
A= $headerB= $prm
ABresult
0X0
100
111
299 2939 $header =~ s/_/-/;
300 2939 $prm =~ s/\s+//;
301 2939 $cors .= "Access-Control-$header;$prm;";
302 }
303 }
304 492 $self->cors($cors);
305 492 $self->logger->debug( "Initialized CORS headers : " . $self->cors );
306  
307 492 ▶ $self->{staticPrefix} = $self->conf->{staticPrefix} || '/static';
Condition50%1/2
$self->conf->{'staticPrefix'} || '/static'
l!l
4920
MC/DC0%0/1
$self->conf->{'staticPrefix'} || '/static'
$self->conf->{'staticPrefix'}
Truth table50%1/2
A
A= $self->conf->{'staticPrefix'}
Aresult
11
00
308 492 ▶ $self->{languages} = $self->conf->{languages} || 'en';
Condition100%2/2
$self->conf->{'languages'} || 'en'
l!l
4911
MC/DC100%1/1
$self->conf->{'languages'} || 'en'
$self->conf->{'languages'}
Truth table100%2/2
A
A= $self->conf->{'languages'}
Aresult
11
00
309  
310 # Initialize session DBs
311 492 ▶ unless ( $self->conf->{globalStorage} ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->conf->{"globalStorage"}) 2 490 492
312 2 $self->error(
313 'globalStorage not defined (perhaps configuration can not be read)'
314 );
315 2 return $self->fail;
316 }
317  
318 # Initialize persistent session DB
319 490 ▶ unless ( $self->conf->{persistentStorage} ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->conf->{"persistentStorage"}) 488 2 490
320 488 $self->conf->{persistentStorage} = $self->conf->{globalStorage};
321 $self->conf->{persistentStorageOptions} =
322 488 $self->conf->{globalStorageOptions};
323 }
324  
325 # Initialize cookie SameSite value
326 490 $self->cookieSameSite( getSameSite( $self->conf ) );
327 490 $self->logger->debug(
328 "Cookies will use SameSite=" . $self->cookieSameSite );
329  
330 # Set asset tag from version and optional salt
331 490 ▶ my $cacheTagSalt = $self->conf->{cacheTagSalt} // "";
Condition100%2/2
$self->conf->{"cacheTagSalt"} // ""
l!l
5485
MC/DC100%1/1
$self->conf->{"cacheTagSalt"} // ""
$self->conf->{"cacheTagSalt"}
Truth table100%2/2
A
A= $self->conf->{"cacheTagSalt"}
Aresult
11
00
332 490 ▶ my $key = $self->conf->{key} // "";
Condition50%1/2
$self->conf->{"key"} // ""
l!l
4900
MC/DC0%0/1
$self->conf->{"key"} // ""
$self->conf->{"key"}
Truth table50%1/2
A
A= $self->conf->{"key"}
Aresult
11
00
333 490 my $digest = substr(
334 MIME::Base64::encode_base64url(
335 Digest::SHA::hmac_sha256(
336 $Lemonldap::NG::Portal::VERSION . $cacheTagSalt, $key
337 )
338 ),
339 0, 8
340 );
341 490 $self->cacheTag($digest);
342  
343 # Load menu
344 # ---------
345 490 $self->displayInit;
346  
347 # Load authentication/userDB
348 # --------------------------
349 490 my $mod;
350 490 for my $type (qw(authentication userDB)) {
351 980 ▶ unless ( $self->conf->{$type} ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->conf->{$type}) 0 980 980
352 0 $self->error("$type is not set");
353 0 return $self->fail;
354 }
355 $mod = $self->conf->{$type}
356 980 ▶ unless ( $self->conf->{$type} eq 'Same' );
Branch: 1 branch
BranchTrueFalseTotal
unless $self->conf->{$type} eq "Same" 511 469 980
357 980 my $module = '::' . ucfirst($type) . '::' . $mod;
358 980 $module =~ s/Authentication/Auth/;
359  
360 # Launch and initialize module
361 return $self->fail
362 980 ▶ unless ( $self->{"_$type"} = $self->loadPlugin($module) );
Branch: 1 branch
BranchTrueFalseTotal
unless $$self{"_$type"} = $self->loadPlugin($module) 0 980 980
363 }
364  
365 # Compile macros in _macros, groups in _groups
366 490 foreach my $type (qw(macros groups)) {
367 980 $self->{"_$type"} = {};
368 980 ▶ if ( $self->conf->{$type} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->conf->{$type}) 980 0 980
369 980 for my $name ( sort keys %{ $self->conf->{$type} } ) {
370 my $sub =
371 HANDLER->buildSub(
372 3400 HANDLER->substitute( $self->conf->{$type}->{$name} ) );
373 3400 ▶ if ($sub) {
Branch: 1 branch
BranchTrueFalseTotal
if ($sub) { } 3400 0 3400
374 3400 $self->{"_$type"}->{$name} = $sub;
375 }
376 else {
377 $self->logger->error( "$type $name returns an error: "
378 0 . HANDLER->tsv->{jail}->error );
379 }
380 }
381 }
382 }
383 $self->{_jsRedirect} =
384 HANDLER->buildSub( HANDLER->substitute( $self->conf->{jsRedirect} ) )
385 or $self->logger->error(
386 490 ▶ 'jsRedirect returns an error: ' . HANDLER->tsv->{jail}->error );
Branch: 1 branch
BranchTrueFalseTotal
$self->{"_jsRedirect"} = "Lemonldap::NG::Handler::PSGI::Main"->buildSub("Lemonldap::NG::Handler::PSGI::Main"->substitute($self->conf->{"jsRedirect"})) or $self->logger->error('jsRedirect returns an error: ' . "Lemonldap::NG::Handler::PSGI::Main"->tsv->{"jail"}->error) 0 490 490
387  
388 # Load services
389 490 foreach my $service ( $self->enabledServices ) {
390 1478 ▶ $self->loadService(@$service) or return $self->fail;
Branch: 1 branch
BranchTrueFalseTotal
$self->loadService(@$service) or return $self->fail 321 1157 1478
391 }
392  
393 # Load plugins
394 169 foreach my $plugin ( $self->enabledPlugins ) {
395 925 ▶ $self->loadPlugin($plugin) or return $self->fail;
Branch: 1 branch
BranchTrueFalseTotal
$self->loadPlugin($plugin) or return $self->fail 0 925 925
396 }
397  
398 # Initialize trusted domain regexp
399 169 ▶ if ( $self->conf->{trustedDomains}
Branch: 1 branch
BranchTrueFalseTotal
if ($self->conf->{'trustedDomains'} and $self->conf->{'trustedDomains'} =~ /^\s*\*\s*$/) { } 0 169 169
Condition66%2/3
$self->conf->{"trustedDomains"} and $self->conf->{"trustedDomains"} =~ /^\s*\*\s*$/
!ll&&!rl&&r
16450
MC/DC0%0/2
$self->conf->{"trustedDomains"} and $self->conf->{"trustedDomains"} =~ /^\s*\*\s*$/
$self->conf->{"trustedDomains"} $self->conf->{"trustedDomains"} =~ /^\s*\*\s*$/
Truth table66%2/3
A and B
A= $self->conf->{"trustedDomains"}B= $self->conf->{"trustedDomains"} =~ /^\s*\*\s*$/
ABresult
0X0
100
111
400 and $self->conf->{trustedDomains} =~ /^\s*\*\s*$/ )
401 {
402 0 $self->trustedDomainsRe(qr#^https?://#);
403 }
404 else {
405 169 my $re = Regexp::Assemble->new();
406 169 ▶ if ( my $td = $self->conf->{trustedDomains} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $td = $self->conf->{"trustedDomains"}) 5 164 169
407 5 $td =~ s/^\s*(.*?)\s*/$1/;
408 5 foreach ( split( /\s+/, $td ) ) {
409 9 ▶ next unless ($td);
Branch: 1 branch
BranchTrueFalseTotal
unless $td 0 9 9
410 9 s#^\.#([^/]+\.)?#;
411 9 $self->logger->debug("Domain $_ added in trusted domains");
412 9 s/\./\\./g;
413  
414 # This regexp is valid for the followings hosts:
415 # - $td
416 # - $domainlabel.$td
417 # $domainlabel is build looking RFC2396
418 # (see Regexp::Common::URI::RFC2396)
419 9 $_ =~
420 s/\*\\\./(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9]\\.)*/g;
421 9 $re->add("$_");
422 }
423 }
424 169 my $default_portal = HANDLER->tsv->{portal}->();
425 169 foreach ( @{ $self->{additionalTrustedDomains} }, $default_portal ) {
426 198 my $p = $_;
427 198 $p =~ s#https?://([^/]*).*$#$1#;
428 198 $re->add( quotemeta($p) );
429 }
430  
431 169 foreach my $vhost ( sort keys %{ $self->conf->{locationRules} } ) {
432 1168 my $expr = quotemeta($vhost);
433  
434 # Handle wildcards
435 1168 ▶ if ( $vhost =~ /[\%\*]/ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($vhost =~ /[\%\*]/) 332 836 1168
436 332 $expr =~ s/\\\*/[A-Za-z0-9\-\.]\*/;
437 332 $expr =~ s/\\\%/[A-Za-z0-9\-]\*/;
438 }
439 1168 $re->add($expr);
440 1168 $self->logger->debug("Vhost $vhost added in trusted domains");
441 1168 ▶ $self->conf->{vhostOptions} ||= {};
Condition50%1/2
$self->conf->{"vhostOptions"} ||= {}
l!l
11680
MC/DC0%0/1
$self->conf->{"vhostOptions"} ||= {}
$self->conf->{"vhostOptions"}
Truth table50%1/2
A
A= $self->conf->{"vhostOptions"}
Aresult
11
00
442 1168 ▶ if ( my $tmp =
Branch: 1 branch
BranchTrueFalseTotal
if (my $tmp = $self->conf->{"vhostOptions"}{$vhost}{"vhostAliases"}) 0 1168 1168
443 $self->conf->{vhostOptions}->{$vhost}->{vhostAliases} )
444 {
445 0 foreach my $alias ( split /\s+/, $tmp ) {
446 0 $self->logger->debug(
447 "Alias $alias added in trusted domains");
448 0 $re->add( quotemeta($alias) );
449 }
450 }
451 }
452  
453 169 my $tmp = '^https?://' . $re->as_string . '(?::\d+)?(?:/|$)';
454 169 $self->trustedDomainsRe(qr/$tmp/);
455  
456 }
457  
458 # Clean $req->pdata after authentication
459 169 push @{ $self->endAuth }, "cleanPdata";
460  
461 # Failsafe: allow handler access to portal in case it's missing in conf
462 169 my $default_portal_uri = URI->new( HANDLER->tsv->{portal}->() );
463 169 my $default_portal_host = eval { $default_portal_uri->host };
464 169 ▶ if ($default_portal_host) {
Branch: 1 branch
BranchTrueFalseTotal
if ($default_portal_host) 169 0 169
465 169 ▶ HANDLER->tsv->{defaultCondition}->{$default_portal_host} ||= sub { 1 };
Subroutine __ANON__: not called CC=1 SCAR=0.6
Condition66%2/3
"Lemonldap::NG::Handler::PSGI::Main"->tsv->{"defaultCondition"}{$default_portal_host} ||= sub {
l!l&&r!l&&!r
88810
MC/DC0%0/2
"Lemonldap::NG::Handler::PSGI::Main"->tsv->{"defaultCondition"}{$default_portal_host} ||= sub { 1; }
"Lemonldap::NG::Handler::PSGI::Main"->tsv->{"defaultCondition"}{$default_portal_host} sub { 1; }
Truth table66%2/3
A ||= B
A= "Lemonldap::NG::Handler::PSGI::Main"->tsv->{"defaultCondition"}{$default_portal_host}B= sub { 1; }
ABresult
1X1
011
000
466 }
467  
468 169 1;
469 }
470  
471 # Method used to load plugins
472  
473 sub loadService {
474 1478 ▶ my ( $self, $name, $plugin ) = @_;
Subroutine loadService: called CC=1 SCAR=0.0
Pod undocumented
475 1478 $self->logger->debug("Loading service $name from $plugin");
476 1478 return $self->_loadedServices->{$name} = $self->loadPlugin($plugin);
477 }
478  
479 sub getService {
480 34 ▶ my ( $self, $name ) = @_;
Subroutine getService: called CC=1 SCAR=0.0
Pod undocumented
481 34 return $_[0]->_loadedServices->{$name};
482 }
483  
484 sub loadPlugin {
485 3383 ▶ my ( $self, $plugin ) = @_;
Subroutine loadPlugin: called CC=7 SCAR=19.6
Pod undocumented
486 3383 ▶ unless ($plugin) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($plugin) 0 3383 3383
487 0 require Carp;
488 0 Carp::confess('Calling loadPugin without arg!');
489 }
490  
491 3383 ▶ my $full_name =
Branch: 1 branch
BranchTrueFalseTotal
$plugin =~ /^::/ ? : 3374 9 3383
492 ( $plugin =~ /^::/ ) ? "Lemonldap::NG::Portal$plugin" : $plugin;
493 3383 ▶ if (
Branch: 1 branch
BranchTrueFalseTotal
if (grep {my $item_full_name = $_ =~ /^::/ ? "Lemonldap::NG::Portal$_" : $_; $item_full_name eq $full_name;} split(/[\s,]+/, $self->conf->{"disabledPlugins"} // "", 0)) 2 3381 3383
494 grep {
495 25 ▶ my $item_full_name =
Branch: 1 branch
BranchTrueFalseTotal
$_ =~ /^::/ ? : 10 15 25
496 ( $_ =~ /^::/ ) ? "Lemonldap::NG::Portal$_" : $_;
497 25 ▶ $item_full_name eq $full_name
Condition100%2/2
$self->conf->{"disabledPlugins"} // ""
l!l
253358
MC/DC100%1/1
$self->conf->{"disabledPlugins"} // ""
$self->conf->{"disabledPlugins"}
Truth table100%2/2
A
A= $self->conf->{"disabledPlugins"}
Aresult
11
00
498 } split( /[\s,]+/, $self->conf->{disabledPlugins} // "" )
499 )
500 {
501 2 $self->logger->debug(
502 "Module $plugin is disallowed by disabledPlugins and was not loaded"
503 );
504 2 return 1;
505 }
506  
507 3381 ▶ return 0 unless ( my $obj = $self->loadModule($plugin) );
Branch: 1 branch
BranchTrueFalseTotal
unless my $obj = $self->loadModule($plugin) 321 3060 3381
508 3060 return $self->findEP( $plugin, $obj );
509 }
510  
511 # Insert declared entry points into corresponding arrays
512 sub findEP {
513 3182 ▶ my ( $self, $plugin, $obj ) = @_;
Subroutine findEP: called CC=37 SCAR=51.7
Pod undocumented
514  
515 3182 ▶ my $module = $plugin =~ /^::/ ? "Lemonldap::NG::Portal$plugin" : $plugin;
Branch: 1 branch
BranchTrueFalseTotal
$plugin =~ /^::/ ? : 3173 9 3182
516  
517 # Register the plugin's instance so that callbacks can be refered by a
518 # serializable string
519 # DEPRECATED: is_only=0 should no longer be supported after LLNG 3.
520 # Corresponding code paths must be removed
521 3182 my $is_only = 1;
522 3182 ▶ if ( $self->_loadedPlugins->{$module} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->_loadedPlugins->{$module}) { } 71 3111 3182
523 71 $self->logger->debug( "Plugin $module has already been loaded once." );
524 71 $is_only = 0;
525 }
526 else {
527 3111 $self->_loadedPlugins->{$module} = $obj;
528 }
529  
530 # Standards entry points
531 3182 foreach my $sub (@entryPoints) {
532 22274 ▶ if ( $obj->can($sub) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($obj->can($sub)) 1032 21242 22274
533 1032 $self->logger->debug(" Found $sub entry point in $module");
534 1032 ▶ if ( my $callback = $obj->$sub ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $callback = $obj->$sub) 1032 0 1032
535  
536 1032 ▶ if ($is_only) {
Branch: 1 branch
BranchTrueFalseTotal
if ($is_only) { } 996 36 1032
537 996 push @{ $self->{$sub} }, "${module}::${callback}";
538 }
539 else {
540 36 push @{ $self->{$sub} }, sub {
541 2 ▶ eval {
Subroutine __ANON__: called CC=1 SCAR=0.0
542 2 $obj->logger->debug(
543 "Launching ${module}::$callback");
544 };
545 2 $obj->$callback(@_);
546 36 };
547 }
548 1032 $self->logger->debug(" -> $callback");
549 }
550 }
551 }
552 3182 ▶ if ( $obj->can('afterSub') ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($obj->can("afterSub")) 2 3180 3182
553 2 $self->logger->debug("Found afterSub in $module");
554 2 my $h = $obj->afterSub;
555 2 ▶ unless ( ref $h and ref($h) eq 'HASH' ) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $h and ref $h eq 'HASH') { } 2 0 2
Condition33%1/3
ref $h and ref $h eq "HASH"
!ll&&!rl&&r
002
MC/DC0%0/2
ref $h and ref $h eq "HASH"
ref $h ref $h eq "HASH"
Truth table33%1/3
A and B
A= ref $hB= ref $h eq "HASH"
ABresult
0X0
100
111
556 0 $self->logger->error(
557 '"afterSub" endpoint must be a hashref, skipped');
558 }
559 else {
560 2 foreach my $ep ( keys %$h ) {
561 2 my $callback = $h->{$ep};
562 2 ▶ if ($is_only) {
Branch: 1 branch
BranchTrueFalseTotal
if ($is_only) { } 2 0 2
563 2 push @{ $self->afterSub->{$ep} }, "${module}::${callback}";
564 }
565 else {
566 0 push @{ $self->afterSub->{$ep} }, sub {
567 0 ▶ eval {
Subroutine __ANON__: not called CC=1 SCAR=6.9
568 0 $obj->logger->debug(
569 "Launching ${module}::$callback afterSub $ep");
570 };
571 0 $obj->$callback(@_);
572 0 };
573 }
574 }
575 }
576 }
577 3182 ▶ if ( $obj->can('aroundSub') ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($obj->can("aroundSub")) 0 3182 3182
578 0 $self->logger->debug("Found aroundSub in $module");
579 0 my $h = $obj->aroundSub;
580 0 ▶ unless ( ref $h and ref($h) eq 'HASH' ) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $h and ref $h eq 'HASH') { } 0 0 0
Condition0%0/3
ref $h and ref $h eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $h and ref $h eq "HASH"
ref $h ref $h eq "HASH"
Truth table0%0/3
A and B
A= ref $hB= ref $h eq "HASH"
ABresult
0X0
100
111
581 0 $self->logger->error(
582 '"aroundSub" endpoint must be a hashref, skipped');
583 }
584 else {
585 0 foreach my $ep ( keys %$h ) {
586 0 my $callback = $h->{$ep};
587 my $previousSub = $self->aroundSub->{$ep} ||= sub {
588 0 ▶ $self->logger->debug(
Subroutine __ANON__: not called CC=1 SCAR=6.9
589 "$ep launched inside ${module}::$callback");
590 0 $self->$ep(@_);
591 0 ▶ };
Condition0%0/3
$self->aroundSub->{$ep} ||= sub {
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->aroundSub->{$ep} ||= sub { $self->logger->debug("$ep launched inside ${module}::$callback"); $self->$ep(@_); }
$self->aroundSub->{$ep} sub { $self->logger->debug("$ep launched inside ${module}::$callback"); $self->$ep(@_); }
Truth table0%0/3
A ||= B
A= $self->aroundSub->{$ep}B= sub { $self->logger->debug("$ep launched inside ${module}::$callback"); $self->$ep(@_); }
ABresult
1X1
011
000
592 $self->aroundSub->{$ep} = sub {
593 0 ▶ $self->logger->debug(
Subroutine __ANON__: not called CC=1 SCAR=6.9
594 "Launching ${module}::$callback instead of $ep");
595 0 $obj->$callback( $previousSub, @_ );
596 0 };
597 }
598 }
599 }
600 3182 ▶ if ( $obj->can('hook') ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($obj->can("hook")) 221 2961 3182
601 221 $self->logger->debug("Found hook in $module");
602 221 my $h = $obj->hook;
603 221 ▶ unless ( ref $h and ref($h) eq 'HASH' ) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $h and ref $h eq 'HASH') { } 221 0 221
Condition33%1/3
ref $h and ref $h eq "HASH"
!ll&&!rl&&r
00221
MC/DC0%0/2
ref $h and ref $h eq "HASH"
ref $h ref $h eq "HASH"
Truth table33%1/3
A and B
A= ref $hB= ref $h eq "HASH"
ABresult
0X0
100
111
604 0 $self->logger->error('"hook" endpoint must be a hashref, skipped');
605 }
606 else {
607 221 foreach my $hookname ( keys %$h ) {
608 318 my $callback = $h->{$hookname};
609 318 push @{ $self->hook->{$hookname} }, sub {
610 3 ▶ eval {
Subroutine __ANON__: called CC=1 SCAR=0.0
611 3 $obj->logger->debug(
612 "Launching ${module}::$callback on hook $hookname");
613 };
614 3 $obj->$callback(@_);
615 318 };
616 }
617 }
618 }
619  
620 # Rules for menu
621 3182 ▶ if ( $obj->can('spRules') ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($obj->can("spRules")) 128 3054 3182
622 128 foreach my $k ( keys %{ $obj->spRules } ) {
623 $self->logger->info(
624 "$k is defined more than one time, it can have some bad effects on Menu display"
625 56 ▶ ) if ( $self->spRules->{$k} );
Branch: 1 branch
BranchTrueFalseTotal
if $self->spRules->{$k} 0 56 56
626 56 $self->spRules->{$k} = $obj->spRules->{$k};
627 }
628 }
629  
630 # Plugin entrypoints
631 3182 for my $ep ( @{ $self->_pluginEntryPoints } ) {
632 5750 ▶ if ( ( $ep->{can} and $obj->can( $ep->{can} ) )
Branch: 1 branch
BranchTrueFalseTotal
if ($ep->{"can"} and $obj->can($ep->{"can"}) or $ep->{"isa"} and $obj->isa($ep->{"isa"}) or $ep->{"does"} and $obj->does($ep->{"does"})) 0 5750 5750
Condition46%7/15
$ep->{"can"} and $obj->can($ep->{"can"}) or $ep->{"isa"} and $obj->isa($ep->{"isa"}) or $ep->{"does"} and $obj->does($ep->{"does"})
l!l&&r!l&&!r
005750
$ep->{"can"} and $obj->can($ep->{"can"}) or $ep->{"isa"} and $obj->isa($ep->{"isa"})
l!l&&r!l&&!r
005750
$ep->{"can"} and $obj->can($ep->{"can"})
!ll&&!rl&&r
575000
$ep->{"isa"} and $obj->isa($ep->{"isa"})
!ll&&!rl&&r
159041600
$ep->{"does"} and $obj->does($ep->{"does"})
!ll&&!rl&&r
416015900
MC/DC0%0/6
$ep->{"can"} and $obj->can($ep->{"can"}) or $ep->{"isa"} and $obj->isa($ep->{"isa"}) or $ep->{"does"} and $obj->does($ep->{"does"})
$ep->{"can"} $obj->can($ep->{"can"}) $ep->{"isa"} $obj->isa($ep->{"isa"}) $ep->{"does"} $obj->does($ep->{"does"})
Truth table6%1/15
A and B or C and D or E and F
A= $ep->{"can"}B= $obj->can($ep->{"can"})C= $ep->{"isa"}D= $obj->isa($ep->{"isa"})E= $ep->{"does"}F= $obj->does($ep->{"does"})
ABCDEFresult
11XXXX1
0X11XX1
1011XX1
0X0X111
0X10111
100X111
1010111
0X0X0X0
0X0X100
0X100X0
0X10100
100X0X0
100X100
10100X0
1010100
633 or ( $ep->{isa} and $obj->isa( $ep->{isa} ) )
634 or ( $ep->{does} and $obj->does( $ep->{does} ) ) )
635 {
636 0 ▶ my @args = @{ $ep->{args} || [] };
Branch: 1 branch
BranchTrueFalseTotal
$ep->{"args"} or [] 0 0 0
637 0 ▶ if ( my $callback = $ep->{callback} ) {
Branch: 2 branches
BranchTrueFalseTotal
if (my $callback = $ep->{'callback'}) { } 0 0 0
elsif ($ep->{'service'} and $ep->{'method'}) { } 0 0 0
638 0 $self->logger->debug(
639 "Invoking callback registered by $ep->{_pkg}");
640 0 $callback->( $obj, @args );
641 }
642 ▶ elsif ( $ep->{service} && $ep->{method} ) {
Condition0%0/3
$ep->{"service"} and $ep->{"method"}
!ll&&!rl&&r
000
MC/DC0%0/2
$ep->{"service"} and $ep->{"method"}
$ep->{"service"} $ep->{"method"}
Truth table0%0/3
A and B
A= $ep->{"service"}B= $ep->{"method"}
ABresult
0X0
100
111
643 0 my $service = $self->getService( $ep->{service} );
644 0 ▶ if ($service) {
Branch: 1 branch
BranchTrueFalseTotal
if ($service) { } 0 0 0
645 0 ▶ if ( my $method = $service->can( $ep->{method} ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $method = $service->can($ep->{'method'})) { } 0 0 0
646 0 $self->logger->debug(
647 "Invoking $ep->{method} on $ep->{service}"
648 . " on behalf of $ep->{_pkg}" );
649 0 $service->$method( $obj, @args );
650 }
651 else {
652 0 $self->logger->warn(
653 "Service $ep->{service} has no $ep->{method} method"
654 . " in entrypoint added by $ep->{_pkg}" );
655 }
656 }
657 else {
658 0 $self->logger->warn(
659 "Could not find service $ep->{service}"
660 . " in entrypoint added by $ep->{_pkg}" );
661 }
662 }
663 }
664 }
665  
666 3182 $self->logger->debug("Plugin $module initialized");
667  
668 3182 return $obj;
669 }
670  
671 sub loadModule {
672 4287 ▶ my ( $self, $module, $conf, %args ) = @_;
Subroutine loadModule: called CC=9 SCAR=23.8
Pod undocumented
673 4287 ▶ $conf //= $self->conf;
Condition66%2/3
$conf //= $self->conf
l!l&&r!l&&!r
26040270
MC/DC0%0/2
$conf //= $self->conf
$conf $self->conf
Truth table66%2/3
A //= B
A= $confB= $self->conf
ABresult
1X1
011
000
674 4287 my $obj;
675 4287 ▶ $module = "Lemonldap::NG::Portal$module" if ( $module =~ /^::/ );
Branch: 1 branch
BranchTrueFalseTotal
if $module =~ /^::/ 4245 42 4287
676  
677 # If module is not already in namespace, try to load it
678 4287 ▶ unless ( $module->can('new') ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($module->can("new")) 2389 1898 4287
679 2389 eval "require $module";
680 2389 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 321 2068 2389
681 321 $self->logger->error("$module load error: $@");
682 321 $self->error("$module load error: $@");
683 321 return 0;
684 }
685 }
686 3966 eval {
687 3966 $obj = $module->new( { p => $self, conf => $conf, %args } );
688 3966 $self->logger->debug("Module $module loaded");
689 };
690 3966 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 3966 3966
691 0 $self->logger->error("Unable to build $module object: $@");
692 0 return 0;
693 }
694 3966 ▶ unless ($obj) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($obj) 0 3966 3966
695 0 $self->logger->error("$module new() method returned undef");
696 0 return 0;
697 }
698 3966 ▶ if ( $obj->can("init") and ( !$obj->init ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($obj->can("init") and not $obj->init) 0 3966 3966
Condition66%2/3
$obj->can("init") and not $obj->init
!ll&&!rl&&r
34836180
MC/DC0%0/2
$obj->can("init") and not $obj->init
$obj->can("init") not $obj->init
Truth table66%2/3
A and not(B)
A= $obj->can("init")B= not $obj->init
ABresult
0X0
100
111
699 0 $self->logger->error("$module init failed");
700 0 $self->error("$module init failed");
701 0 return 0;
702 }
703  
704 3966 $self->loadedModules->{$module} = $obj;
705 3966 return $obj;
706 }
707  
708 sub fail {
709 323 ▶ $_[0]->logger->error( $_[0]->error );
Subroutine fail: called CC=1 SCAR=0.0
Pod undocumented
710 323 $_[0]->addUnauthRoute( '*' => 'displayError' );
711 323 $_[0]->addAuthRoute( '*' => 'displayError' );
712 323 return 0;
713 }
714  
715 sub displayError {
716 1925 ▶ my ( $self, $req ) = @_;
Subroutine displayError: called CC=1 SCAR=0.0
Pod undocumented
717 1925 return $self->sendError( $req,
718 'Portal error, contact your administrator', 500 );
719 }
720  
721 # This helper method builds a rule from a string expression
722 # - $rule: rule text
723 # - $ruleDesc optional hint of what the rule is for, to display in error message
724 # returns undef if the rule syntax was invalid
725 sub buildRule {
726 2481 ▶ my ( $self, $rule, $ruleDesc ) = @_;
Subroutine buildRule: called CC=5 SCAR=16.2
Pod undocumented
727 2481 ▶ $ruleDesc ||= '';
Condition100%2/2
$ruleDesc ||= ""
l!l
239190
MC/DC100%1/1
$ruleDesc ||= ""
$ruleDesc
Truth table100%2/2
A
A= $ruleDesc
Aresult
11
00
728 2481 my $compiledRule =
729 $self->HANDLER->buildSub( $self->HANDLER->substitute($rule) );
730 2481 ▶ unless ($compiledRule) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($compiledRule) 1 2480 2481
731 my $error =
732 1 ▶ $self->HANDLER->tsv->{jail}->error || 'Unable to compile rule';
Condition50%1/2
$self->HANDLER->tsv->{'jail'}->error || 'Unable to compile rule'
l!l
10
MC/DC0%0/1
$self->HANDLER->tsv->{'jail'}->error || 'Unable to compile rule'
$self->HANDLER->tsv->{'jail'}->error
Truth table50%1/2
A
A= $self->HANDLER->tsv->{'jail'}->error
Aresult
11
00
733 1 $self->logger->error("Bad $ruleDesc rule: $error");
734 1 return undef;
735 }
736  
737 # Avoid deep recursion
738 2480 my $overLoadedRule = $compiledRule;
739 2480 ▶ if ( $self->conf->{logParams} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->conf->{"logParams"}) 6 2474 2480
740 $overLoadedRule = sub {
741 0 ▶ $self->_dump($_[0]);
Subroutine __ANON__: not called CC=1 SCAR=6.9
742 0 return $compiledRule->(@_);
743 6 };
744 }
745 2480 return $overLoadedRule;
746 }
747  
748 sub addPasswordPolicyDisplay {
749 1183 ▶ my ( $self, $id, $options ) = @_;
Subroutine addPasswordPolicyDisplay: called CC=1 SCAR=0.0
Pod undocumented
750 1183 $self->_ppRules->{$id} = {%$options};
751 }
752  
753 sub _addPluginEntryPoint {
754 1470 ▶ my ( $self, %entryPointDescription ) = @_;
Subroutine _addPluginEntryPoint: called CC=1 SCAR=0.0
755 1470 push @{ $self->_pluginEntryPoints },
756 { _pkg => "[unknown]", %entryPointDescription };
757 }
758  
759 429 1;
« blib/lib/Lemonldap/NG/Portal/Plugins/CDA.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/UserDB/Demo.pm »