← Back to team overview

mahara-contributors team mailing list archive

[Bug 1966367] [NEW] The webservice mahara_view_external.php looks to check for a user wrong

 

Public bug reported:

We store username and email in Mahara in lowercase and therefore compare
passed in username or email against the database as lowercase versions.

However in webservices it looks like we don't do that and just compare
what is passed in so if we have $value['username'] = 'ExamplePerson' it
won't match on the person in the database with 'exampleperson' but it
should as usernames are lowercase unique in the database.

Need to update the checkuser() functions in
webservice/functions/mahara_institution_external.php
webservice/functions/mahara_user_external.php
webservice/functions/mahara_view_external.php
webservice/functions/mahara_blog_external.php

So that those functions check the username and email in a lowercase
fashion

** Affects: mahara
     Importance: High
     Assignee: Doris Tam (doristam)
         Status: Confirmed

** Affects: mahara/20.10
     Importance: High
         Status: New

** Affects: mahara/21.04
     Importance: High
         Status: New

** Affects: mahara/21.10
     Importance: High
         Status: New

** Affects: mahara/22.04
     Importance: High
     Assignee: Doris Tam (doristam)
         Status: Confirmed

** Changed in: mahara
   Importance: Undecided => High

** Changed in: mahara
     Assignee: (unassigned) => Doris Tam (doristam)

** Changed in: mahara
    Milestone: None => 22.04.0

** Changed in: mahara
       Status: New => Confirmed

** Also affects: mahara/21.10
   Importance: Undecided
       Status: New

** Also affects: mahara/20.10
   Importance: Undecided
       Status: New

** Also affects: mahara/22.04
   Importance: High
     Assignee: Doris Tam (doristam)
       Status: Confirmed

** Also affects: mahara/21.04
   Importance: Undecided
       Status: New

** Changed in: mahara/21.10
   Importance: Undecided => High

** Changed in: mahara/21.04
   Importance: Undecided => High

** Changed in: mahara/20.10
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1966367

Title:
  The webservice mahara_view_external.php looks to check for a user
  wrong

Status in Mahara:
  Confirmed
Status in Mahara 20.10 series:
  New
Status in Mahara 21.04 series:
  New
Status in Mahara 21.10 series:
  New
Status in Mahara 22.04 series:
  Confirmed

Bug description:
  We store username and email in Mahara in lowercase and therefore
  compare passed in username or email against the database as lowercase
  versions.

  However in webservices it looks like we don't do that and just compare
  what is passed in so if we have $value['username'] = 'ExamplePerson'
  it won't match on the person in the database with 'exampleperson' but
  it should as usernames are lowercase unique in the database.

  Need to update the checkuser() functions in
  webservice/functions/mahara_institution_external.php
  webservice/functions/mahara_user_external.php
  webservice/functions/mahara_view_external.php
  webservice/functions/mahara_blog_external.php

  So that those functions check the username and email in a lowercase
  fashion

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



Follow ups