Skip to content

Commit

Permalink
Use the URL for the set_list route without https?:// for the TOTP…
Browse files Browse the repository at this point in the history
… issuer.
  • Loading branch information
drgrice1 committed Mar 20, 2024
1 parent d81e4f7 commit 62bda1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/WeBWorK/ContentGenerator/TwoFactorAuthentication.pm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ sub pre_header_initialize ($c) {
$c->authen->session->{otp_secret} ? (secret => $c->authen->session->{otp_secret}) : ());
$c->authen->session(otp_secret => $totp->secret);

my $otp_link = $totp->generate_otp($c->authen->{user_id}, $ce->{courseName});
my $otp_link = $totp->generate_otp($c->authen->{user_id}, $c->url_for('set_list')->to_abs =~ s|https?://||r);

my $img_data = do {
local $SIG{__WARN__} = sub { };
Expand Down

0 comments on commit 62bda1b

Please sign in to comment.