diff --git a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDBSAML.pm b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDBSAML.pm index a607c1526..c71397981 100644 --- a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDBSAML.pm +++ b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDBSAML.pm @@ -8,6 +8,7 @@ package Lemonldap::NG::Portal::UserDBSAML; use strict; use Lemonldap::NG::Portal::Simple; use Lemonldap::NG::Portal::_SAML; +use Encode; our @ISA = qw(Lemonldap::NG::Portal::_SAML); our $VERSION = '0.01'; @@ -95,6 +96,10 @@ sub setSessionInfo { my $idp_metadata = $self->{samlIDPMetaDataXML}->{$idpConfKey}->{samlIDPMetaDataXML}; + if ( $self->{samlMetadataForceUTF8} ) { + $idp_metadata = encode( "utf8", $idp_metadata ); + } + # Add this IDP to Lasso::Server as AA unless ( $self->addAA( $server, $idp_metadata ) ) { $self->lmLog(