WIP - Append parameters (#1664)

This commit is contained in:
Christophe Maudoux 2019-03-03 20:50:21 +01:00
parent 0c59803738
commit 228a37c0d2
7 changed files with 29 additions and 4 deletions

View File

@ -70,7 +70,6 @@ sub defaultValues {
'hiddenAttributes' => '_password',
'httpOnly' => 1,
'https' => -1,
'idSpoofing' => 1,
'idSpoofingHiddenAttributes' => '_2fDevices _loginHistory',
'idSpoofingPrefix' => 'real_',
'idSpoofingRule' => 1,

View File

@ -1196,7 +1196,7 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
'type' => 'trool'
},
'idSpoofing' => {
'default' => 1,
'default' => 0,
'type' => 'bool'
},
'idSpoofingHiddenAttributes' => {

View File

@ -441,7 +441,7 @@ sub attributes {
flags => 'p',
},
idSpoofing => {
default => 1,
default => 0,
type => 'bool',
documentation => 'Enable IdSpoofing plugin',
flags => 'p',

View File

@ -648,6 +648,18 @@ sub tree {
'checkUserDisplayEmptyValues',
]
},
{
title => 'spoofingIds',
help => 'idspoofing.html',
form => 'simpleInputContainer',
nodes => [
'idSpoofing',
'idSpoofingRule',
'idSpoofingPrefix',
'idSpoofingHiddenAttributes',
'idSpoofingSkipEmptyValues',
]
},
]
},
{

View File

@ -629,6 +629,18 @@ sub tests {
return 1;
},
# Warn if IdSpoofing plugin is enabled
checkIdSpoofing => sub {
return 1 unless ( $conf->{idSpoofing} );
return ( -1,
'"IdSpoofing" plugin is enabled!!!'
)
if ( $conf->{idSpoofing} );
# Return
return 1;
},
};
}

View File

@ -291,6 +291,7 @@ sub display {
REGISTER_URL => $self->conf->{registerUrl},
HIDDEN_INPUTS => $self->buildHiddenForm($req),
STAYCONNECTED => $self->conf->{stayConnected},
SPOOFID => $self->conf->{idSpoofing},
(
$req->data->{customScript}
? ( CUSTOM_SCRIPT => $req->data->{customScript} )

View File

@ -23,7 +23,8 @@ sub init {1}
sub run {
my ( $self, $req ) = @_;
my $spoofId = $req->param('spoofId') || 'rtyler';
my $spoofId = $req->param('spoofId') || '';
return PE_OK unless $spoofId;
# Fill spoof session
my ( $realSession, $spoofSession ) = ( {}, {} );