--- loncom/lti/ltiutils.pm 2022/01/20 00:35:00 1.17.2.2 +++ loncom/lti/ltiutils.pm 2023/01/23 18:39:46 1.17.2.3 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA LTI interactions # -# $Id: ltiutils.pm,v 1.17.2.2 2022/01/20 00:35:00 raeburn Exp $ +# $Id: ltiutils.pm,v 1.17.2.3 2023/01/23 18:39:46 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -32,6 +32,7 @@ use strict; use Net::OAuth; use Digest::SHA; use Digest::MD5 qw(md5_hex); +use Encode; use LWP::UserAgent(); use Apache::lonnet; use Apache::loncommon; @@ -278,7 +279,7 @@ sub lti_provider_scope { sub setup_logout_callback { my ($uname,$udom,$server,$ckey,$secret,$service_url,$idsdir,$protocol,$hostname) = @_; if ($service_url =~ m{^https?://[^/]+/}) { - my $digest_user = &Encode::decode_utf8($uname.':'.$udom); + my $digest_user = &Encode::decode('UTF-8',$uname.':'.$udom); my $loginfile = &Digest::SHA::sha1_hex($digest_user).&md5_hex(&md5_hex(time.{}.rand().$$)); if ((-d $idsdir) && (open(my $fh,'>',"$idsdir/$loginfile"))) { print $fh "$uname,$udom,$server\n";