Add an option to encode Metadata in UTF-8 (#119)
This commit is contained in:
parent
f5367d4dc9
commit
3ee1e9b393
@ -378,6 +378,8 @@ sub setDefaultValues {
|
||||
$self->{samlIdPResolveCookie} ||= $self->{cookieName} . "idp";
|
||||
$self->{samlStorage} ||= $self->{globalStorage};
|
||||
$self->{samlStorageOptions} ||= $self->{globalStorageOptions};
|
||||
$self->{samlMetadataForceUTF8} = 1
|
||||
unless ( defined( $self->{samlMetadataForceUTF8} ) );
|
||||
}
|
||||
|
||||
##@method protected void setHiddenFormValue(string fieldname, string value)
|
||||
|
@ -205,6 +205,10 @@ sub loadIDPs {
|
||||
);
|
||||
}
|
||||
|
||||
if ( $self->{samlMetadataForceUTF8} ) {
|
||||
$idp_metadata = encode( "utf8", $idp_metadata );
|
||||
}
|
||||
|
||||
# Add this IDP to Lasso::Server
|
||||
my $result = $self->addIDP( $self->{_lassoServer}, $idp_metadata );
|
||||
|
||||
@ -298,6 +302,10 @@ sub loadSPs {
|
||||
);
|
||||
}
|
||||
|
||||
if ( $self->{samlMetadataForceUTF8} ) {
|
||||
$sp_metadata = encode( "utf8", $sp_metadata );
|
||||
}
|
||||
|
||||
# Add this SP to Lasso::Server
|
||||
my $result = $self->addSP( $self->{_lassoServer}, $sp_metadata );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user