Code refactoring (#2749)

This commit is contained in:
Christophe Maudoux 2022-06-18 17:54:07 +02:00
parent cc3f433136
commit 2f1d2a5e3b
11 changed files with 50 additions and 120 deletions

View File

@ -17,7 +17,7 @@ sub defaultValues {
}, },
'authChoiceParam' => 'lmAuth', 'authChoiceParam' => 'lmAuth',
'authentication' => 'Demo', 'authentication' => 'Demo',
'available2F' => 'available2F' =>
'UTOTP,TOTP,U2F,REST,Mail2F,Ext2F,WebAuthn,Yubikey,Radius', 'UTOTP,TOTP,U2F,REST,Mail2F,Ext2F,WebAuthn,Yubikey,Radius',
'available2FSelfRegistration' => 'TOTP,U2F,WebAuthn,Yubikey', 'available2FSelfRegistration' => 'TOTP,U2F,WebAuthn,Yubikey',
'bruteForceProtectionLockTimes' => '15, 30, 60, 300, 600', 'bruteForceProtectionLockTimes' => '15, 30, 60, 300, 600',
@ -102,7 +102,7 @@ sub defaultValues {
'globalLogoutTimer' => 1, 'globalLogoutTimer' => 1,
'globalStorage' => 'Apache::Session::File', 'globalStorage' => 'Apache::Session::File',
'globalStorageOptions' => { 'globalStorageOptions' => {
'Directory' => '/var/lib/lemonldap-ng/sessions/', 'Directory' => '/var/lib/lemonldap-ng/sessions/',
'generateModule' => 'generateModule' =>
'Lemonldap::NG::Common::Apache::Session::Generate::SHA256', 'Lemonldap::NG::Common::Apache::Session::Generate::SHA256',
'LockDirectory' => '/var/lib/lemonldap-ng/sessions/lock/' 'LockDirectory' => '/var/lib/lemonldap-ng/sessions/lock/'
@ -175,20 +175,20 @@ sub defaultValues {
'locationRules' => { 'locationRules' => {
'default' => 'deny' 'default' => 'deny'
}, },
'logoutServices' => {}, 'logoutServices' => {},
'macros' => {}, 'macros' => {},
'mail2fActivation' => 0, 'mail2fActivation' => 0,
'mail2fCodeRegex' => '\\d{6}', 'mail2fCodeRegex' => '\\d{6}',
'mailCharset' => 'utf-8', 'mailCharset' => 'utf-8',
'mailFrom' => 'noreply@example.com', 'mailFrom' => 'noreply@example.com',
'mailSessionKey' => 'mail', 'mailSessionKey' => 'mail',
'mailTimeout' => 0, 'mailTimeout' => 0,
'mailUrl' => 'http://auth.example.com/resetpwd', 'mailUrl' => 'http://auth.example.com/resetpwd',
'managerDn' => '', 'managerDn' => '',
'managerPassword' => '', 'managerPassword' => '',
'max2FDevices' => 10, 'max2FDevices' => 10,
'max2FDevicesNameLength' => 20, 'max2FDevicesNameLength' => 20,
'multiValuesSeparator' => '; ', 'multiValuesSeparator' => '; ',
'mySessionAuthorizedRWKeys' => 'mySessionAuthorizedRWKeys' =>
[ '_appsListOrder', '_oidcConnectedRP', '_oidcConsents' ], [ '_appsListOrder', '_oidcConnectedRP', '_oidcConsents' ],
'newLocationWarningLocationAttribute' => 'ipAddr', 'newLocationWarningLocationAttribute' => 'ipAddr',
@ -196,7 +196,7 @@ sub defaultValues {
'newLocationWarningMaxValues' => '0', 'newLocationWarningMaxValues' => '0',
'notificationDefaultCond' => '', 'notificationDefaultCond' => '',
'notificationServerPOST' => 1, 'notificationServerPOST' => 1,
'notificationServerSentAttributes' => 'notificationServerSentAttributes' =>
'uid reference date title subtitle text check', 'uid reference date title subtitle text check',
'notificationsMaxRetrieve' => 3, 'notificationsMaxRetrieve' => 3,
'notificationStorage' => 'File', 'notificationStorage' => 'File',
@ -250,7 +250,7 @@ sub defaultValues {
'passwordPolicyMinUpper' => 0, 'passwordPolicyMinUpper' => 0,
'passwordPolicySpecialChar' => '__ALL__', 'passwordPolicySpecialChar' => '__ALL__',
'passwordResetAllowedRetries' => 3, 'passwordResetAllowedRetries' => 3,
'persistentSessionAttributes' => 'persistentSessionAttributes' =>
'_loginHistory _2fDevices notification_', '_loginHistory _2fDevices notification_',
'port' => -1, 'port' => -1,
'portal' => 'http://auth.example.com/', 'portal' => 'http://auth.example.com/',
@ -261,7 +261,7 @@ sub defaultValues {
'portalDisplayGeneratePassword' => 1, 'portalDisplayGeneratePassword' => 1,
'portalDisplayLoginHistory' => 1, 'portalDisplayLoginHistory' => 1,
'portalDisplayLogout' => 1, 'portalDisplayLogout' => 1,
'portalDisplayOidcConsents' => 'portalDisplayOidcConsents' =>
'$_oidcConsents && $_oidcConsents =~ /\\w+/', '$_oidcConsents && $_oidcConsents =~ /\\w+/',
'portalDisplayRefreshMyRights' => 1, 'portalDisplayRefreshMyRights' => 1,
'portalDisplayRegister' => 1, 'portalDisplayRegister' => 1,
@ -290,11 +290,11 @@ sub defaultValues {
'http://auth.example.com/Lemonldap/NG/Common/PSGI/SOAPService', 'http://auth.example.com/Lemonldap/NG/Common/PSGI/SOAPService',
'proxy' => 'http://auth.example.com/sessions' 'proxy' => 'http://auth.example.com/sessions'
}, },
'requireToken' => 1, 'requireToken' => 1,
'rest2fActivation' => 0, 'rest2fActivation' => 0,
'restAuthnLevel' => 2, 'restAuthnLevel' => 2,
'restClockTolerance' => 15, 'restClockTolerance' => 15,
'sameSite' => '', 'sameSite' => '',
'samlAttributeAuthorityDescriptorAttributeServiceSOAP' => 'samlAttributeAuthorityDescriptorAttributeServiceSOAP' =>
'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;#PORTAL#/saml/AA/SOAP;', 'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;#PORTAL#/saml/AA/SOAP;',
'samlAuthnContextMapKerberos' => 4, 'samlAuthnContextMapKerberos' => 4,
@ -334,7 +334,7 @@ sub defaultValues {
'0;1;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact;#PORTAL#/saml/proxySingleSignOnArtifact', '0;1;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact;#PORTAL#/saml/proxySingleSignOnArtifact',
'samlSPSSODescriptorAssertionConsumerServiceHTTPPost' => 'samlSPSSODescriptorAssertionConsumerServiceHTTPPost' =>
'1;0;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/proxySingleSignOnPost', '1;0;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/proxySingleSignOnPost',
'samlSPSSODescriptorAuthnRequestsSigned' => 1, 'samlSPSSODescriptorAuthnRequestsSigned' => 1,
'samlSPSSODescriptorSingleLogoutServiceHTTPPost' => 'samlSPSSODescriptorSingleLogoutServiceHTTPPost' =>
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/proxySingleLogout;#PORTAL#/saml/proxySingleLogoutReturn', 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/proxySingleLogout;#PORTAL#/saml/proxySingleLogoutReturn',
'samlSPSSODescriptorSingleLogoutServiceHTTPRedirect' => 'samlSPSSODescriptorSingleLogoutServiceHTTPRedirect' =>
@ -347,7 +347,7 @@ sub defaultValues {
'sfEngine' => '::2F::Engines::Default', 'sfEngine' => '::2F::Engines::Default',
'sfManagerRule' => 1, 'sfManagerRule' => 1,
'sfRemovedMsgRule' => 0, 'sfRemovedMsgRule' => 0,
'sfRemovedNotifMsg' => 'sfRemovedNotifMsg' =>
'_removedSF_ expired second factor(s) has/have been removed (_nameSF_)!', '_removedSF_ expired second factor(s) has/have been removed (_nameSF_)!',
'sfRemovedNotifRef' => 'RemoveSF', 'sfRemovedNotifRef' => 'RemoveSF',
'sfRemovedNotifTitle' => 'Second factor notification', 'sfRemovedNotifTitle' => 'Second factor notification',

View File

@ -67,7 +67,7 @@ sub types {
'hostname' => { 'hostname' => {
'form' => 'text', 'form' => 'text',
'msgFail' => '__badHostname__', 'msgFail' => '__badHostname__',
'test' => 'test' =>
qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)))?$/ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)))?$/
}, },
'int' => { 'int' => {
@ -257,7 +257,7 @@ m[^(?:(?:\-+\s*BEGIN\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\
'url' => { 'url' => {
'form' => 'text', 'form' => 'text',
'msgFail' => '__badUrl__', 'msgFail' => '__badUrl__',
'test' => 'test' =>
qr/(?:^$|(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)))(?::(?:(?:[0-9]*)))?(?:\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*)(?:\/(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*))*))(?:[?](?:(?:(?:[;\/?:@&=+\$,a-zA-Z0-9\-_.!~*'()]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)))?))?))/ qr/(?:^$|(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)))(?::(?:(?:[0-9]*)))?(?:\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*)(?:\/(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*))*))(?:[?](?:(?:(?:[;\/?:@&=+\$,a-zA-Z0-9\-_.!~*'()]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)))?))?))/
} }
}; };
@ -812,7 +812,7 @@ sub attributes {
}, },
'casSrvMetaDataOptionsUrl' => { 'casSrvMetaDataOptionsUrl' => {
'msgFail' => '__badUrl__', 'msgFail' => '__badUrl__',
'test' => 'test' =>
qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)))(?::(?:(?:[0-9]*)))?(?:\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*)(?:\/(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*))*))(?:[?](?:(?:(?:[;\/?:@&=+\$,a-zA-Z0-9\-_.!~*'()]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)))?))?)/, qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)))(?::(?:(?:[0-9]*)))?(?:\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*)(?:\/(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*))*))(?:[?](?:(?:(?:[;\/?:@&=+\$,a-zA-Z0-9\-_.!~*'()]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)))?))?)/,
'type' => 'text' 'type' => 'text'
}, },
@ -1351,7 +1351,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
'domain' => { 'domain' => {
'default' => 'example.com', 'default' => 'example.com',
'msgFail' => '__badDomainName__', 'msgFail' => '__badDomainName__',
'test' => 'test' =>
qr/^(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?))?$/, qr/^(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?))?$/,
'type' => 'text' 'type' => 'text'
}, },
@ -1494,7 +1494,7 @@ qr/^(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-
}, },
'globalStorageOptions' => { 'globalStorageOptions' => {
'default' => { 'default' => {
'Directory' => '/var/lib/lemonldap-ng/sessions/', 'Directory' => '/var/lib/lemonldap-ng/sessions/',
'generateModule' => 'generateModule' =>
'Lemonldap::NG::Common::Apache::Session::Generate::SHA256', 'Lemonldap::NG::Common::Apache::Session::Generate::SHA256',
'LockDirectory' => '/var/lib/lemonldap-ng/sessions/lock/' 'LockDirectory' => '/var/lib/lemonldap-ng/sessions/lock/'
@ -1619,7 +1619,7 @@ qr/^(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-
'issuerDBGetParameters' => { 'issuerDBGetParameters' => {
'default' => {}, 'default' => {},
'keyMsgFail' => '__badHostname__', 'keyMsgFail' => '__badHostname__',
'keyTest' => 'keyTest' =>
qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)$/, qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)$/,
'test' => { 'test' => {
'keyMsgFail' => '__badKeyName__', 'keyMsgFail' => '__badKeyName__',
@ -2822,7 +2822,7 @@ m[^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?:
'pdataDomain' => { 'pdataDomain' => {
'default' => '', 'default' => '',
'msgFail' => '__badDomainName__', 'msgFail' => '__badDomainName__',
'test' => 'test' =>
qr/^(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?))?$/, qr/^(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?))?$/,
'type' => 'text' 'type' => 'text'
}, },
@ -2843,7 +2843,7 @@ qr/^(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-
'portal' => { 'portal' => {
'default' => 'http://auth.example.com/', 'default' => 'http://auth.example.com/',
'msgFail' => '__badUrl__', 'msgFail' => '__badUrl__',
'test' => 'test' =>
qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)))(?::(?:(?:[0-9]*)))?(?:\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*)(?:\/(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*))*))(?:[?](?:(?:(?:[;\/?:@&=+\$,a-zA-Z0-9\-_.!~*'()]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)))?))?)/, qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-z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:[;\/?:@&=+\$,a-zA-Z0-9\-_.!~*'()]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)))?))?)/,
'type' => 'keyTextContainer' 'type' => 'keyTextContainer'
}, },
@ -3306,19 +3306,19 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
}, },
'samlCommonDomainCookieDomain' => { 'samlCommonDomainCookieDomain' => {
'msgFail' => '__badDomainName__', 'msgFail' => '__badDomainName__',
'test' => 'test' =>
qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)$/, qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)$/,
'type' => 'text' 'type' => 'text'
}, },
'samlCommonDomainCookieReader' => { 'samlCommonDomainCookieReader' => {
'msgFail' => '__badUrl__', 'msgFail' => '__badUrl__',
'test' => 'test' =>
qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)))(?::(?:(?:[0-9]*)))?(?:\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*)(?:\/(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*))*))(?:[?](?:(?:(?:[;\/?:@&=+\$,a-zA-Z0-9\-_.!~*'()]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)))?))?)/, qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)))(?::(?:(?:[0-9]*)))?(?:\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*)(?:\/(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*))*))(?:[?](?:(?:(?:[;\/?:@&=+\$,a-zA-Z0-9\-_.!~*'()]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)))?))?)/,
'type' => 'text' 'type' => 'text'
}, },
'samlCommonDomainCookieWriter' => { 'samlCommonDomainCookieWriter' => {
'msgFail' => '__badUrl__', 'msgFail' => '__badUrl__',
'test' => 'test' =>
qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)))(?::(?:(?:[0-9]*)))?(?:\/(?:(?:(?:(?:(?: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-zA-Z0-9])[.]
}, },
'samlDiscoveryProtocolURL' => { 'samlDiscoveryProtocolURL' => {
'msgFail' => '__badUrl__', 'msgFail' => '__badUrl__',
'test' => 'test' =>
qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)))(?::(?:(?:[0-9]*)))?(?:\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*)(?:\/(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*))*))(?:[?](?:(?:(?:[;\/?:@&=+\$,a-zA-Z0-9\-_.!~*'()]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)))?))?)/, qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)))(?::(?:(?:[0-9]*)))?(?:\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*)(?:\/(?:(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*))*))(?:[?](?:(?:(?:[;\/?:@&=+\$,a-zA-Z0-9\-_.!~*'()]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)))?))?)/,
'type' => 'text' 'type' => 'text'
}, },
@ -4135,7 +4135,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
}, },
'SMTPServer' => { 'SMTPServer' => {
'default' => '', 'default' => '',
'test' => 'test' =>
qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+))(?::\d+)?)?$/, qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+))(?::\d+)?)?$/,
'type' => 'text' 'type' => 'text'
}, },

