Merge branch 'v2.0'

This commit is contained in:
Christophe Maudoux 2019-09-27 22:33:00 +02:00
commit e612f53838
37 changed files with 175 additions and 90 deletions

View File

@ -318,13 +318,13 @@ $(SRCMANAGERDIR)/site/htdocs/static/js/%.js: $(SRCMANAGERDIR)/site/coffee/%.coff
uglifyjs $*.js --compress --mangle --comments='/Copyr/i' --source-map -o $*.min.js; \
fi
fastcgi-server/man/llng-fastcgi-server.1p: fastcgi-server/sbin/llng-fastcgi-server
fastcgi-server/man/llng-fastcgi-server.8p: fastcgi-server/sbin/llng-fastcgi-server
@echo Update FastCGI server man page
@pod2man -name llng-fastcgi-server fastcgi-server/sbin/llng-fastcgi-server >fastcgi-server/man/llng-fastcgi-server.1p
@pod2man -s 8 -name llng-fastcgi-server fastcgi-server/sbin/llng-fastcgi-server >fastcgi-server/man/llng-fastcgi-server.8p
# Perl libraries configuration
json: $(MANAGERJSONDST) fastcgi-server/man/llng-fastcgi-server.1p debian/*cron*
json: $(MANAGERJSONDST) fastcgi-server/man/llng-fastcgi-server.8p debian/*cron*
@if which yui-compressor >/dev/null; then $(MAKE) minify; fi
debian/liblemonldap-ng-handler-perl.cron.d: lemonldap-ng-handler/eg/scripts/purgeLocalCache.cron.d

View File

@ -2,6 +2,9 @@
# Apache configuration for LemonLDAP::NG Manager
#====================================================================
# Uncomment this if no previous NameVirtualHost declaration
#NameVirtualHost __VHOSTLISTEN__
# To insert LLNG user id in Apache logs, declare this format and use it in
# CustomLog directive
#LogFormat "%v:%p %h %l %{Lm-Remote-User}o %t \"%r\" %>s %O %{Lm-Remote-Custom}o" llng
@ -34,10 +37,10 @@
# (configuration, sessions, notifications) as manager.html, sessions.html,
# notifications.html and uncomment the 2 following lines:
# DirectoryIndex manager.html
# RewriteCond "%{REQUEST_FILENAME}" "!\.html$"
# RewriteCond "%{REQUEST_URI}" "!\.html(?:/.*)?$"
# REST URLs
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|lib|javascript|favicon).*"
RewriteCond "%{REQUEST_URI}" "!^/(?:static|doc|lib|javascript|favicon).*"
RewriteRule "^/(.+)$" "/manager.fcgi/$1" [PT]
# 2) FastCGI engine

View File

@ -17,6 +17,15 @@
#CustomLog __APACHELOGDIR__/manager.log llng
#ErrorLog __APACHELOGDIR__/lm_err.log
# Uncomment this if you are running behind a reverse proxy and want
# LemonLDAP::NG to see the real IP address of the end user
# Adjust the settings to match the IP address of your reverse proxy
# and the header containing the original IP address
#
#RemoteIPHeader X-Forwarded-For
#RemoteIPInternalProxy 127.0.0.1
# FASTCGI CONFIGURATION
# ---------------------
@ -28,10 +37,10 @@
# (configuration, sessions, notifications) as manager.html, sessions.html,
# notifications.html and uncomment the 2 following lines:
# DirectoryIndex manager.html
# RewriteCond "%{REQUEST_FILENAME}" "!\.html$"
# RewriteCond "%{REQUEST_URI}" "!\.html(?:/.*)?$"
# REST URLs
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|lib|javascript|favicon).*"
RewriteCond "%{REQUEST_URI}" "!^/(?:static|doc|lib|javascript|favicon).*"
RewriteRule "^/(.+)$" "/manager.fcgi/$1" [PT]
# 2) FastCGI engine

View File

@ -17,6 +17,15 @@
#CustomLog __APACHELOGDIR__/manager.log llng
#ErrorLog __APACHELOGDIR__/lm_err.log
# Uncomment this if you are running behind a reverse proxy and want
# LemonLDAP::NG to see the real IP address of the end user
# Adjust the settings to match the IP address of your reverse proxy
# and the header containing the original IP address
#
#RemoteIPHeader X-Forwarded-For
#RemoteIPInternalProxy 127.0.0.1
# FASTCGI CONFIGURATION
# ---------------------
@ -28,10 +37,10 @@
# (configuration, sessions, notifications) as manager.html, sessions.html,
# notifications.html and uncomment the 2 following lines:
# DirectoryIndex manager.html
# RewriteCond "%{REQUEST_FILENAME}" "!\.html$"
# RewriteCond "%{REQUEST_URI}" "!\.html(?:/.*)?$"
# REST URLs
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|lib|javascript|favicon).*"
RewriteCond "%{REQUEST_URI}" "!^/(?:static|doc|lib|javascript|favicon).*"
RewriteRule "^/(.+)$" "/manager.fcgi/$1" [PT]
# 2) FastCGI engine

View File

@ -30,8 +30,8 @@
# For performances, you can put static html files: simply put the HTML
# result (example: /oauth2/checksession.html) as static file. Then
# uncomment the following line.
# RewriteCond "%{REQUEST_FILENAME}" "!\.html$"
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:(?:static|javascript|favicon).*|.*\.fcgi)$"
# RewriteCond "%{REQUEST_URI}" "!\.html(?:/.*)?$"
RewriteCond "%{REQUEST_URI}" "!^/(?:(?:static|javascript|favicon).*|.*\.fcgi(?:/.*)?)$"
RewriteRule "^/(.+)$" "/index.fcgi/$1" [PT]
# Note that Content-Security-Policy header is generated by portal itself

View File

@ -31,8 +31,8 @@
# For performances, you can put static html files: simply put the HTML
# result (example: /oauth2/checksession.html) as static file. Then
# uncomment the following line.
# RewriteCond "%{REQUEST_FILENAME}" "!\.html$"
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:(?:static|javascript|favicon).*|.*\.fcgi)$"
# RewriteCond "%{REQUEST_URI}" "!\.html(?:/.*)?$"
RewriteCond "%{REQUEST_URI}" "!^/(?:(?:static|javascript|favicon).*|.*\.fcgi(?:/.*)?)$"
RewriteRule "^/(.+)$" "/index.fcgi/$1" [PT]
# Note that Content-Security-Policy header is generated by portal itself

View File

@ -26,8 +26,8 @@
# For performances, you can put static html files: simply put the HTML
# result (example: /oauth2/checksession.html) as static file. Then
# uncomment the following line.
# RewriteCond "%{REQUEST_FILENAME}" "!\.html$"
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:(?:static|javascript|favicon).*|.*\.fcgi)$"
# RewriteCond "%{REQUEST_URI}" "!\.html(?:/.*)?$"
RewriteCond "%{REQUEST_URI}" "!^/(?:(?:static|javascript|favicon).*|.*\.fcgi(?:/.*)?)$"
RewriteRule "^/(.+)$" "/index.fcgi/$1" [PT]
# Note that Content-Security-Policy header is generated by portal itself

3
debian/control vendored
View File

@ -271,7 +271,8 @@ Depends: ${misc:Depends},
libclone-perl,
liblemonldap-ng-handler-perl (= ${binary:Version}),
libtext-unidecode-perl,
libregexp-assemble-perl
libregexp-assemble-perl,
libemail-date-format-perl
Recommends: libcrypt-openssl-bignum-perl,
libconvert-base32-perl,
libemail-sender-perl (>=1.300027) | libemail-sender-transport-smtps-perl,

View File

@ -1 +1 @@
fastcgi-server/man/llng-fastcgi-server.1p
fastcgi-server/man/llng-fastcgi-server.8p

View File

@ -128,8 +128,8 @@
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "llng-fastcgi-server 1"
.TH llng-fastcgi-server 1 "2019-08-15" "perl v5.26.1" "User Contributed Perl Documentation"
.IX Title "llng-fastcgi-server 8"
.TH llng-fastcgi-server 8 "2019-09-24" "perl v5.28.1" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -15,8 +15,8 @@ our $VERSION = '2.1.0';
# Overload main run method
sub run {
my ( $class, $req ) = @_;
my $ret = $class->Lemonldap::NG::Handler::Main::run($req);
my ( $class, $req ) = @_;
my ( $ret, $session ) = $class->Lemonldap::NG::Handler::Main::run($req);
# Continue only if user is authorized
return $ret unless ( $ret == $class->OK );
@ -57,9 +57,8 @@ sub run {
$zimbraBy, $timeout );
# Header location
Lemonldap::NG::Handler::API->set_header_out( 'Location' => $zimbra_url );
$class->set_header_out( $req, 'Location' => $zimbra_url );
# Return $class->REDIRECT
return $class->REDIRECT;
}

View File

@ -3809,7 +3809,7 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
'v' => 'ServiceToken'
},
{
'k' => 'Zimbra',
'k' => 'ZimbraPreAuth',
'v' => 'ZimbraPreAuth'
}
],

View File

@ -2032,7 +2032,7 @@ sub attributes {
{ k => 'OAuth2', v => 'OAuth2' },
{ k => 'SecureToken', v => 'SecureToken' },
{ k => 'ServiceToken', v => 'ServiceToken' },
{ k => 'Zimbra', v => 'ZimbraPreAuth' },
{ k => 'ZimbraPreAuth',v => 'ZimbraPreAuth' },
],
default => 'Main',
documentation => 'Handler type',

View File

@ -47,7 +47,7 @@ llapp.controller 'DiffCtrl', [ '$scope', '$http', '$q', '$translator', '$locatio
# Function to change interface language
$scope.getLanguage = (lang) ->
$scope.lang = lang
$scope.init()
init()
$scope.showM = false
# function `getCfg(b,n)`:
@ -80,15 +80,25 @@ llapp.controller 'DiffCtrl', [ '$scope', '$http', '$q', '$translator', '$locatio
init = ->
$scope.message = null
$scope.currentNode = null
d = $q.defer()
$http.get("#{scriptname}diff/#{$scope.cfg[0].cfgNum}/#{$scope.cfg[1].cfgNum}").then (response) ->
data = []
data = readDiff(response.data[0],response.data[1])
$scope.data = buildTree(data)
$scope.message = ''
$scope.waiting = false
, (response) ->
$scope.message = "#{$scope.translate('error')} : #{response.statusLine}"
$q.all [
$translator.init $scope.lang
$http.get("#{staticPrefix}reverseTree.json").then (response) ->
reverseTree = response.data
console.log "Structure loaded"
]
.then ->
d = $q.defer()
$http.get("#{scriptname}diff/#{$scope.cfg[0].cfgNum}/#{$scope.cfg[1].cfgNum}").then (response) ->
data = []
data = readDiff(response.data[0],response.data[1])
$scope.data = buildTree(data)
$scope.message = ''
$scope.waiting = false
, (response) ->
$scope.message = "#{$scope.translate('error')} : #{response.statusLine}"
# Colorized link
$scope.activeModule = "conf"
$scope.myStyle = {color: '#ffb84d'}
readDiff = (c1,c2,tr=true) ->
res = []

View File

@ -47,7 +47,7 @@ llapp.controller 'DiffCtrl', [ '$scope', '$http', '$q', '$translator', '$locatio
# Function to change interface language
$scope.getLanguage = (lang) ->
$scope.lang = lang
$scope.init()
init()
$scope.showM = false
# function `getCfg(b,n)`:
@ -80,16 +80,25 @@ llapp.controller 'DiffCtrl', [ '$scope', '$http', '$q', '$translator', '$locatio
init = ->
$scope.message = null
$scope.currentNode = null
d = $q.defer()
$http.get("#{scriptname}view/diff/#{$scope.cfg[0].cfgNum}/#{$scope.cfg[1].cfgNum}").then (response) ->
data = []
data = readDiff(response.data[0],response.data[1])
$scope.data = buildTree(data)
$scope.message = ''
$scope.waiting = false
, (response) ->
$scope.message = "#{$scope.translate('error')} : #{response.statusLine}"
$q.all [
$translator.init $scope.lang
$http.get("#{staticPrefix}reverseTree.json").then (response) ->
reverseTree = response.data
console.log "Structure loaded"
]
.then ->
d = $q.defer()
$http.get("#{scriptname}view/diff/#{$scope.cfg[0].cfgNum}/#{$scope.cfg[1].cfgNum}").then (response) ->
data = []
data = readDiff(response.data[0],response.data[1])
$scope.data = buildTree(data)
$scope.message = ''
$scope.waiting = false
, (response) ->
$scope.message = "#{$scope.translate('error')} : #{response.statusLine}"
# Colorized link
$scope.activeModule = "viewer"
$scope.myStyle = {color: '#ffb84d'}
readDiff = (c1,c2,tr=true) ->
res = []
for k,v of c1

View File

@ -1192,7 +1192,7 @@ function templates(tpl,key) {
"v" : "ServiceToken"
},
{
"k" : "Zimbra",
"k" : "ZimbraPreAuth",
"v" : "ZimbraPreAuth"
}
],

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.12.8
// Generated by CoffeeScript 1.12.7
/*
diff.html script
@ -58,7 +58,7 @@ diff.html script
};
$scope.getLanguage = function(lang) {
$scope.lang = lang;
$scope.init();
init();
return $scope.showM = false;
};
getCfg = function(b, n) {
@ -86,20 +86,32 @@ diff.html script
return d.promise;
};
init = function() {
var d;
$scope.message = null;
$scope.currentNode = null;
d = $q.defer();
return $http.get(scriptname + "diff/" + $scope.cfg[0].cfgNum + "/" + $scope.cfg[1].cfgNum).then(function(response) {
var data;
data = [];
data = readDiff(response.data[0], response.data[1]);
$scope.data = buildTree(data);
$scope.message = '';
return $scope.waiting = false;
}, function(response) {
return $scope.message = ($scope.translate('error')) + " : " + response.statusLine;
$q.all([
$translator.init($scope.lang), $http.get(staticPrefix + "reverseTree.json").then(function(response) {
var reverseTree;
reverseTree = response.data;
return console.log("Structure loaded");
})
]).then(function() {
var d;
d = $q.defer();
return $http.get(scriptname + "diff/" + $scope.cfg[0].cfgNum + "/" + $scope.cfg[1].cfgNum).then(function(response) {
var data;
data = [];
data = readDiff(response.data[0], response.data[1]);
$scope.data = buildTree(data);
$scope.message = '';
return $scope.waiting = false;
}, function(response) {
return $scope.message = ($scope.translate('error')) + " : " + response.statusLine;
});
});
$scope.activeModule = "conf";
return $scope.myStyle = {
color: '#ffb84d'
};
};
readDiff = function(c1, c2, tr) {
var k, res, tmp, v;

View File

@ -1 +1 @@
(function(){angular.module("llngConfDiff",["ui.tree","ui.bootstrap","llApp","ngCookies"],function(t){return t.digestTtl(15)}).controller("DiffCtrl",["$scope","$http","$q","$translator","$location",function(p,o,l,r,i){var n,u,c,t,s,h,f;return p.links=links,p.menulinks=menulinks,p.staticPrefix=staticPrefix,p.scriptname=scriptname,p.availableLanguages=availableLanguages,p.waiting=!0,p.showM=!1,p.cfg=[],p.data={},p.currentNode=null,p.translateTitle=function(t){return r.translateField(t,"title")},p.translateP=r.translateP,p.translate=r.translate,p.toggle=function(t){return t.toggle()},p.stoggle=function(t,e){return p.currentNode=e,t.toggle()},p.menuClick=function(t){if(t.popup)window.open(t.popup);else switch(t.action||(t.action=t.title),typeof t.action){case"function":t.action(p.currentNode,p);break;case"string":p[t.action]();break;default:console.log(typeof t.action)}return p.showM=!1},p.getLanguage=function(t){return p.lang=t,p.init(),p.showM=!1},u=function(n,a){var r;return r=l.defer(),null==p.cfg[n]||p.cfg[n]!==a?o.get(""+confPrefix+a).then(function(t){var e;return t&&t.data?(p.cfg[n]=t.data,e=new Date(1e3*t.data.cfgDate),p.cfg[n].date=e.toLocaleString(),console.log("Metadatas of cfg "+a+" loaded"),r.resolve("OK")):r.reject(t)},function(t){return console.log(t),r.reject("NOK")}):r.resolve(),r.promise},c=function(){return p.message=null,p.currentNode=null,l.defer(),o.get(scriptname+"diff/"+p.cfg[0].cfgNum+"/"+p.cfg[1].cfgNum).then(function(t){var e;return[],e=s(t.data[0],t.data[1]),p.data=n(e),p.message="",p.waiting=!1},function(t){return p.message=p.translate("error")+" : "+t.statusLine})},s=function(t,e,n){var a,r,o,l;for(a in null==n&&(n=!0),r=[],t)l=t[a],o=n?{title:p.translate(a),id:a}:{title:a},a.match(/^cfg(?:Num|Log|Author(?:IP)?|Date)$/)||(null!=l&&"object"==typeof l?"array"===l.constructor?(o.oldvalue=l,o.newvalue=e[a]):"object"==typeof e[a]?o.nodes=s(t[a],e[a],!1):o.oldnodes=f(l,"old"):(o.oldvalue=l,o.newvalue=e[a]),r.push(o));for(a in e)l=e[a],a.match(/^cfg(?:Num|Log|Author(?:IP)?|Date)$/)||null!=t[a]||(o=n?{title:p.translate(a),id:a}:{title:a},null!=l&&"object"==typeof l?"array"===l.constructor?o.newvalue=l:(console.log("Iteration"),o.newnodes=f(l,"new")):o.newvalue=l,r.push(o));return r},f=function(t,e){var n,a,r,o;for(n in a=[],t)r={title:n},"object"==typeof(o=t[n])?"array"===o.constructor?r[e+"value"]=o:r[e+"nodes"]=f(t[n],e):r[e+"value"]=o,a.push(r);return a},h=[],n=function(t){var e,n,a,r,o,l,i,u,c,s,f,g,d;if(null==h)return t;for(d=[],r=0,l=t.length;r<l;r++){for(e=t[r],f=d,o=0,i=(g=null!=h[e.id]?h[e.id].split("/"):"").length;o<i;o++)if(0<(s=g[o]).length)if(f.length){for(n=-1,a=c=0,u=f.length;c<u;a=++c)f[a].id===s&&(n=a);f=-1!==n?f[n].nodes:(f.push({id:s,title:p.translate(s),nodes:[]}),f[f.length-1].nodes)}else f.push({id:s,title:p.translate(s),nodes:[]}),f=f[0].nodes;f.push(e)}return d},p.newDiff=function(){return i.path("/"+p.cfg[0].cfgNum+"/"+p.cfg[1].cfgNum)},t=function(t,e,n){var a;return null===(a=e.match(new RegExp("#!?/(latest|[0-9]+)(?:/(latest|[0-9]+))?$")))?i.path("/latest"):(p.waiting=!0,l.all([r.init(p.lang),o.get(staticPrefix+"reverseTree.json").then(function(t){return h=t.data,console.log("Structure loaded")}),u(0,a[1]),null!=a[2]?u(1,a[2]):void 0]).then(function(){return null!=a[2]?c():p.cfg[0].prev?(p.cfg[1]=p.cfg[0],u(0,p.cfg[1].prev).then(function(){return c()})):(p.data=[],p.waiting=!1)},function(){return p.message=p.translate("error"),p.waiting=!1})),!0},p.$on("$locationChangeSuccess",t)}])}).call(this);
(function(){angular.module("llngConfDiff",["ui.tree","ui.bootstrap","llApp","ngCookies"],function(t){return t.digestTtl(15)}).controller("DiffCtrl",["$scope","$http","$q","$translator","$location",function(p,o,l,a,u){var n,i,c,t,s,h,f;return p.links=links,p.menulinks=menulinks,p.staticPrefix=staticPrefix,p.scriptname=scriptname,p.availableLanguages=availableLanguages,p.waiting=!0,p.showM=!1,p.cfg=[],p.data={},p.currentNode=null,p.translateTitle=function(t){return a.translateField(t,"title")},p.translateP=a.translateP,p.translate=a.translate,p.toggle=function(t){return t.toggle()},p.stoggle=function(t,e){return p.currentNode=e,t.toggle()},p.menuClick=function(t){if(t.popup)window.open(t.popup);else switch(t.action||(t.action=t.title),typeof t.action){case"function":t.action(p.currentNode,p);break;case"string":p[t.action]();break;default:console.log(typeof t.action)}return p.showM=!1},p.getLanguage=function(t){return p.lang=t,c(),p.showM=!1},i=function(n,r){var a;return a=l.defer(),null==p.cfg[n]||p.cfg[n]!==r?o.get(""+confPrefix+r).then(function(t){var e;return t&&t.data?(p.cfg[n]=t.data,e=new Date(1e3*t.data.cfgDate),p.cfg[n].date=e.toLocaleString(),console.log("Metadatas of cfg "+r+" loaded"),a.resolve("OK")):a.reject(t)},function(t){return console.log(t),a.reject("NOK")}):a.resolve(),a.promise},c=function(){return p.message=null,p.currentNode=null,l.all([a.init(p.lang),o.get(staticPrefix+"reverseTree.json").then(function(t){return t.data,console.log("Structure loaded")})]).then(function(){return l.defer(),o.get(scriptname+"diff/"+p.cfg[0].cfgNum+"/"+p.cfg[1].cfgNum).then(function(t){var e;return[],e=s(t.data[0],t.data[1]),p.data=n(e),p.message="",p.waiting=!1},function(t){return p.message=p.translate("error")+" : "+t.statusLine})}),p.activeModule="conf",p.myStyle={color:"#ffb84d"}},s=function(t,e,n){var r,a,o,l;for(r in null==n&&(n=!0),a=[],t)l=t[r],o=n?{title:p.translate(r),id:r}:{title:r},r.match(/^cfg(?:Num|Log|Author(?:IP)?|Date)$/)||(null!=l&&"object"==typeof l?"array"===l.constructor?(o.oldvalue=l,o.newvalue=e[r]):"object"==typeof e[r]?o.nodes=s(t[r],e[r],!1):o.oldnodes=f(l,"old"):(o.oldvalue=l,o.newvalue=e[r]),a.push(o));for(r in e)l=e[r],r.match(/^cfg(?:Num|Log|Author(?:IP)?|Date)$/)||null!=t[r]||(o=n?{title:p.translate(r),id:r}:{title:r},null!=l&&"object"==typeof l?"array"===l.constructor?o.newvalue=l:(console.log("Iteration"),o.newnodes=f(l,"new")):o.newvalue=l,a.push(o));return a},f=function(t,e){var n,r,a,o;for(n in r=[],t)a={title:n},"object"==typeof(o=t[n])?"array"===o.constructor?a[e+"value"]=o:a[e+"nodes"]=f(t[n],e):a[e+"value"]=o,r.push(a);return r},h=[],n=function(t){var e,n,r,a,o,l,u,i,c,s,f,g,d;if(null==h)return t;for(d=[],a=0,l=t.length;a<l;a++){for(e=t[a],f=d,o=0,u=(g=null!=h[e.id]?h[e.id].split("/"):"").length;o<u;o++)if(0<(s=g[o]).length)if(f.length){for(n=-1,r=c=0,i=f.length;c<i;r=++c)f[r].id===s&&(n=r);f=-1!==n?f[n].nodes:(f.push({id:s,title:p.translate(s),nodes:[]}),f[f.length-1].nodes)}else f.push({id:s,title:p.translate(s),nodes:[]}),f=f[0].nodes;f.push(e)}return d},p.newDiff=function(){return u.path("/"+p.cfg[0].cfgNum+"/"+p.cfg[1].cfgNum)},t=function(t,e,n){var r;return null===(r=e.match(new RegExp("#!?/(latest|[0-9]+)(?:/(latest|[0-9]+))?$")))?u.path("/latest"):(p.waiting=!0,l.all([a.init(p.lang),o.get(staticPrefix+"reverseTree.json").then(function(t){return h=t.data,console.log("Structure loaded")}),i(0,r[1]),null!=r[2]?i(1,r[2]):void 0]).then(function(){return null!=r[2]?c():p.cfg[0].prev?(p.cfg[1]=p.cfg[0],i(0,p.cfg[1].prev).then(function(){return c()})):(p.data=[],p.waiting=!1)},function(){return p.message=p.translate("error"),p.waiting=!1})),!0},p.$on("$locationChangeSuccess",t)}])}).call(this);

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.12.8
// Generated by CoffeeScript 1.12.7
/*
diff.html script
@ -58,7 +58,7 @@ diff.html script
};
$scope.getLanguage = function(lang) {
$scope.lang = lang;
$scope.init();
init();
return $scope.showM = false;
};
getCfg = function(b, n) {
@ -86,20 +86,32 @@ diff.html script
return d.promise;
};
init = function() {
var d;
$scope.message = null;
$scope.currentNode = null;
d = $q.defer();
return $http.get(scriptname + "view/diff/" + $scope.cfg[0].cfgNum + "/" + $scope.cfg[1].cfgNum).then(function(response) {
var data;
data = [];
data = readDiff(response.data[0], response.data[1]);
$scope.data = buildTree(data);
$scope.message = '';
return $scope.waiting = false;
}, function(response) {
return $scope.message = ($scope.translate('error')) + " : " + response.statusLine;
$q.all([
$translator.init($scope.lang), $http.get(staticPrefix + "reverseTree.json").then(function(response) {
var reverseTree;
reverseTree = response.data;
return console.log("Structure loaded");
})
]).then(function() {
var d;
d = $q.defer();
return $http.get(scriptname + "view/diff/" + $scope.cfg[0].cfgNum + "/" + $scope.cfg[1].cfgNum).then(function(response) {
var data;
data = [];
data = readDiff(response.data[0], response.data[1]);
$scope.data = buildTree(data);
$scope.message = '';
return $scope.waiting = false;
}, function(response) {
return $scope.message = ($scope.translate('error')) + " : " + response.statusLine;
});
});
$scope.activeModule = "viewer";
return $scope.myStyle = {
color: '#ffb84d'
};
};
readDiff = function(c1, c2, tr) {
var k, res, tmp, v;

View File

@ -1 +1 @@
(function(){angular.module("llngConfDiff",["ui.tree","ui.bootstrap","llApp","ngCookies"],function(t){return t.digestTtl(15)}).controller("DiffCtrl",["$scope","$http","$q","$translator","$location",function(p,o,l,r,i){var n,u,c,t,s,h,f;return p.links=links,p.menulinks=menulinks,p.staticPrefix=staticPrefix,p.scriptname=scriptname,p.availableLanguages=availableLanguages,p.waiting=!0,p.showM=!1,p.cfg=[],p.data={},p.currentNode=null,p.translateTitle=function(t){return r.translateField(t,"title")},p.translateP=r.translateP,p.translate=r.translate,p.toggle=function(t){return t.toggle()},p.stoggle=function(t,e){return p.currentNode=e,t.toggle()},p.menuClick=function(t){if(t.popup)window.open(t.popup);else switch(t.action||(t.action=t.title),typeof t.action){case"function":t.action(p.currentNode,p);break;case"string":p[t.action]();break;default:console.log(typeof t.action)}return p.showM=!1},p.getLanguage=function(t){return p.lang=t,p.init(),p.showM=!1},u=function(n,a){var r;return r=l.defer(),null==p.cfg[n]||p.cfg[n]!==a?o.get(""+confPrefix+a).then(function(t){var e;return t&&t.data?(p.cfg[n]=t.data,e=new Date(1e3*t.data.cfgDate),p.cfg[n].date=e.toLocaleString(),console.log("Metadatas of cfg "+a+" loaded"),r.resolve("OK")):r.reject(t)},function(t){return console.log(t),r.reject("NOK")}):r.resolve(),r.promise},c=function(){return p.message=null,p.currentNode=null,l.defer(),o.get(scriptname+"view/diff/"+p.cfg[0].cfgNum+"/"+p.cfg[1].cfgNum).then(function(t){var e;return[],e=s(t.data[0],t.data[1]),p.data=n(e),p.message="",p.waiting=!1},function(t){return p.message=p.translate("error")+" : "+t.statusLine})},s=function(t,e,n){var a,r,o,l;for(a in null==n&&(n=!0),r=[],t)l=t[a],o=n?{title:p.translate(a),id:a}:{title:a},a.match(/^cfg(?:Num|Log|Author(?:IP)?|Date)$/)||(null!=l&&"object"==typeof l?"array"===l.constructor?(o.oldvalue=l,o.newvalue=e[a]):"object"==typeof e[a]?o.nodes=s(t[a],e[a],!1):o.oldnodes=f(l,"old"):(o.oldvalue=l,o.newvalue=e[a]),r.push(o));for(a in e)l=e[a],a.match(/^cfg(?:Num|Log|Author(?:IP)?|Date)$/)||null!=t[a]||(o=n?{title:p.translate(a),id:a}:{title:a},null!=l&&"object"==typeof l?"array"===l.constructor?o.newvalue=l:(console.log("Iteration"),o.newnodes=f(l,"new")):o.newvalue=l,r.push(o));return r},f=function(t,e){var n,a,r,o;for(n in a=[],t)r={title:n},"object"==typeof(o=t[n])?"array"===o.constructor?r[e+"value"]=o:r[e+"nodes"]=f(t[n],e):r[e+"value"]=o,a.push(r);return a},h=[],n=function(t){var e,n,a,r,o,l,i,u,c,s,f,g,d;if(null==h)return t;for(d=[],r=0,l=t.length;r<l;r++){for(e=t[r],f=d,o=0,i=(g=null!=h[e.id]?h[e.id].split("/"):"").length;o<i;o++)if(0<(s=g[o]).length)if(f.length){for(n=-1,a=c=0,u=f.length;c<u;a=++c)f[a].id===s&&(n=a);f=-1!==n?f[n].nodes:(f.push({id:s,title:p.translate(s),nodes:[]}),f[f.length-1].nodes)}else f.push({id:s,title:p.translate(s),nodes:[]}),f=f[0].nodes;f.push(e)}return d},p.newDiff=function(){return i.path("/"+p.cfg[0].cfgNum+"/"+p.cfg[1].cfgNum)},t=function(t,e,n){var a;return null===(a=e.match(new RegExp("#!?/(latest|[0-9]+)(?:/(latest|[0-9]+))?$")))?i.path("/latest"):(p.waiting=!0,l.all([r.init(p.lang),o.get(staticPrefix+"reverseTree.json").then(function(t){return h=t.data,console.log("Structure loaded")}),u(0,a[1]),null!=a[2]?u(1,a[2]):void 0]).then(function(){return null!=a[2]?c():p.cfg[0].prev?(p.cfg[1]=p.cfg[0],u(0,p.cfg[1].prev).then(function(){return c()})):(p.data=[],p.waiting=!1)},function(){return p.message=p.translate("error"),p.waiting=!1})),!0},p.$on("$locationChangeSuccess",t)}])}).call(this);
(function(){angular.module("llngConfDiff",["ui.tree","ui.bootstrap","llApp","ngCookies"],function(t){return t.digestTtl(15)}).controller("DiffCtrl",["$scope","$http","$q","$translator","$location",function(p,o,l,a,i){var n,u,c,t,s,h,f;return p.links=links,p.menulinks=menulinks,p.staticPrefix=staticPrefix,p.scriptname=scriptname,p.availableLanguages=availableLanguages,p.waiting=!0,p.showM=!1,p.cfg=[],p.data={},p.currentNode=null,p.translateTitle=function(t){return a.translateField(t,"title")},p.translateP=a.translateP,p.translate=a.translate,p.toggle=function(t){return t.toggle()},p.stoggle=function(t,e){return p.currentNode=e,t.toggle()},p.menuClick=function(t){if(t.popup)window.open(t.popup);else switch(t.action||(t.action=t.title),typeof t.action){case"function":t.action(p.currentNode,p);break;case"string":p[t.action]();break;default:console.log(typeof t.action)}return p.showM=!1},p.getLanguage=function(t){return p.lang=t,c(),p.showM=!1},u=function(n,r){var a;return a=l.defer(),null==p.cfg[n]||p.cfg[n]!==r?o.get(""+confPrefix+r).then(function(t){var e;return t&&t.data?(p.cfg[n]=t.data,e=new Date(1e3*t.data.cfgDate),p.cfg[n].date=e.toLocaleString(),console.log("Metadatas of cfg "+r+" loaded"),a.resolve("OK")):a.reject(t)},function(t){return console.log(t),a.reject("NOK")}):a.resolve(),a.promise},c=function(){return p.message=null,p.currentNode=null,l.all([a.init(p.lang),o.get(staticPrefix+"reverseTree.json").then(function(t){return t.data,console.log("Structure loaded")})]).then(function(){return l.defer(),o.get(scriptname+"view/diff/"+p.cfg[0].cfgNum+"/"+p.cfg[1].cfgNum).then(function(t){var e;return[],e=s(t.data[0],t.data[1]),p.data=n(e),p.message="",p.waiting=!1},function(t){return p.message=p.translate("error")+" : "+t.statusLine})}),p.activeModule="viewer",p.myStyle={color:"#ffb84d"}},s=function(t,e,n){var r,a,o,l;for(r in null==n&&(n=!0),a=[],t)l=t[r],o=n?{title:p.translate(r),id:r}:{title:r},r.match(/^cfg(?:Num|Log|Author(?:IP)?|Date)$/)||(null!=l&&"object"==typeof l?"array"===l.constructor?(o.oldvalue=l,o.newvalue=e[r]):"object"==typeof e[r]?o.nodes=s(t[r],e[r],!1):o.oldnodes=f(l,"old"):(o.oldvalue=l,o.newvalue=e[r]),a.push(o));for(r in e)l=e[r],r.match(/^cfg(?:Num|Log|Author(?:IP)?|Date)$/)||null!=t[r]||(o=n?{title:p.translate(r),id:r}:{title:r},null!=l&&"object"==typeof l?"array"===l.constructor?o.newvalue=l:(console.log("Iteration"),o.newnodes=f(l,"new")):o.newvalue=l,a.push(o));return a},f=function(t,e){var n,r,a,o;for(n in r=[],t)a={title:n},"object"==typeof(o=t[n])?"array"===o.constructor?a[e+"value"]=o:a[e+"nodes"]=f(t[n],e):a[e+"value"]=o,r.push(a);return r},h=[],n=function(t){var e,n,r,a,o,l,i,u,c,s,f,g,d;if(null==h)return t;for(d=[],a=0,l=t.length;a<l;a++){for(e=t[a],f=d,o=0,i=(g=null!=h[e.id]?h[e.id].split("/"):"").length;o<i;o++)if(0<(s=g[o]).length)if(f.length){for(n=-1,r=c=0,u=f.length;c<u;r=++c)f[r].id===s&&(n=r);f=-1!==n?f[n].nodes:(f.push({id:s,title:p.translate(s),nodes:[]}),f[f.length-1].nodes)}else f.push({id:s,title:p.translate(s),nodes:[]}),f=f[0].nodes;f.push(e)}return d},p.newDiff=function(){return i.path("/"+p.cfg[0].cfgNum+"/"+p.cfg[1].cfgNum)},t=function(t,e,n){var r;return null===(r=e.match(new RegExp("#!?/(latest|[0-9]+)(?:/(latest|[0-9]+))?$")))?i.path("/latest"):(p.waiting=!0,l.all([a.init(p.lang),o.get(staticPrefix+"reverseTree.json").then(function(t){return h=t.data,console.log("Structure loaded")}),u(0,r[1]),null!=r[2]?u(1,r[2]):void 0]).then(function(){return null!=r[2]?c():p.cfg[0].prev?(p.cfg[1]=p.cfg[0],u(0,p.cfg[1].prev).then(function(){return c()})):(p.data=[],p.waiting=!1)},function(){return p.message=p.translate("error"),p.waiting=!1})),!0},p.$on("$locationChangeSuccess",t)}])}).call(this);

File diff suppressed because one or more lines are too long

View File

@ -1078,4 +1078,4 @@
"samlRelayStateTimeout":"تناوب حالة مهلة الجلسة ",
"samlUseQueryStringSpecific":"استخدام أسلوب query_string المعين",
"samlOverrideIDPEntityID":"Override Entity ID when acting as IDP"
}
}

View File

@ -1077,4 +1077,4 @@
"samlRelayStateTimeout":"RelayState session timeout",
"samlUseQueryStringSpecific":"Use specific query_string method",
"samlOverrideIDPEntityID":"Override Entity ID when acting as IDP"
}
}

View File

@ -1077,4 +1077,4 @@
"samlRelayStateTimeout":"Timeout di sessione di RelayState",
"samlUseQueryStringSpecific":"Utilizza il metodo specifico query_string",
"samlOverrideIDPEntityID":"Sostituisci l'ID entità quando agisce come IDP"
}
}

View File

@ -1077,4 +1077,4 @@
"samlRelayStateTimeout":"Thời gian hết hạn phiên RelayState ",
"samlUseQueryStringSpecific":"Sử dụng phương pháp query_string cụ thể",
"samlOverrideIDPEntityID":"Override Entity ID when acting as IDP"
}
}

View File

@ -1077,4 +1077,4 @@
"samlRelayStateTimeout":"RelayState session timeout",
"samlUseQueryStringSpecific":"Use specific query_string method",
"samlOverrideIDPEntityID":"Override Entity ID when acting as IDP"
}
}

View File

@ -16,7 +16,7 @@
<aside id="left" class="col-lg-4 col-md-4 col-sm-5 col-xs-12 scrollable " ng-class="{'hidden-xs':!showT}" role="complementary">
<div class="panel panel-default">
<div class="panel-heading">
<p class="panel-title text-center" trspan="diffViewer"></p>
<p class="panel-title text-center"> {{translate('diffViewer')}} </p>
</div>
<div class="panel-body">
<div class="input-group input-group-sm">

View File

@ -94,7 +94,7 @@
</table>
</div>
<div ng-if="!node.nodes">
<th ng-if="node.td!='1' && node.td!='2'">{{translate(node.title)}}</th>
<th ng-if="node.td!='1' && node.td!='2'">{{node.title}}</th>
<td class="data-{{node.epoch}}" ng-if="node.td>='1'">{{node.title}}</td>
<th ng-if="node.title=='type' || node.title=='rp'">{{translate(node.value)}}</th>
<td id="v-{{node.title}}" class="col-md-4 data-{{node.epoch}}" ng-if="node.title!='type' && node.title!='rp'">{{node.value}}</td>

View File

@ -16,7 +16,7 @@
<aside id="left" class="col-lg-4 col-md-4 col-sm-5 col-xs-12 scrollable " ng-class="{'hidden-xs':!showT}" role="complementary">
<div class="panel panel-default">
<div class="panel-heading">
<p class="panel-title text-center" trspan="diffViewer"></p>
<p class="panel-title text-center"> {{translate('diffViewer')}} </p>
</div>
<div class="panel-body">
<div class="input-group input-group-sm">

View File

@ -11,6 +11,7 @@ use JSON qw(from_json);
use MIME::Entity;
use Email::Sender::Simple qw(sendmail);
use Email::Sender::Transport::SMTP qw();
use Email::Date::Format qw(email_date);
use MIME::Base64;
use Encode;
@ -186,6 +187,7 @@ sub send_mail {
),
Subject => $subject,
Type => 'multipart/related',
Date => email_date,
);
# Attach HTML message
@ -217,6 +219,7 @@ sub send_mail {
Data => $body,
Type => 'text/plain',
Charset => $self->charset,
Date => email_date,
);
}

View File

@ -117,7 +117,7 @@ sub run {
# Update spoof session
$self->logger->debug("Populating spoof session...");
foreach (qw (_auth _userDB)) {
foreach (qw (_auth _userDB authenticationLevel)) {
$self->logger->debug("Processing $_...");
$spoofSession->{$_} = $realSession->{"$self->{conf}->{impersonationPrefix}$_"};
}

View File

@ -18,7 +18,7 @@
<span class="input-group-text"><i class="fa fa-lock"></i> </span>
</div>
<TMPL_IF NAME="DONT_STORE_PASSWORD">
<input name="password" type="text" class="form-control key" trplaceholder="password" autocomplete="off" required aria-required="true" aria-hidden="true"/>
<input name="password" type="text" class="form-control key" autocomplete="off" required aria-required="true" aria-hidden="true"/>
<TMPL_ELSE>
<input name="password" type="password" class="form-control" trplaceholder="password" required aria-required="true"/>
</TMPL_IF>

View File

@ -0,0 +1,18 @@
{
"accountCreated":"Akaun anda telah dicipta, kata laluan sementara anda telah dihantar ke alamat emel anda.",
"autoMail":"Emel ini telah dihantar secara automatik",
"click2Register":"Klik di sini untuk mengesahkan akaun anda",
"click2Reset":"Kilik disini untuk menetapkan semula kata laluan anda",
"hello":"Hello",
"mail2fSubject":"[LemonLDAP::NG] Kod login anda",
"mailConfirmSubject":"[LemonLDAP::NG] Pengesahan penetapan semula kata laluan",
"mailSubject":"[LemonLDAP::NG] Kata laluan baru anda",
"newPwdIs":"Kata laluan baru anda ialah",
"pwdChanged":"Kata laluan anda telah ditukar",
"pwdIs":"Kata laluan anda ialah",
"registerConfirmSubject":"[LemonLDAP::NG] Pengesahan pendaftaran akaun",
"registerDoneSubject":"[LemonLDAP::NG] Akaun baru anda",
"requestIssuedFromIP":"Permintaan itu dari alamat IP",
"yourLoginCodeIs":"Kod login anda ialah",
"yourLoginIs":"Login anda ialah"
}

View File

@ -34,7 +34,7 @@ SKIP: {
my ( $host, $url, $query ) = expectForm( $res, '#', undef, 'token' );
ok(
$res->[2]->[0] =~
m%<input name="password" type="text" class="form-control key" trplaceholder="password" autocomplete="off" required aria-required="true" aria-hidden="true"/>%,
m%<input name="password" type="text" class="form-control key" autocomplete="off" required aria-required="true" aria-hidden="true"/>%,
'Password: Found text input'
);