Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Maxime Besson
lemonldap-ng
Commits
b2620c26
Commit
b2620c26
authored
Jul 05, 2018
by
Yadd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s/datas/data
datas => des données data => les données
parent
9402f9ff
Changes
104
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
407 additions
and
407 deletions
+407
-407
lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm
...-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm
+3
-3
lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/SOAP.pm
...-ng-common/lib/Lemonldap/NG/Common/Apache/Session/SOAP.pm
+3
-3
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/RESTServer.pm
...ldap-ng-common/lib/Lemonldap/NG/Common/Conf/RESTServer.pm
+9
-9
lemonldap-ng-common/lib/Lemonldap/NG/Common/Crypto.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Crypto.pm
+10
-10
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/JSON.pm
...p-ng-common/lib/Lemonldap/NG/Common/Notifications/JSON.pm
+4
-4
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/XML.pm
...ap-ng-common/lib/Lemonldap/NG/Common/Notifications/XML.pm
+6
-6
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Request.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Request.pm
+2
-2
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/SOAPService.pm
...dap-ng-common/lib/Lemonldap/NG/Common/PSGI/SOAPService.pm
+2
-2
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/ApacheMP2/Main.pm
...dap-ng-handler/lib/Lemonldap/NG/Handler/ApacheMP2/Main.pm
+1
-1
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/ApacheMP2/Request.pm
...-ng-handler/lib/Lemonldap/NG/Handler/ApacheMP2/Request.pm
+2
-2
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/PSGI.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/PSGI.pm
+1
-1
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/SecureToken.pm
...ap-ng-handler/lib/Lemonldap/NG/Handler/Lib/SecureToken.pm
+1
-1
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/ZimbraPreAuth.pm
...-ng-handler/lib/Lemonldap/NG/Handler/Lib/ZimbraPreAuth.pm
+2
-2
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Reload.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Reload.pm
+2
-2
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Run.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Run.pm
+18
-18
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/SharedVariables.pm
...-handler/lib/Lemonldap/NG/Handler/Main/SharedVariables.pm
+1
-1
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI.pm
+1
-1
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Router.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Router.pm
+1
-1
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Try.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Try.pm
+3
-3
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build.pm
+1
-1
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Attributes.pm
...p-ng-manager/lib/Lemonldap/NG/Manager/Build/Attributes.pm
+1
-1
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm
+1
-1
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Parser.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Parser.pm
+1
-1
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Tests.pm
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Tests.pm
+1
-1
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Notifications.pm
...ldap-ng-manager/lib/Lemonldap/NG/Manager/Notifications.pm
+2
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm
...p-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/U2F.pm
...ldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/U2F.pm
+5
-5
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/U2F.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/U2F.pm
+5
-5
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/UTOTP.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/UTOTP.pm
+3
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/AD.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/AD.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/CAS.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/CAS.pm
+10
-10
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Choice.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Choice.pm
+5
-5
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Combination.pm
...dap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Combination.pm
+14
-14
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Demo.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Demo.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Facebook.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Facebook.pm
+14
-14
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Kerberos.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Kerberos.pm
+5
-5
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/LDAP.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/LDAP.pm
+4
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/LinkedIn.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/LinkedIn.pm
+4
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/OpenID.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/OpenID.pm
+6
-6
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/OpenIDConnect.pm
...p-ng-portal/lib/Lemonldap/NG/Portal/Auth/OpenIDConnect.pm
+10
-10
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/PAM.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/PAM.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/REST.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/REST.pm
+4
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Radius.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Radius.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Remote.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Remote.pm
+4
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/SAML.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/SAML.pm
+26
-26
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/SSL.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/SSL.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Twitter.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Twitter.pm
+10
-10
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/WebID.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/WebID.pm
+4
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/_WebForm.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/_WebForm.pm
+11
-11
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/CAS.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/CAS.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/OpenID.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/OpenID.pm
+13
-13
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/OpenIDConnect.pm
...ng-portal/lib/Lemonldap/NG/Portal/Issuer/OpenIDConnect.pm
+3
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/SAML.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/SAML.pm
+13
-13
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/CAS.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/CAS.pm
+4
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Choice.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Choice.pm
+3
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/DBI.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/DBI.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/LDAP.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/LDAP.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Notifications/JSON.pm
...-portal/lib/Lemonldap/NG/Portal/Lib/Notifications/JSON.pm
+4
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Notifications/XML.pm
...g-portal/lib/Lemonldap/NG/Portal/Lib/Notifications/XML.pm
+4
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenID/SREG.pm
...ldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenID/SREG.pm
+4
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenIDConnect.pm
...ap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenIDConnect.pm
+3
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/RESTProxy.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/RESTProxy.pm
+4
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Remote.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Remote.pm
+2
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/SAML.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/SAML.pm
+8
-8
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/SOAPProxy.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/SOAPProxy.pm
+7
-7
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Wrapper.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Wrapper.pm
+7
-7
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm
+46
-46
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm
+5
-5
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Issuer.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Issuer.pm
+6
-6
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Plugin.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Plugin.pm
+2
-2
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Process.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Process.pm
+7
-7
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Request.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Request.pm
+5
-5
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm
+23
-23
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/SecondFactor.pm
...ap-ng-portal/lib/Lemonldap/NG/Portal/Main/SecondFactor.pm
+1
-1
No files found.
lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm
View file @
b2620c26
...
@@ -144,7 +144,7 @@ sub base {
...
@@ -144,7 +144,7 @@ sub base {
## @method hashRef get(string id)
## @method hashRef get(string id)
# @param $id Apache::Session session ID.
# @param $id Apache::Session session ID.
# @return User data
s
# @return User data
sub
get
{
sub
get
{
my
$self
=
shift
;
my
$self
=
shift
;
my
$id
=
shift
;
my
$id
=
shift
;
...
@@ -165,7 +165,7 @@ sub get {
...
@@ -165,7 +165,7 @@ sub get {
## @method hashRef newSession()
## @method hashRef newSession()
# Build a new Apache::Session session.
# Build a new Apache::Session session.
# @return User data
s
(just the session ID)
# @return User data (just the session ID)
sub
newSession
{
sub
newSession
{
my
$self
=
shift
;
my
$self
=
shift
;
$self
->
generate
unless
(
$self
->
{
data
}
->
{
_session_id
}
);
$self
->
generate
unless
(
$self
->
{
data
}
->
{
_session_id
}
);
...
@@ -200,7 +200,7 @@ sub newSession {
...
@@ -200,7 +200,7 @@ sub newSession {
}
}
## @method boolean save()
## @method boolean save()
# Save user data
s
if modified.
# Save user data if modified.
sub
save
{
sub
save
{
my
$self
=
shift
;
my
$self
=
shift
;
return
unless
(
$self
->
{
modified
}
);
return
unless
(
$self
->
{
modified
}
);
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/SOAP.pm
View file @
b2620c26
...
@@ -147,7 +147,7 @@ sub _soapCall {
...
@@ -147,7 +147,7 @@ sub _soapCall {
## @method hashRef get(string id)
## @method hashRef get(string id)
# @param $id Apache::Session session ID.
# @param $id Apache::Session session ID.
# @return User data
s
# @return User data
sub
get
{
sub
get
{
my
$self
=
shift
;
my
$self
=
shift
;
my
$id
=
shift
;
my
$id
=
shift
;
...
@@ -169,7 +169,7 @@ sub get {
...
@@ -169,7 +169,7 @@ sub get {
## @method hashRef newSession()
## @method hashRef newSession()
# Build a new Apache::Session session.
# Build a new Apache::Session session.
# @return User data
s
(just the session ID)
# @return User data (just the session ID)
sub
newSession
{
sub
newSession
{
my
$self
=
shift
;
my
$self
=
shift
;
$self
->
{
data
}
=
$self
->
_soapCall
("
newSession
");
$self
->
{
data
}
=
$self
->
_soapCall
("
newSession
");
...
@@ -187,7 +187,7 @@ sub newSession {
...
@@ -187,7 +187,7 @@ sub newSession {
}
}
## @method boolean save()
## @method boolean save()
# Save user data
s
if modified.
# Save user data if modified.
sub
save
{
sub
save
{
my
$self
=
shift
;
my
$self
=
shift
;
return
unless
(
$self
->
{
modified
}
);
return
unless
(
$self
->
{
modified
}
);
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/RESTServer.pm
View file @
b2620c26
...
@@ -100,18 +100,18 @@ sub getConfByNum {
...
@@ -100,18 +100,18 @@ sub getConfByNum {
# * openIdIDPList() (old OpenID)
# * openIdIDPList() (old OpenID)
# * applicationList()
# * applicationList()
# - root:
# - root:
# root query (/confs/latest for example) is redirected to metadata
s
()
# root query (/confs/latest for example) is redirected to metadata()
# - other requests:
# - other requests:
# they are managed by getKey()
# they are managed by getKey()
# - newRSAKey() returns a new RSA key pair if /confs/newRSAKey is called in a
# - newRSAKey() returns a new RSA key pair if /confs/newRSAKey is called in a
# POST request
# POST request
# - prx() load a request and return the content (for SAML/OIDC metadata
s
)
# - prx() load a request and return the content (for SAML/OIDC metadata)
# 31 - Complex subnodes
# 31 - Complex subnodes
# ----------------
# ----------------
## @method PSGI-JSON-response complexNodesRoot($req, $query, $tpl)
## @method PSGI-JSON-response complexNodesRoot($req, $query, $tpl)
# Respond to root requests for virtual hosts and SAMLmetadata
s
# Respond to root requests for virtual hosts and SAMLmetadata
#
#
#@param $req Lemonldap::NG::Common::PSGI::Request
#@param $req Lemonldap::NG::Common::PSGI::Request
#@param $query Configuration root key
#@param $query Configuration root key
...
@@ -686,15 +686,15 @@ sub combModules {
...
@@ -686,15 +686,15 @@ sub combModules {
# 33 - Root queries
# 33 - Root queries
# -----------
# -----------
## @method PSGI-JSON-response metadata
s
($req)
## @method PSGI-JSON-response metadata($req)
# Respond to `/conf/:cfgNum` requests by sending configuration metadata
s
# Respond to `/conf/:cfgNum` requests by sending configuration metadata
#
#
# NB: if `full=1` is set in the query, configuration is returned directly in
# NB: if `full=1` is set in the query, configuration is returned directly in
# JSON
# JSON
#
#
#@param $req Lemonldap::NG::Common::PSGI::Request
#@param $req Lemonldap::NG::Common::PSGI::Request
#@return PSGI JSON response
#@return PSGI JSON response
sub
metadata
s
{
sub
metadata
{
my
(
$self
,
$req
)
=
@_
;
my
(
$self
,
$req
)
=
@_
;
if
(
$req
->
params
('
full
')
and
$req
->
params
('
full
')
!~
NO
)
{
if
(
$req
->
params
('
full
')
and
$req
->
params
('
full
')
!~
NO
)
{
my
$c
=
$self
->
getConfKey
(
$req
,
'
cfgNum
'
);
my
$c
=
$self
->
getConfKey
(
$req
,
'
cfgNum
'
);
...
@@ -738,13 +738,13 @@ sub metadatas {
...
@@ -738,13 +738,13 @@ sub metadatas {
if
(
$self
->
can
('
userId
')
)
{
if
(
$self
->
can
('
userId
')
)
{
$self
->
userLogger
->
info
(
'
User
'
$self
->
userLogger
->
info
(
'
User
'
.
$self
->
userId
(
$req
)
.
$self
->
userId
(
$req
)
.
'
ask for configuration metadata
s
(
'
.
'
ask for configuration metadata (
'
.
$res
->
{
cfgNum
}
.
$res
->
{
cfgNum
}
.
'
)
'
);
.
'
)
'
);
}
}
else
{
else
{
$self
->
logger
->
info
(
$self
->
logger
->
info
(
"
REST request to get configuration metadata
s
(
$res
->{cfgNum})
"
"
REST request to get configuration metadata (
$res
->{cfgNum})
"
);
);
}
}
return
$self
->
sendJSONresponse
(
$req
,
$res
);
return
$self
->
sendJSONresponse
(
$req
,
$res
);
...
@@ -764,7 +764,7 @@ sub metadatas {
...
@@ -764,7 +764,7 @@ sub metadatas {
sub
getKey
{
sub
getKey
{
my
(
$self
,
$req
,
$key
,
$subkey
)
=
@_
;
my
(
$self
,
$req
,
$key
,
$subkey
)
=
@_
;
unless
(
$key
)
{
unless
(
$key
)
{
return
$self
->
metadata
s
(
$req
);
return
$self
->
metadata
(
$req
);
}
}
$self
->
userLogger
->
info
(
$self
->
userLogger
->
info
(
'
User
'
.
$self
->
userId
(
$req
)
.
"
asks for key
$key
"
);
'
User
'
.
$self
->
userId
(
$req
)
.
"
asks for key
$key
"
);
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Crypto.pm
View file @
b2620c26
...
@@ -50,8 +50,8 @@ sub _getCipher {
...
@@ -50,8 +50,8 @@ sub _getCipher {
## @method string encrypt(string data)
## @method string encrypt(string data)
# Encrypt $data and return it in Base64 format
# Encrypt $data and return it in Base64 format
# @param data data
s
to encrypt
# @param data data to encrypt
# @return encrypted data
s
in Base64 format
# @return encrypted data in Base64 format
sub
encrypt
{
sub
encrypt
{
my
(
$self
,
$data
)
=
@_
;
my
(
$self
,
$data
)
=
@_
;
...
@@ -73,8 +73,8 @@ sub encrypt {
...
@@ -73,8 +73,8 @@ sub encrypt {
## @method string decrypt(string data)
## @method string decrypt(string data)
# Decrypt $data and return it
# Decrypt $data and return it
# @param data data
s
to decrypt in Base64 format
# @param data data to decrypt in Base64 format
# @return decrypted data
s
# @return decrypted data
sub
decrypt
{
sub
decrypt
{
my
(
$self
,
$data
)
=
@_
;
my
(
$self
,
$data
)
=
@_
;
$data
=~
s/%2B/\+/ig
;
$data
=~
s/%2B/\+/ig
;
...
@@ -100,9 +100,9 @@ sub decrypt {
...
@@ -100,9 +100,9 @@ sub decrypt {
# Encrypt $data and return it in hexadecimal format
# Encrypt $data and return it in hexadecimal format
# Data must be hexadecimal and its length must be a multiple of 32
# Data must be hexadecimal and its length must be a multiple of 32
# the encrypted data have same length as the original data
# the encrypted data have same length as the original data
# @param data data
s
to encrypt
# @param data data to encrypt
# @param key optional secondary key
# @param key optional secondary key
# @return encrypted data
s
in hexadecimal data
# @return encrypted data in hexadecimal data
sub
encryptHex
{
sub
encryptHex
{
my
(
$self
,
$data
,
$key
)
=
@_
;
my
(
$self
,
$data
,
$key
)
=
@_
;
return
_cryptHex
(
$self
,
$data
,
$key
,
"
encrypt
"
);
return
_cryptHex
(
$self
,
$data
,
$key
,
"
encrypt
"
);
...
@@ -112,9 +112,9 @@ sub encryptHex {
...
@@ -112,9 +112,9 @@ sub encryptHex {
# Decrypt $data and return it in hexadecimal format
# Decrypt $data and return it in hexadecimal format
# Data must be hexadecimal and its length must be a multiple of 32
# Data must be hexadecimal and its length must be a multiple of 32
# the decrypted data have same length as the encrypted data
# the decrypted data have same length as the encrypted data
# @param data data
s
to decrypt
# @param data data to decrypt
# @param key optional secondary key
# @param key optional secondary key
# @return decrypted data
s
in hexadecimal data
# @return decrypted data in hexadecimal data
sub
decryptHex
{
sub
decryptHex
{
my
(
$self
,
$data
,
$key
)
=
@_
;
my
(
$self
,
$data
,
$key
)
=
@_
;
return
_cryptHex
(
$self
,
$data
,
$key
,
"
decrypt
"
);
return
_cryptHex
(
$self
,
$data
,
$key
,
"
decrypt
"
);
...
@@ -122,10 +122,10 @@ sub decryptHex {
...
@@ -122,10 +122,10 @@ sub decryptHex {
## @method private string _cryptHex (string data, string key, string sub)
## @method private string _cryptHex (string data, string key, string sub)
# Auxiliary method to share code between encrypt and decrypt
# Auxiliary method to share code between encrypt and decrypt
# @param data data
s
to decrypt
# @param data data to decrypt
# @param key secondary key
# @param key secondary key
# @param sub may be "encrypt" or "decrypt"
# @param sub may be "encrypt" or "decrypt"
# @return decrypted data
s
in hexadecimal data
# @return decrypted data in hexadecimal data
sub
_cryptHex
{
sub
_cryptHex
{
my
(
$self
,
$data
,
$key
,
$sub
)
=
@_
;
my
(
$self
,
$data
,
$key
,
$sub
)
=
@_
;
unless
(
$data
=~
/^([0-9a-fA-F]{2})*$/
)
{
unless
(
$data
=~
/^([0-9a-fA-F]{2})*$/
)
{
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/JSON.pm
View file @
b2620c26
...
@@ -17,7 +17,7 @@ sub newNotification {
...
@@ -17,7 +17,7 @@ sub newNotification {
my
@notifs
;
my
@notifs
;
$json
=
[
$json
]
unless
(
ref
(
$json
)
eq
'
ARRAY
'
);
$json
=
[
$json
]
unless
(
ref
(
$json
)
eq
'
ARRAY
'
);
foreach
my
$notif
(
@$json
)
{
foreach
my
$notif
(
@$json
)
{
my
@data
s
;
my
@data
;
# Mandatory information
# Mandatory information
foreach
(
qw(date uid reference)
)
{
foreach
(
qw(date uid reference)
)
{
...
@@ -26,10 +26,10 @@ sub newNotification {
...
@@ -26,10 +26,10 @@ sub newNotification {
$self
->
logger
->
error
("
Attribute
$_
is missing
");
$self
->
logger
->
error
("
Attribute
$_
is missing
");
return
0
;
return
0
;
}
}
push
@data
s
,
$tmp
;
push
@data
,
$tmp
;
}
}
push
@data
s
,
(
$notif
->
{
condition
}
//
''
);
push
@data
,
(
$notif
->
{
condition
}
//
''
);
push
@notifs
,
[
@data
s
,
$jsonString
];
push
@notifs
,
[
@data
,
$jsonString
];
}
}
my
$count
;
my
$count
;
foreach
(
@notifs
)
{
foreach
(
@notifs
)
{
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/XML.pm
View file @
b2620c26
...
@@ -14,7 +14,7 @@ has parser => (
...
@@ -14,7 +14,7 @@ has parser => (
}
}
);
);
# Check XML data
s
and insert new notifications.
# Check XML data and insert new notifications.
# @param $xml XML string containing notification
# @param $xml XML string containing notification
# @return number of notifications done
# @return number of notifications done
sub
newNotification
{
sub
newNotification
{
...
@@ -29,7 +29,7 @@ sub newNotification {
...
@@ -29,7 +29,7 @@ sub newNotification {
foreach
foreach
my
$notif
(
$xml
->
documentElement
->
getElementsByTagName
('
notification
')
)
my
$notif
(
$xml
->
documentElement
->
getElementsByTagName
('
notification
')
)
{
{
my
@data
s
=
();
my
@data
=
();
# Mandatory information
# Mandatory information
foreach
(
qw(date uid reference)
)
{
foreach
(
qw(date uid reference)
)
{
...
@@ -38,16 +38,16 @@ sub newNotification {
...
@@ -38,16 +38,16 @@ sub newNotification {
$self
->
logger
->
error
("
Attribute
$_
is missing
");
$self
->
logger
->
error
("
Attribute
$_
is missing
");
return
0
;
return
0
;
}
}
push
@data
s
,
$tmp
;
push
@data
,
$tmp
;
}
}
# Other information
# Other information
foreach
(
qw(condition)
)
{
foreach
(
qw(condition)
)
{
my
$tmp
;
my
$tmp
;
if
(
$tmp
=
$notif
->
getAttribute
(
$_
)
)
{
if
(
$tmp
=
$notif
->
getAttribute
(
$_
)
)
{
push
@data
s
,
$tmp
;
push
@data
,
$tmp
;
}
}
else
{
push
@data
s
,
"";
}
else
{
push
@data
,
"";
}
}
}
my
$result
=
XML::LibXML::
Document
->
new
(
$version
,
$encoding
);
my
$result
=
XML::LibXML::
Document
->
new
(
$version
,
$encoding
);
...
@@ -56,7 +56,7 @@ sub newNotification {
...
@@ -56,7 +56,7 @@ sub newNotification {
$result
->
setDocumentElement
(
$root
);
$result
->
setDocumentElement
(
$root
);
$result
=
$result
->
serialize
;
$result
=
$result
->
serialize
;
utf8::
encode
(
$result
);
utf8::
encode
(
$result
);
push
@notifs
,
[
@data
s
,
$result
];
push
@notifs
,
[
@data
,
$result
];
}
}
my
$count
;
my
$count
;
foreach
(
@notifs
)
{
foreach
(
@notifs
)
{
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Request.pm
View file @
b2620c26
...
@@ -33,13 +33,13 @@ sub new {
...
@@ -33,13 +33,13 @@ sub new {
$self
->
env
->
{
PATH_INFO
}
||=
'
/
';
$self
->
env
->
{
PATH_INFO
}
||=
'
/
';
$self
->
{
uri
}
=
uri_unescape
(
$self
->
env
->
{
REQUEST_URI
}
);
$self
->
{
uri
}
=
uri_unescape
(
$self
->
env
->
{
REQUEST_URI
}
);
$self
->
{
uri
}
=~
s|^//+|/|g
;
$self
->
{
uri
}
=~
s|^//+|/|g
;
$self
->
{
data
s
}
=
{};
$self
->
{
data
}
=
{};
$self
->
{
error
}
=
0
;
$self
->
{
error
}
=
0
;
$self
->
{
respHeaders
}
=
[]
;
$self
->
{
respHeaders
}
=
[]
;
return
bless
(
$self
,
$_
[
0
]
);
return
bless
(
$self
,
$_
[
0
]
);
}
}
sub
data
s
{
$_
[
0
]
->
{
data
s
}
}
sub
data
{
$_
[
0
]
->
{
data
}
}
sub
uri
{
$_
[
0
]
->
{
uri
}
}
sub
uri
{
$_
[
0
]
->
{
uri
}
}
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/SOAPService.pm
View file @
b2620c26
...
@@ -20,12 +20,12 @@ sub new {
...
@@ -20,12 +20,12 @@ sub new {
return
bless
{
obj
=>
$obj
,
func
=>
\
@func
,
req
=>
$req
},
$class
;
return
bless
{
obj
=>
$obj
,
func
=>
\
@func
,
req
=>
$req
},
$class
;
}
}
## @method data
s
AUTOLOAD()
## @method data AUTOLOAD()
# Call the wanted function with the object given to the constructor.
# Call the wanted function with the object given to the constructor.
# AUTOLOAD() is a magic method called by Perl interpreter fon non existent
# AUTOLOAD() is a magic method called by Perl interpreter fon non existent
# functions. Here, we use it to call the wanted function (given by $AUTOLOAD)
# functions. Here, we use it to call the wanted function (given by $AUTOLOAD)
# if it is authorizated
# if it is authorizated
# @return data
s
provided by the exported function
# @return data provided by the exported function
sub
AUTOLOAD
{
sub
AUTOLOAD
{
my
$self
=
shift
;
my
$self
=
shift
;
$AUTOLOAD
=~
s/.*:://
;
$AUTOLOAD
=~
s/.*:://
;
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/ApacheMP2/Main.pm
View file @
b2620c26
...
@@ -162,7 +162,7 @@ sub redirectFilter {
...
@@ -162,7 +162,7 @@ sub redirectFilter {
while
(
$f
->
read
(
my
$buffer
,
1024
)
)
{
while
(
$f
->
read
(
my
$buffer
,
1024
)
)
{
}
}
$class
->
updateStatus
(
$f
->
r
,
'
$class->REDIRECT
',
$class
->
updateStatus
(
$f
->
r
,
'
$class->REDIRECT
',
$class
->
data
s
->
{
$class
->
tsv
->
{
whatToTrace
}
},
'
filter
'
);
$class
->
data
->
{
$class
->
tsv
->
{
whatToTrace
}
},
'
filter
'
);
return
$class
->
OK
;
return
$class
->
OK
;
}
}
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/ApacheMP2/Request.pm
View file @
b2620c26
...
@@ -62,9 +62,9 @@ sub new {
...
@@ -62,9 +62,9 @@ sub new {
return
$self
;
return
$self
;
}
}
sub
data
s
{
sub
data
{
my
(
$self
)
=
@_
;
my
(
$self
)
=
@_
;
return
$self
->
{
data
s
}
||=
{};
return
$self
->
{
data
}
||=
{};
}
}
1
;
1
;
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/PSGI.pm
View file @
b2620c26
...
@@ -169,7 +169,7 @@ sub _authAndTrace {
...
@@ -169,7 +169,7 @@ sub _authAndTrace {
}
}
## @method hashRef user()
## @method hashRef user()
# @return hash of user data
s
# @return hash of user data
sub
user
{
sub
user
{
my
(
$self
,
$req
)
=
@_
;
my
(
$self
,
$req
)
=
@_
;
return
$req
->
userData
return
$req
->
userData
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/SecureToken.pm
View file @
b2620c26
...
@@ -94,7 +94,7 @@ sub run {
...
@@ -94,7 +94,7 @@ sub run {
unless
$class
->
_isAlive
();
unless
$class
->
_isAlive
();
# Value to store
# Value to store
my
$value
=
$class
->
data
s
->
{
$secureTokenAttribute
};
my
$value
=
$class
->
data
->
{
$secureTokenAttribute
};
# Set token
# Set token
my
$key
=
$class
->
_setToken
(
$value
,
$secureTokenExpiration
);
my
$key
=
$class
->
_setToken
(
$value
,
$secureTokenExpiration
);
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/ZimbraPreAuth.pm
View file @
b2620c26
...
@@ -53,7 +53,7 @@ sub run {
...
@@ -53,7 +53,7 @@ sub run {
# Build URL
# Build URL
my
$zimbra_url
=
my
$zimbra_url
=
$class
->
_buildZimbraPreAuthUrl
(
$req
,
$zimbraPreAuthKey
,
$zimbraUrl
,
$class
->
_buildZimbraPreAuthUrl
(
$req
,
$zimbraPreAuthKey
,
$zimbraUrl
,
$class
->
data
s
->
{
$zimbraAccountKey
},
$class
->
data
->
{
$zimbraAccountKey
},
$zimbraBy
,
$timeout
);
$zimbraBy
,
$timeout
);
# Header location
# Header location
...
@@ -76,7 +76,7 @@ sub _buildZimbraPreAuthUrl {
...
@@ -76,7 +76,7 @@ sub _buildZimbraPreAuthUrl {
# Expiration time is calculated with _utime and timeout
# Expiration time is calculated with _utime and timeout
my
$expires
=
my
$expires
=
$timeout
?
(
$class
->
data
s
->
{
_utime
}
+
$timeout
)
*
1000
:
$timeout
;
$timeout
?
(
$class
->
data
->
{
_utime
}
+
$timeout
)
*
1000
:
$timeout
;
# Timestamp
# Timestamp
my
$timestamp
=
time
()
*
1000
;
my
$timestamp
=
time
()
*
1000
;
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Reload.pm
View file @
b2620c26
...
@@ -406,7 +406,7 @@ sub postUrlInit {
...
@@ -406,7 +406,7 @@ sub postUrlInit {
{
{
$class
->
tsv
->
{
maintenance
}
->
{
$vhost
}
=
1
;
$class
->
tsv
->
{
maintenance
}
->
{
$vhost
}
=
1
;
$class
->
logger
->
error
(
$class
->
logger
->
error
(
"
$class
: Unable to build post data
s
:
"
"
$class
: Unable to build post data:
"
.
$class
->
tsv
->
{
jail
}
->
error
);
.
$class
->
tsv
->
{
jail
}
->
error
);
}
}
...
@@ -552,7 +552,7 @@ sub substitute {
...
@@ -552,7 +552,7 @@ sub substitute {
$expr
=~
s/\$vhost\b/\$ENV{HTTP_HOST}/sg
;
$expr
=~
s/\$vhost\b/\$ENV{HTTP_HOST}/sg
;
$expr
=~
s/\$ip\b/\$ENV{REMOTE_ADDR}/sg
;
$expr
=~
s/\$ip\b/\$ENV{REMOTE_ADDR}/sg
;
# substitute vars with session data
s
, excepts special vars $_ and $\d+
# substitute vars with session data, excepts special vars $_ and $\d+
$expr
=~
s/\$(?!ENV)([_a-zA-Z]\w*)/\$s->{$1}/sg
;
$expr
=~
s/\$(?!ENV)([_a-zA-Z]\w*)/\$s->{$1}/sg
;
$expr
=~
s/\$ENV\{/\$r->{env}->\{/g
;
$expr
=~
s/\$ENV\{/\$r->{env}->\{/g
;
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Run.pm
View file @
b2620c26
...
@@ -160,7 +160,7 @@ sub run {
...
@@ -160,7 +160,7 @@ sub run {
# Store local macros
# Store local macros
if
(
keys
%$session
>
$kc
)
{
if
(
keys
%$session
>
$kc
)
{
$class
->
logger
->
debug
("
Update local cache
");
$class
->
logger
->
debug
("
Update local cache
");
$req
->
data
s
->
{
session
}
->
update
(
$session
,
{
updateCache
=>
2
}
);
$req
->
data
->
{
session
}
->
update
(
$session
,
{
updateCache
=>
2
}
);
}
}
# Hide Lemonldap::NG cookie
# Hide Lemonldap::NG cookie
...
@@ -435,16 +435,16 @@ sub retrieveSession {
...
@@ -435,16 +435,16 @@ sub retrieveSession {
# persistent connection).
# persistent connection).
# NB: timout is here the same value as current HTTP/1.1 Keep-Alive timeout
# NB: timout is here the same value as current HTTP/1.1 Keep-Alive timeout
# (15 seconds)
# (15 seconds)
if
(
defined
$class
->
data
s
->
{
_session_id
}
if
(
defined
$class
->
data
->
{
_session_id
}
and
$id
eq
$class
->
data
s
->
{
_session_id
}
and
$id
eq
$class
->
data
->
{
_session_id
}
and
(
$now
-
$class
->
data
s
Update
<
15
)
)