diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/DefaultValues.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/DefaultValues.pm index 36bb458ca..fc810fa3d 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/DefaultValues.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/DefaultValues.pm @@ -17,7 +17,7 @@ sub defaultValues { }, 'authChoiceParam' => 'lmAuth', 'authentication' => 'Demo', - 'available2F' => + 'available2F' => 'UTOTP,TOTP,U2F,REST,Mail2F,Ext2F,WebAuthn,Yubikey,Radius', 'available2FSelfRegistration' => 'TOTP,U2F,WebAuthn,Yubikey', 'bruteForceProtectionLockTimes' => '15, 30, 60, 300, 600', @@ -102,7 +102,7 @@ sub defaultValues { 'globalLogoutTimer' => 1, 'globalStorage' => 'Apache::Session::File', 'globalStorageOptions' => { - 'Directory' => '/var/lib/lemonldap-ng/sessions/', + 'Directory' => '/var/lib/lemonldap-ng/sessions/', 'generateModule' => 'Lemonldap::NG::Common::Apache::Session::Generate::SHA256', 'LockDirectory' => '/var/lib/lemonldap-ng/sessions/lock/' @@ -175,20 +175,20 @@ sub defaultValues { 'locationRules' => { 'default' => 'deny' }, - 'logoutServices' => {}, - 'macros' => {}, - 'mail2fActivation' => 0, - 'mail2fCodeRegex' => '\\d{6}', - 'mailCharset' => 'utf-8', - 'mailFrom' => 'noreply@example.com', - 'mailSessionKey' => 'mail', - 'mailTimeout' => 0, - 'mailUrl' => 'http://auth.example.com/resetpwd', - 'managerDn' => '', - 'managerPassword' => '', - 'max2FDevices' => 10, - 'max2FDevicesNameLength' => 20, - 'multiValuesSeparator' => '; ', + 'logoutServices' => {}, + 'macros' => {}, + 'mail2fActivation' => 0, + 'mail2fCodeRegex' => '\\d{6}', + 'mailCharset' => 'utf-8', + 'mailFrom' => 'noreply@example.com', + 'mailSessionKey' => 'mail', + 'mailTimeout' => 0, + 'mailUrl' => 'http://auth.example.com/resetpwd', + 'managerDn' => '', + 'managerPassword' => '', + 'max2FDevices' => 10, + 'max2FDevicesNameLength' => 20, + 'multiValuesSeparator' => '; ', 'mySessionAuthorizedRWKeys' => [ '_appsListOrder', '_oidcConnectedRP', '_oidcConsents' ], 'newLocationWarningLocationAttribute' => 'ipAddr', @@ -196,7 +196,7 @@ sub defaultValues { 'newLocationWarningMaxValues' => '0', 'notificationDefaultCond' => '', 'notificationServerPOST' => 1, - 'notificationServerSentAttributes' => + 'notificationServerSentAttributes' => 'uid reference date title subtitle text check', 'notificationsMaxRetrieve' => 3, 'notificationStorage' => 'File', @@ -250,7 +250,7 @@ sub defaultValues { 'passwordPolicyMinUpper' => 0, 'passwordPolicySpecialChar' => '__ALL__', 'passwordResetAllowedRetries' => 3, - 'persistentSessionAttributes' => + 'persistentSessionAttributes' => '_loginHistory _2fDevices notification_', 'port' => -1, 'portal' => 'http://auth.example.com/', @@ -261,7 +261,7 @@ sub defaultValues { 'portalDisplayGeneratePassword' => 1, 'portalDisplayLoginHistory' => 1, 'portalDisplayLogout' => 1, - 'portalDisplayOidcConsents' => + 'portalDisplayOidcConsents' => '$_oidcConsents && $_oidcConsents =~ /\\w+/', 'portalDisplayRefreshMyRights' => 1, 'portalDisplayRegister' => 1, @@ -290,11 +290,11 @@ sub defaultValues { 'http://auth.example.com/Lemonldap/NG/Common/PSGI/SOAPService', 'proxy' => 'http://auth.example.com/sessions' }, - 'requireToken' => 1, - 'rest2fActivation' => 0, - 'restAuthnLevel' => 2, - 'restClockTolerance' => 15, - 'sameSite' => '', + 'requireToken' => 1, + 'rest2fActivation' => 0, + 'restAuthnLevel' => 2, + 'restClockTolerance' => 15, + 'sameSite' => '', 'samlAttributeAuthorityDescriptorAttributeServiceSOAP' => 'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;#PORTAL#/saml/AA/SOAP;', 'samlAuthnContextMapKerberos' => 4, @@ -334,7 +334,7 @@ sub defaultValues { '0;1;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact;#PORTAL#/saml/proxySingleSignOnArtifact', 'samlSPSSODescriptorAssertionConsumerServiceHTTPPost' => '1;0;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/proxySingleSignOnPost', - 'samlSPSSODescriptorAuthnRequestsSigned' => 1, + 'samlSPSSODescriptorAuthnRequestsSigned' => 1, 'samlSPSSODescriptorSingleLogoutServiceHTTPPost' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;#PORTAL#/saml/proxySingleLogout;#PORTAL#/saml/proxySingleLogoutReturn', 'samlSPSSODescriptorSingleLogoutServiceHTTPRedirect' => @@ -347,7 +347,7 @@ sub defaultValues { 'sfEngine' => '::2F::Engines::Default', 'sfManagerRule' => 1, 'sfRemovedMsgRule' => 0, - 'sfRemovedNotifMsg' => + 'sfRemovedNotifMsg' => '_removedSF_ expired second factor(s) has/have been removed (_nameSF_)!', 'sfRemovedNotifRef' => 'RemoveSF', 'sfRemovedNotifTitle' => 'Second factor notification', diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm index 97ac653df..48e9526df 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm @@ -67,7 +67,7 @@ sub types { 'hostname' => { 'form' => 'text', '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]+)))?$/ }, 'int' => { @@ -257,7 +257,7 @@ m[^(?:(?:\-+\s*BEGIN\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\ 'url' => { 'form' => 'text', '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]))*)))?))?))/ } }; @@ -812,7 +812,7 @@ sub attributes { }, 'casSrvMetaDataOptionsUrl' => { '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]))*)))?))?)/, 'type' => 'text' }, @@ -1351,7 +1351,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.] 'domain' => { 'default' => 'example.com', '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])[.]?))?$/, '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' => { 'default' => { - 'Directory' => '/var/lib/lemonldap-ng/sessions/', + 'Directory' => '/var/lib/lemonldap-ng/sessions/', 'generateModule' => 'Lemonldap::NG::Common::Apache::Session::Generate::SHA256', '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' => { 'default' => {}, '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])[.]?)$/, 'test' => { 'keyMsgFail' => '__badKeyName__', @@ -2822,7 +2822,7 @@ m[^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?: 'pdataDomain' => { 'default' => '', '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])[.]?))?$/, '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' => { 'default' => 'http://auth.example.com/', '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]))*)))?))?)/, 'type' => 'url' }, @@ -3154,7 +3154,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.] '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])[.]?)|(?:[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+))(?::\d+)?$/, '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]))*)))?))?)/, 'type' => 'keyTextContainer' }, @@ -3306,19 +3306,19 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.] }, 'samlCommonDomainCookieDomain' => { '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])[.]?)$/, 'type' => 'text' }, 'samlCommonDomainCookieReader' => { '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]))*)))?))?)/, 'type' => 'text' }, 'samlCommonDomainCookieWriter' => { '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]))*)))?))?)/, 'type' => 'text' }, @@ -3335,7 +3335,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.] }, 'samlDiscoveryProtocolURL' => { '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]))*)))?))?)/, 'type' => 'text' }, @@ -4135,7 +4135,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.] }, 'SMTPServer' => { '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+)?)?$/, 'type' => 'text' }, diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Constants.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Constants.pm index ec58c6a4e..28cc6be35 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Constants.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Constants.pm @@ -7,7 +7,7 @@ use Exporter 'import'; our $VERSION = '2.0.14'; 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]))*)))?))?)}; use constant { PE_IDPCHOICE => -5, diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm index 7244de077..3a4cbda54 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm @@ -2,7 +2,7 @@ # Display functions for LemonLDAP::NG Portal package Lemonldap::NG::Portal::Main::Display; -our $VERSION = '2.0.14'; +our $VERSION = '2.0.15'; package Lemonldap::NG::Portal::Main; use strict; @@ -92,8 +92,6 @@ sub display { $self->logger->debug('Display: notification detected'); $skinfile = 'notification'; %templateParams = ( - MAIN_LOGO => $self->conf->{portalMainLogo}, - LANGS => $self->conf->{showLanguages}, AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_ROLE => $req->error_role, NOTIFICATION => $notif, @@ -115,8 +113,6 @@ sub display { $self->logger->debug('Display: confirm detected'); $skinfile = 'confirm'; %templateParams = ( - MAIN_LOGO => $self->conf->{portalMainLogo}, - LANGS => $self->conf->{showLanguages}, AUTH_ERROR => $req->error, AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_ROLE => $req->error_role, @@ -147,8 +143,6 @@ sub display { $self->logger->debug('Display: IDP choice detected'); $skinfile = 'idpchoice'; %templateParams = ( - MAIN_LOGO => $self->conf->{portalMainLogo}, - LANGS => $self->conf->{showLanguages}, AUTH_ERROR => $req->error, AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_ROLE => $req->error_role, @@ -182,8 +176,6 @@ sub display { for keys %{ $req->{portalHiddenFormValues} // {} }; $skinfile = 'info'; %templateParams = ( - MAIN_LOGO => $self->conf->{portalMainLogo}, - LANGS => $self->conf->{showLanguages}, AUTH_ERROR => $self->error, AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_ROLE => $req->error_role, @@ -216,8 +208,6 @@ sub display { my $id = $req->{sessionInfo} ->{ $self->conf->{openIdAttr} || $self->conf->{whatToTrace} }; %templateParams = ( - MAIN_LOGO => $self->conf->{portalMainLogo}, - LANGS => $self->conf->{showLanguages}, AUTH_ERROR => $self->error, AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_ROLE => $req->error_role, @@ -239,8 +229,6 @@ sub display { my $method = $req->data->{redirectFormMethod} || 'get'; $skinfile = "redirect"; %templateParams = ( - MAIN_LOGO => $self->conf->{portalMainLogo}, - LANGS => $self->conf->{showLanguages}, URL => $req->{urldc}, HIDDEN_INPUTS => $self->buildOutgoingHiddenForm( $req, $method ), FORM_METHOD => $method, @@ -258,14 +246,11 @@ sub display { #utf8::decode($auth_user); %templateParams = ( - MAIN_LOGO => $self->conf->{portalMainLogo}, - LANGS => $self->conf->{showLanguages}, AUTH_USER => $req->{sessionInfo}->{ $self->conf->{portalUserAttr} }, NEWWINDOW => $self->conf->{portalOpenLinkInNewWindow}, LOGOUT_URL => $self->conf->{portal} . "?logout=1", APPSLIST_ORDER => $req->{sessionInfo}->{'_appsListOrder'}, PING => $self->conf->{portalPingInterval}, - SCROLL_TOP => $self->conf->{scrollTop}, DONT_STORE_PASSWORD => $self->conf->{browsersDontStorePassword}, HIDE_OLDPASSWORD => 0, PPOLICY_NOPOLICY => !$self->isPP(), @@ -301,8 +286,6 @@ sub display { elsif ( $req->error == PE_UPGRADESESSION ) { $skinfile = 'upgradesession'; %templateParams = ( - MAIN_LOGO => $self->conf->{portalMainLogo}, - LANGS => $self->conf->{showLanguages}, FORMACTION => '/upgradesession', MSG => 'askToUpgrade', PORTALBUTTON => 1, @@ -322,8 +305,6 @@ sub display { elsif ( $req->error == PE_RENEWSESSION ) { $skinfile = 'upgradesession'; %templateParams = ( - MAIN_LOGO => $self->conf->{portalMainLogo}, - LANGS => $self->conf->{showLanguages}, FORMACTION => '/renewsession', MSG => 'askToRenew', CONFIRMKEY => $self->stamp, @@ -343,8 +324,6 @@ sub display { elsif ( $req->error == PE_MUSTAUTHN ) { $skinfile = 'upgradesession'; %templateParams = ( - MAIN_LOGO => $self->conf->{portalMainLogo}, - LANGS => $self->conf->{showLanguages}, FORMACTION => '/renewsession', MSG => 'PE87', CONFIRMKEY => $self->stamp, @@ -377,8 +356,6 @@ sub display { { $skinfile = 'error'; %templateParams = ( - MAIN_LOGO => $self->conf->{portalMainLogo}, - LANGS => $self->conf->{showLanguages}, AUTH_ERROR => $req->error, AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_ROLE => $req->error_role, @@ -396,8 +373,6 @@ sub display { $skinfile = 'login'; my $login = $req->user; %templateParams = ( - MAIN_LOGO => $self->conf->{portalMainLogo}, - LANGS => $self->conf->{showLanguages}, AUTH_ERROR => $req->error, AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_ROLE => $req->error_role, diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm index f4816a41e..367083554 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm @@ -9,7 +9,7 @@ # package Lemonldap::NG::Portal::Main::Run; -our $VERSION = '2.0.14'; +our $VERSION = '2.0.15'; package Lemonldap::NG::Portal::Main; @@ -1044,8 +1044,12 @@ sub tplParams { } return ( - SKIN => $self->getSkin($req), 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", SAMESITE => getSameSite( $self->conf ), SKIN_BG => $self->conf->{portalSkinBackground}, diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CheckDevOps.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CheckDevOps.pm index e14ecfcf9..7d1c23262 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CheckDevOps.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CheckDevOps.pm @@ -65,11 +65,6 @@ sub display { # Display form 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}, MSG => 'checkDevOps', ALERTE => 'alert-info', @@ -111,10 +106,6 @@ sub parse { # Prepare form my $params = { - PORTAL => $self->conf->{portal}, - MAIN_LOGO => $self->conf->{portalMainLogo}, - SKIN => $self->p->getSkin($req), - LANGS => $self->conf->{showLanguages}, DOWNLOAD => $self->conf->{checkDevOpsDownload}, MSG => "PE$msg", ALERTE => 'alert-warning', @@ -305,10 +296,6 @@ sub parse { # Prepare form my $params = { - PORTAL => $self->conf->{portal}, - MAIN_LOGO => $self->conf->{portalMainLogo}, - SKIN => $self->p->getSkin($req), - LANGS => $self->conf->{showLanguages}, DOWNLOAD => $self->conf->{checkDevOpsDownload}, MSG => $msg, UNKNOWN => join( $self->conf->{multiValuesSeparator}, @$unknown ), diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CheckUser.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CheckUser.pm index b02a6fc64..379c9e77a 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CheckUser.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CheckUser.pm @@ -159,11 +159,6 @@ sub display { $self->_createArray( $req, $attrs, $req->userData ) ); 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, ALERTE => ( $self->merged ? 'alert-warning' : 'alert-info' ), LOGIN => $req->{userData}->{ $self->conf->{whatToTrace} }, @@ -211,11 +206,6 @@ sub check { } 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", ALERTE => 'alert-warning', LOGIN => '', @@ -243,11 +233,6 @@ sub check { $req, 'checkuser', 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, ALERTE => 'alert-warning', LOGIN => '', @@ -412,11 +397,6 @@ sub check { # TODO: 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, ALERTE => ( $msg eq 'checkUser' ? 'alert-info' : 'alert-warning' ), LOGIN => $user, diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/ContextSwitching.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/ContextSwitching.pm index 99392d1e6..034d8d630 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/ContextSwitching.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/ContextSwitching.pm @@ -14,7 +14,7 @@ use Lemonldap::NG::Portal::Main::Constants qw( PE_IMPERSONATION_SERVICE_NOT_ALLOWED ); -our $VERSION = '2.0.10'; +our $VERSION = '2.0.15'; extends qw( Lemonldap::NG::Portal::Main::Plugin @@ -119,10 +119,6 @@ sub display { # Display form my $params = { - PORTAL => $self->conf->{portal}, - MAIN_LOGO => $self->conf->{portalMainLogo}, - SKIN => $self->p->getSkin($req), - LANGS => $self->conf->{showLanguages}, MSG => 'contextSwitching_ON', ALERTE => 'alert-danger', IMPERSONATION => $self->conf->{contextSwitchingRule}, diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/GlobalLogout.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/GlobalLogout.pm index 9be95f255..f862999bf 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/GlobalLogout.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/GlobalLogout.pm @@ -12,7 +12,7 @@ use Lemonldap::NG::Portal::Main::Constants qw( PE_SENDRESPONSE ); -our $VERSION = '2.0.14'; +our $VERSION = '2.0.15'; extends qw( Lemonldap::NG::Portal::Main::Plugin @@ -89,10 +89,6 @@ sub run { $req, 'globallogout', params => { - PORTAL => $self->conf->{portal}, - MAIN_LOGO => $self->conf->{portalMainLogo}, - SKIN => $self->p->getSkin($req), - LANGS => $self->conf->{showLanguages}, SESSIONS => $sessions, TOKEN => $token, LOGIN => $user, diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Notifications.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Notifications.pm index 0ba922941..d15132503 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Notifications.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Notifications.pm @@ -189,11 +189,6 @@ sub myNotifs { # Build template 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, MSG => $msg }; diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Upgrade.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Upgrade.pm index f8d832ad9..fd5fb29fb 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Upgrade.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Upgrade.pm @@ -84,14 +84,11 @@ sub ask { $req, 'upgradesession', params => { - MAIN_LOGO => $self->conf->{portalMainLogo}, - LANGS => $self->conf->{showLanguages}, FORMACTION => $form_action, PORTALBUTTON => 1, MSG => $message, BUTTON => $buttonlabel, CONFIRMKEY => $self->p->stamp, - PORTAL => $self->conf->{portal}, FORCEUPGRADE => $forceUpgrade, URL => $url, (