--- loncom/lti/ltiutils.pm 2019/07/18 18:28:46 1.17 +++ loncom/lti/ltiutils.pm 2022/03/29 20:12:46 1.18 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA LTI interactions # -# $Id: ltiutils.pm,v 1.17 2019/07/18 18:28:46 raeburn Exp $ +# $Id: ltiutils.pm,v 1.18 2022/03/29 20:12: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 UUID::Tiny ':std'; use Apache::lonnet; use Apache::loncommon; @@ -821,7 +822,7 @@ END 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";