Skip to content

Commit

Permalink
MDL-59012 auth_oauth2: Do not escape URL in plain text emails
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrd8mz committed May 23, 2017
1 parent 590292d commit 97cc7e0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions auth/oauth2/classes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ public static function send_confirm_link_login_email($userinfo, $issuer, $userid
];
$confirmationurl = new moodle_url('/auth/oauth2/confirm-linkedlogin.php', $params);

// Remove data parameter just in case it was included in the confirmation so we can add it manually later.
$data->link = $confirmationurl->out();
$data->link = $confirmationurl->out(false);
$message = get_string('confirmlinkedloginemail', 'auth_oauth2', $data);

$message = get_string('confirmlinkedloginemail', 'auth_oauth2', $data);
$data->link = $confirmationurl->out();
$messagehtml = text_to_html(get_string('confirmlinkedloginemail', 'auth_oauth2', $data), false, false, true);

$user->mailformat = 1; // Always send HTML version as well.
Expand Down Expand Up @@ -303,9 +303,10 @@ public static function send_confirm_account_email($userinfo, $issuer) {
];
$confirmationurl = new moodle_url('/auth/oauth2/confirm-account.php', $params);

$data->link = $confirmationurl->out();
$data->link = $confirmationurl->out(false);
$message = get_string('confirmaccountemail', 'auth_oauth2', $data);

$message = get_string('confirmaccountemail', 'auth_oauth2', $data);
$data->link = $confirmationurl->out();
$messagehtml = text_to_html(get_string('confirmaccountemail', 'auth_oauth2', $data), false, false, true);

$user->mailformat = 1; // Always send HTML version as well.
Expand Down

0 comments on commit 97cc7e0

Please sign in to comment.