Unable to deactivate "Force UTF-8" in SAML SP attribute configuration
Concerned version
Version: %1.9.22
Platform: (Apache)
Summary
When we unset "Force UTF-8" in "Authentication Response" section of SAML Service Provider configuration. Manager set samlSPMetaDataOptionsForceUTF8 to "0" but this has not the intended effect as the mere presence of the key activate UTF-8 re-encoding.
Backends used
Configuration is stored in json files.
Possible fixes
Probably a change somewhere here by checking the value of $force_utf8
and not only the presence of the key:
sub createAttributeValue {
my ( $self, $value, $force_utf8 ) = @_;
my $saml2value;
$force_utf8 = 1 unless defined($force_utf8);
# Value is required
return unless defined $value;
# Decode UTF-8
$self->logger->debug("Decode UTF8 value $value") if $force_utf8;
$value = decode( "utf8", $value ) if $force_utf8;