View File

@ -7,7 +7,7 @@ use Exporter 'import';
our $VERSION = '2.0.14'; our $VERSION = '2.0.14';
use constant HANDLER => 'Lemonldap::NG::Handler::PSGI::Main'; use constant HANDLER => 'Lemonldap::NG::Handler::PSGI::Main';
use constant URIRE => use constant URIRE =>
qr{(((?^:https?))://((?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)))(?::((?:[0-9]*)))?(/(((?:(?:(?:(?:[a-zA-Z0-9\-_.!~*'():\@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():\@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*)(?:/(?:(?:(?:[a-zA-Z0-9\-_.!~*'():\@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():\@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*))*))(?:[?]((?:(?:[;/?:\@&=+\$,a-zA-Z0-9\-_.!~*'()]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)))?))?)}; qr{(((?^:https?))://((?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)))(?::((?:[0-9]*)))?(/(((?:(?:(?:(?:[a-zA-Z0-9\-_.!~*'():\@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():\@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*)(?:/(?:(?:(?:[a-zA-Z0-9\-_.!~*'():\@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\-_.!~*'():\@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*))*))(?:[?]((?:(?:[;/?:\@&=+\$,a-zA-Z0-9\-_.!~*'()]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)))?))?)};
use constant { use constant {
PE_IDPCHOICE => -5, PE_IDPCHOICE => -5,

View File

@ -2,7 +2,7 @@
# Display functions for LemonLDAP::NG Portal # Display functions for LemonLDAP::NG Portal
package Lemonldap::NG::Portal::Main::Display; package Lemonldap::NG::Portal::Main::Display;
our $VERSION = '2.0.14'; our $VERSION = '2.0.15';
package Lemonldap::NG::Portal::Main; package Lemonldap::NG::Portal::Main;
use strict; use strict;
@ -92,8 +92,6 @@ sub display {
$self->logger->debug('Display: notification detected'); $self->logger->debug('Display: notification detected');
$skinfile = 'notification'; $skinfile = 'notification';
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_TYPE => $req->error_type,
AUTH_ERROR_ROLE => $req->error_role, AUTH_ERROR_ROLE => $req->error_role,
NOTIFICATION => $notif, NOTIFICATION => $notif,
@ -115,8 +113,6 @@ sub display {
$self->logger->debug('Display: confirm detected'); $self->logger->debug('Display: confirm detected');
$skinfile = 'confirm'; $skinfile = 'confirm';
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
AUTH_ERROR => $req->error, AUTH_ERROR => $req->error,
AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_TYPE => $req->error_type,
AUTH_ERROR_ROLE => $req->error_role, AUTH_ERROR_ROLE => $req->error_role,
@ -147,8 +143,6 @@ sub display {
$self->logger->debug('Display: IDP choice detected'); $self->logger->debug('Display: IDP choice detected');
$skinfile = 'idpchoice'; $skinfile = 'idpchoice';
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
AUTH_ERROR => $req->error, AUTH_ERROR => $req->error,
AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_TYPE => $req->error_type,
AUTH_ERROR_ROLE => $req->error_role, AUTH_ERROR_ROLE => $req->error_role,
@ -182,8 +176,6 @@ sub display {
for keys %{ $req->{portalHiddenFormValues} // {} }; for keys %{ $req->{portalHiddenFormValues} // {} };
$skinfile = 'info'; $skinfile = 'info';
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
AUTH_ERROR => $self->error, AUTH_ERROR => $self->error,
AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_TYPE => $req->error_type,
AUTH_ERROR_ROLE => $req->error_role, AUTH_ERROR_ROLE => $req->error_role,
@ -216,8 +208,6 @@ sub display {
my $id = $req->{sessionInfo} my $id = $req->{sessionInfo}
->{ $self->conf->{openIdAttr} || $self->conf->{whatToTrace} }; ->{ $self->conf->{openIdAttr} || $self->conf->{whatToTrace} };
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
AUTH_ERROR => $self->error, AUTH_ERROR => $self->error,
AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_TYPE => $req->error_type,
AUTH_ERROR_ROLE => $req->error_role, AUTH_ERROR_ROLE => $req->error_role,
@ -239,8 +229,6 @@ sub display {
my $method = $req->data->{redirectFormMethod} || 'get'; my $method = $req->data->{redirectFormMethod} || 'get';
$skinfile = "redirect"; $skinfile = "redirect";
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
URL => $req->{urldc}, URL => $req->{urldc},
HIDDEN_INPUTS => $self->buildOutgoingHiddenForm( $req, $method ), HIDDEN_INPUTS => $self->buildOutgoingHiddenForm( $req, $method ),
FORM_METHOD => $method, FORM_METHOD => $method,
@ -258,14 +246,11 @@ sub display {
#utf8::decode($auth_user); #utf8::decode($auth_user);
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
AUTH_USER => $req->{sessionInfo}->{ $self->conf->{portalUserAttr} }, AUTH_USER => $req->{sessionInfo}->{ $self->conf->{portalUserAttr} },
NEWWINDOW => $self->conf->{portalOpenLinkInNewWindow}, NEWWINDOW => $self->conf->{portalOpenLinkInNewWindow},
LOGOUT_URL => $self->conf->{portal} . "?logout=1", LOGOUT_URL => $self->conf->{portal} . "?logout=1",
APPSLIST_ORDER => $req->{sessionInfo}->{'_appsListOrder'}, APPSLIST_ORDER => $req->{sessionInfo}->{'_appsListOrder'},
PING => $self->conf->{portalPingInterval}, PING => $self->conf->{portalPingInterval},
SCROLL_TOP => $self->conf->{scrollTop},
DONT_STORE_PASSWORD => $self->conf->{browsersDontStorePassword}, DONT_STORE_PASSWORD => $self->conf->{browsersDontStorePassword},
HIDE_OLDPASSWORD => 0, HIDE_OLDPASSWORD => 0,
PPOLICY_NOPOLICY => !$self->isPP(), PPOLICY_NOPOLICY => !$self->isPP(),
@ -301,8 +286,6 @@ sub display {
elsif ( $req->error == PE_UPGRADESESSION ) { elsif ( $req->error == PE_UPGRADESESSION ) {
$skinfile = 'upgradesession'; $skinfile = 'upgradesession';
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
FORMACTION => '/upgradesession', FORMACTION => '/upgradesession',
MSG => 'askToUpgrade', MSG => 'askToUpgrade',
PORTALBUTTON => 1, PORTALBUTTON => 1,
@ -322,8 +305,6 @@ sub display {
elsif ( $req->error == PE_RENEWSESSION ) { elsif ( $req->error == PE_RENEWSESSION ) {
$skinfile = 'upgradesession'; $skinfile = 'upgradesession';
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
FORMACTION => '/renewsession', FORMACTION => '/renewsession',
MSG => 'askToRenew', MSG => 'askToRenew',
CONFIRMKEY => $self->stamp, CONFIRMKEY => $self->stamp,
@ -343,8 +324,6 @@ sub display {
elsif ( $req->error == PE_MUSTAUTHN ) { elsif ( $req->error == PE_MUSTAUTHN ) {
$skinfile = 'upgradesession'; $skinfile = 'upgradesession';
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
FORMACTION => '/renewsession', FORMACTION => '/renewsession',
MSG => 'PE87', MSG => 'PE87',
CONFIRMKEY => $self->stamp, CONFIRMKEY => $self->stamp,
@ -377,8 +356,6 @@ sub display {
{ {
$skinfile = 'error'; $skinfile = 'error';
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
AUTH_ERROR => $req->error, AUTH_ERROR => $req->error,
AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_TYPE => $req->error_type,
AUTH_ERROR_ROLE => $req->error_role, AUTH_ERROR_ROLE => $req->error_role,
@ -396,8 +373,6 @@ sub display {
$skinfile = 'login'; $skinfile = 'login';
my $login = $req->user; my $login = $req->user;
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
AUTH_ERROR => $req->error, AUTH_ERROR => $req->error,
AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_TYPE => $req->error_type,
AUTH_ERROR_ROLE => $req->error_role, AUTH_ERROR_ROLE => $req->error_role,

View File

@ -9,7 +9,7 @@
# #
package Lemonldap::NG::Portal::Main::Run; package Lemonldap::NG::Portal::Main::Run;
our $VERSION = '2.0.14'; our $VERSION = '2.0.15';
package Lemonldap::NG::Portal::Main; package Lemonldap::NG::Portal::Main;
@ -1044,8 +1044,12 @@ sub tplParams {
} }
return ( return (
SKIN => $self->getSkin($req),
PORTAL_URL => $self->conf->{portal}, PORTAL_URL => $self->conf->{portal},
SCROLL_TOP => $self->conf->{scrollTop},
MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
SCROLL_TOP => $self->conf->{scrollTop},
SKIN => $self->getSkin($req),
SKIN_PATH => $portalPath . "skins", SKIN_PATH => $portalPath . "skins",
SAMESITE => getSameSite( $self->conf ), SAMESITE => getSameSite( $self->conf ),
SKIN_BG => $self->conf->{portalSkinBackground}, SKIN_BG => $self->conf->{portalSkinBackground},

View File

@ -65,11 +65,6 @@ sub display {
# Display form # Display form
my $params = { my $params = {
PORTAL => $self->conf->{portal},
MAIN_LOGO => $self->conf->{portalMainLogo},
SKIN => $self->p->getSkin($req),
LANGS => $self->conf->{showLanguages},
SCROLL_TOP => $self->conf->{scrollTop},
DOWNLOAD => $self->conf->{checkDevOpsDownload}, DOWNLOAD => $self->conf->{checkDevOpsDownload},
MSG => 'checkDevOps', MSG => 'checkDevOps',
ALERTE => 'alert-info', ALERTE => 'alert-info',
@ -111,10 +106,6 @@ sub parse {
# Prepare form # Prepare form
my $params = { my $params = {
PORTAL => $self->conf->{portal},
MAIN_LOGO => $self->conf->{portalMainLogo},
SKIN => $self->p->getSkin($req),
LANGS => $self->conf->{showLanguages},
DOWNLOAD => $self->conf->{checkDevOpsDownload}, DOWNLOAD => $self->conf->{checkDevOpsDownload},
MSG => "PE$msg", MSG => "PE$msg",
ALERTE => 'alert-warning', ALERTE => 'alert-warning',
@ -305,10 +296,6 @@ sub parse {
# Prepare form # Prepare form
my $params = { my $params = {
PORTAL => $self->conf->{portal},
MAIN_LOGO => $self->conf->{portalMainLogo},
SKIN => $self->p->getSkin($req),
LANGS => $self->conf->{showLanguages},
DOWNLOAD => $self->conf->{checkDevOpsDownload}, DOWNLOAD => $self->conf->{checkDevOpsDownload},
MSG => $msg, MSG => $msg,
UNKNOWN => join( $self->conf->{multiValuesSeparator}, @$unknown ), UNKNOWN => join( $self->conf->{multiValuesSeparator}, @$unknown ),

View File

@ -159,11 +159,6 @@ sub display {
$self->_createArray( $req, $attrs, $req->userData ) ); $self->_createArray( $req, $attrs, $req->userData ) );
my $params = { my $params = {
PORTAL => $self->conf->{portal},
MAIN_LOGO => $self->conf->{portalMainLogo},
SKIN => $self->p->getSkin($req),
LANGS => $self->conf->{showLanguages},
SCROLL_TOP => $self->conf->{scrollTop},
MSG => 'checkUser' . $self->merged, MSG => 'checkUser' . $self->merged,
ALERTE => ( $self->merged ? 'alert-warning' : 'alert-info' ), ALERTE => ( $self->merged ? 'alert-warning' : 'alert-info' ),
LOGIN => $req->{userData}->{ $self->conf->{whatToTrace} }, LOGIN => $req->{userData}->{ $self->conf->{whatToTrace} },
@ -211,11 +206,6 @@ sub check {
} }
my $params = { my $params = {
PORTAL => $self->conf->{portal},
MAIN_LOGO => $self->conf->{portalMainLogo},
SKIN => $self->p->getSkin($req),
LANGS => $self->conf->{showLanguages},
SCROLL_TOP => $self->conf->{scrollTop},
MSG => "PE$msg", MSG => "PE$msg",
ALERTE => 'alert-warning', ALERTE => 'alert-warning',
LOGIN => '', LOGIN => '',
@ -243,11 +233,6 @@ sub check {
$req, $req,
'checkuser', 'checkuser',
params => { params => {
PORTAL => $self->conf->{portal},
MAIN_LOGO => $self->conf->{portalMainLogo},
SKIN => $self->p->getSkin($req),
LANGS => $self->conf->{showLanguages},
SCROLL_TOP => $self->conf->{scrollTop},
MSG => 'PE' . PE_MALFORMEDUSER, MSG => 'PE' . PE_MALFORMEDUSER,
ALERTE => 'alert-warning', ALERTE => 'alert-warning',
LOGIN => '', LOGIN => '',
@ -412,11 +397,6 @@ sub check {
# TODO: # TODO:
my $params = { my $params = {
PORTAL => $self->conf->{portal},
MAIN_LOGO => $self->conf->{portalMainLogo},
SKIN => $self->p->getSkin($req),
LANGS => $self->conf->{showLanguages},
SCROLL_TOP => $self->conf->{scrollTop},
MSG => $msg, MSG => $msg,
ALERTE => ( $msg eq 'checkUser' ? 'alert-info' : 'alert-warning' ), ALERTE => ( $msg eq 'checkUser' ? 'alert-info' : 'alert-warning' ),
LOGIN => $user, LOGIN => $user,

View File

@ -14,7 +14,7 @@ use Lemonldap::NG::Portal::Main::Constants qw(
PE_IMPERSONATION_SERVICE_NOT_ALLOWED PE_IMPERSONATION_SERVICE_NOT_ALLOWED
); );
our $VERSION = '2.0.10'; our $VERSION = '2.0.15';
extends qw( extends qw(
Lemonldap::NG::Portal::Main::Plugin Lemonldap::NG::Portal::Main::Plugin
@ -119,10 +119,6 @@ sub display {
# Display form # Display form
my $params = { my $params = {
PORTAL => $self->conf->{portal},
MAIN_LOGO => $self->conf->{portalMainLogo},
SKIN => $self->p->getSkin($req),
LANGS => $self->conf->{showLanguages},
MSG => 'contextSwitching_ON', MSG => 'contextSwitching_ON',
ALERTE => 'alert-danger', ALERTE => 'alert-danger',
IMPERSONATION => $self->conf->{contextSwitchingRule}, IMPERSONATION => $self->conf->{contextSwitchingRule},

View File

@ -12,7 +12,7 @@ use Lemonldap::NG::Portal::Main::Constants qw(
PE_SENDRESPONSE PE_SENDRESPONSE
); );
our $VERSION = '2.0.14'; our $VERSION = '2.0.15';
extends qw( extends qw(
Lemonldap::NG::Portal::Main::Plugin Lemonldap::NG::Portal::Main::Plugin
@ -89,10 +89,6 @@ sub run {
$req, $req,
'globallogout', 'globallogout',
params => { params => {
PORTAL => $self->conf->{portal},
MAIN_LOGO => $self->conf->{portalMainLogo},
SKIN => $self->p->getSkin($req),
LANGS => $self->conf->{showLanguages},
SESSIONS => $sessions, SESSIONS => $sessions,
TOKEN => $token, TOKEN => $token,
LOGIN => $user, LOGIN => $user,

View File

@ -189,11 +189,6 @@ sub myNotifs {
# Build template # Build template
my $params = { my $params = {
PORTAL => $self->conf->{portal},
MAIN_LOGO => $self->conf->{portalMainLogo},
SKIN => $self->p->getSkin($req),
LANGS => $self->conf->{showLanguages},
SCROLL_TOP => $self->conf->{scrollTop},
NOTIFICATIONS => $_notifications, NOTIFICATIONS => $_notifications,
MSG => $msg MSG => $msg
}; };

View File

@ -84,14 +84,11 @@ sub ask {
$req, $req,
'upgradesession', 'upgradesession',
params => { params => {
MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
FORMACTION => $form_action, FORMACTION => $form_action,
PORTALBUTTON => 1, PORTALBUTTON => 1,
MSG => $message, MSG => $message,
BUTTON => $buttonlabel, BUTTON => $buttonlabel,
CONFIRMKEY => $self->p->stamp, CONFIRMKEY => $self->p->stamp,
PORTAL => $self->conf->{portal},
FORCEUPGRADE => $forceUpgrade, FORCEUPGRADE => $forceUpgrade,
URL => $url, URL => $url,
( (