← Back to team overview

mahara-contributors team mailing list archive

[Bug 1716299] [NEW] hyperlinks in language files are not rendered in forgotpassword.php

 

Public bug reported:

>From forum post https://mahara.org/interaction/forum/topic.php?id=8020&offset=0&limit=10#post32271
----
We are on 16.10.2 and on forgotpass.php, hyperlinks do not get rendered from the language files. That is, we get the error message of:


"The user you requested uses an external authentication method. <a
href="https://myportfolio.aut.ac.nz/contact.php";>Ask your
administrator</a> for help with changing your password. Or provide
another username or email address."


Which is the standard message however it is not hyperlinking the a tags. Is this functioning as designed?
-----
Robert's response:

Hi Jawyei

Normally when we display form errors we escape the string by default as
the error sometimes contains user entered information - this is done for
security reasons.

In this case the string is generated from values that are hard coded
within Mahara itself and so the escaping can be ignored.

The message is passed through $form->set_error() and this takes a third
parameter true/false in regards to escaping the string.

So adding 'false' to the end of line 114 in forgotpass.php should sort
the problem.

Do you want to give that a go and make a patch if it works?

Cheers

** Affects: mahara
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1716299

Title:
  hyperlinks in language files are not rendered in forgotpassword.php

Status in Mahara:
  New

Bug description:
  From forum post https://mahara.org/interaction/forum/topic.php?id=8020&offset=0&limit=10#post32271
  ----
  We are on 16.10.2 and on forgotpass.php, hyperlinks do not get rendered from the language files. That is, we get the error message of:


  "The user you requested uses an external authentication method. <a
  href="https://myportfolio.aut.ac.nz/contact.php";>Ask your
  administrator</a> for help with changing your password. Or provide
  another username or email address."


  Which is the standard message however it is not hyperlinking the a tags. Is this functioning as designed?
  -----
  Robert's response:

  Hi Jawyei

  Normally when we display form errors we escape the string by default
  as the error sometimes contains user entered information - this is
  done for security reasons.

  In this case the string is generated from values that are hard coded
  within Mahara itself and so the escaping can be ignored.

  The message is passed through $form->set_error() and this takes a
  third parameter true/false in regards to escaping the string.

  So adding 'false' to the end of line 114 in forgotpass.php should sort
  the problem.

  Do you want to give that a go and make a patch if it works?

  Cheers

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1716299/+subscriptions


Follow ups