Commit 8304a480 authored by Clément OUDOT's avatar Clément OUDOT

Remove trustedProxies option (#1612)

parent 5f800003
......@@ -258,14 +258,6 @@ sub setDefault {
$conf->{$k} //= $defaultValues->{$k};
}
# Convert old option useXForwardedForIP into trustedProxies
if ( defined $conf->{useXForwardedForIP}
and $conf->{useXForwardedForIP} == 1 )
{
$conf->{trustedProxies} = '*';
delete $conf->{useXForwardedForIP};
}
# Some parameters expect key name (example), not variable ($example)
if ( defined $conf->{whatToTrace} ) {
$conf->{whatToTrace} =~ s/^\$//;
......
......@@ -276,7 +276,6 @@ sub defaultValues {
'totp2fRange' => 1,
'totp2fSelfRegistration' => 0,
'totp2fUserCanRemoveKey' => 1,
'trustedProxies' => '',
'twitterAuthnLevel' => 1,
'twitterUserField' => 'screen_name',
'u2fActivation' => 0,
......
......@@ -8,17 +8,17 @@ sub types {
'array' => {
'test' => sub {
1;
}
}
},
'authParamsText' => {
'test' => sub {
1;
}
}
},
'blackWhiteList' => {
'test' => sub {
1;
}
}
},
'bool' => {
'msgFail' => '__notABoolean__',
......@@ -36,17 +36,17 @@ sub types {
split( /\n/, $@, 0 ) )
);
return $err ? ( 1, "__badExpression__: $err" ) : 1;
}
}
},
'catAndAppList' => {
'test' => sub {
1;
}
}
},
'file' => {
'test' => sub {
1;
}
}
},
'hostname' => {
'form' => 'text',
......@@ -80,48 +80,48 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
if $_ =~ /exportedvars$/i and defined $conf->{$_}{$val};
}
return 1, "__unknownAttrOrMacro__: $val";
}
}
},
'longtext' => {
'test' => sub {
1;
}
}
},
'menuApp' => {
'test' => sub {
1;
}
}
},
'menuCat' => {
'test' => sub {
1;
}
}
},
'oidcmetadatajson' => {
'test' => sub {
1;
}
}
},
'oidcmetadatajwks' => {
'test' => sub {
1;
}
}
},
'oidcOPMetaDataNode' => {
'test' => sub {
1;
}
}
},
'oidcRPMetaDataNode' => {
'test' => sub {
1;
}
}
},
'password' => {
'msgFail' => '__malformedValue__',
'test' => sub {
1;
}
}
},
'pcre' => {
'form' => 'text',
......@@ -132,7 +132,7 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
}
};
return $@ ? ( 0, "__badRegexp__: $@" ) : 1;
}
}
},
'PerlModule' => {
'form' => 'text',
......@@ -142,17 +142,17 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
'portalskin' => {
'test' => sub {
1;
}
}
},
'portalskinbackground' => {
'test' => sub {
1;
}
}
},
'post' => {
'test' => sub {
1;
}
}
},
'RSAPrivateKey' => {
'test' => sub {
......@@ -160,7 +160,7 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
m[^(?:(?:\-+\s*BEGIN\s+(?:RSA\s+)?PRIVATE\s+KEY\s*\-+\r?\n)?(?:Proc-Type:.*\r?\nDEK-Info:.*\r?\n[\r\n]*)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:RSA\s+)PRIVATE\s+KEY\s*\-+)?[\r\n]*)?$]s
? 1
: ( 1, '__badPemEncoding__' );
}
}
},
'RSAPublicKey' => {
'test' => sub {
......@@ -168,7 +168,7 @@ m[^(?:(?:\-+\s*BEGIN\s+(?:RSA\s+)?PRIVATE\s+KEY\s*\-+\r?\n)?(?:Proc-Type:.*\r?\n
m[^(?:(?:\-+\s*BEGIN\s+PUBLIC\s+KEY\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+PUBLIC\s+KEY\s*\-+)?[\r\n]*)?$]s
? 1
: ( 1, '__badPemEncoding__' );
}
}
},
'RSAPublicKeyOrCertificate' => {
'test' => sub {
......@@ -176,37 +176,37 @@ m[^(?:(?:\-+\s*BEGIN\s+PUBLIC\s+KEY\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\
m[^(?:(?:\-+\s*BEGIN\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+)?[\r\n]*)?$]s
? 1
: ( 1, '__badPemEncoding__' );
}
}
},
'rule' => {
'test' => sub {
1;
}
}
},
'samlAssertion' => {
'test' => sub {
1;
}
}
},
'samlAttribute' => {
'test' => sub {
1;
}
}
},
'samlIDPMetaDataNode' => {
'test' => sub {
1;
}
}
},
'samlService' => {
'test' => sub {
1;
}
}
},
'samlSPMetaDataNode' => {
'test' => sub {
1;
}
}
},
'select' => {
'test' => sub {
......@@ -216,19 +216,19 @@ m[^(?:(?:\-+\s*BEGIN\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\
return $test
? 1
: ( 1, "Invalid value '$_[0]' for this select" );
}
}
},
'subContainer' => {
'keyTest' => qr/\w/,
'test' => sub {
1;
}
}
},
'text' => {
'msgFail' => '__malformedValue__',
'test' => sub {
1;
}
}
},
'trool' => {
'msgFail' => '__authorizedValues__: -1, 0, 1',
......@@ -1046,7 +1046,7 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
split( /\n/, $@, 0 ) )
);
return $err ? ( 1, "__badExpression__: $err" ) : 1;
}
}
},
'type' => 'keyTextContainer'
},
......@@ -1222,7 +1222,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
and defined $conf->{$_}{$val};
}
return 1, "__unknownAttrOrMacro__: $val";
}
}
},
'type' => 'doubleHash'
},
......@@ -1508,7 +1508,7 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
split( /\n/, $@, 0 ) )
);
return $err ? ( 1, "__badExpression__: $err" ) : 1;
}
}
},
'type' => 'ruleContainer'
},
......@@ -3325,10 +3325,6 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
'trustedDomains' => {
'type' => 'text'
},
'trustedProxies' => {
'default' => '',
'type' => 'text'
},
'twitterAppName' => {
'type' => 'text'
},
......
......@@ -712,11 +712,6 @@ sub attributes {
default => 60,
documentation => 'Update session timeout interval on server side',
},
trustedProxies => {
type => 'text',
default => '',
documentation => 'Trusted proxies',
},
userControl => {
type => 'pcre',
default => '^[\w\.\-@]+$',
......
......@@ -499,7 +499,7 @@ sub tree {
help => 'logs.html',
form => 'simpleInputContainer',
nodes =>
[ 'trustedProxies', 'whatToTrace', 'hiddenAttributes' ]
[ 'whatToTrace', 'hiddenAttributes' ]
},
{
title => 'cookieParams',
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1004,10 +1004,6 @@
"title": "issuerParams"
}, {
"_nodes": [{
"default": "",
"id": "trustedProxies",
"title": "trustedProxies"
}, {
"default": "uid",
"id": "whatToTrace",
"title": "whatToTrace"
......
......@@ -1146,11 +1146,6 @@
"title": "logParams",
"type": "simpleInputContainer",
"nodes": [{
"default": "",
"id": "trustedProxies",
"title": "trustedProxies",
"data": ""
}, {
"default": "uid",
"id": "whatToTrace",
"title": "whatToTrace",
......
......@@ -1157,11 +1157,6 @@
"title": "logParams",
"type": "simpleInputContainer",
"nodes": [{
"default": "",
"id": "trustedProxies",
"title": "trustedProxies",
"data": ""
}, {
"default": "uid",
"id": "whatToTrace",
"title": "whatToTrace",
......
......@@ -1157,11 +1157,6 @@
"title": "logParams",
"type": "simpleInputContainer",
"nodes": [{
"default": "",
"id": "trustedProxies",
"title": "trustedProxies",
"data": ""
}, {
"default": "uid",
"id": "whatToTrace",
"title": "whatToTrace",
......
......@@ -1146,11 +1146,6 @@
"title": "logParams",
"type": "simpleInputContainer",
"nodes": [{
"default": "",
"id": "trustedProxies",
"title": "trustedProxies",
"data": ""
}, {
"default": "uid",
"id": "whatToTrace",
"title": "whatToTrace",
......
......@@ -1640,10 +1640,6 @@
},
{
"_nodes": [{
"default": "",
"id": "trustedProxies",
"title": "trustedProxies"
}, {
"default": "uid",
"id": "whatToTrace",
"title": "whatToTrace"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment