Clean URLs created during user account creation, do not respect the "nousernames" setting

Bug #1534398 reported by Aaron Wells
256
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Unassigned
1.10
Won't Fix
Medium
Unassigned
15.04
Fix Released
Medium
Unassigned
15.10
Fix Released
Medium
Unassigned
16.04
Fix Released
Medium
Unassigned
16.10
Fix Released
Medium
Unassigned

Bug Description

See: https://mahara.org/interaction/forum/topic.php?id=7479

If you activate the "Never display usernames" site setting, and turn on clean URLs, the clean URL for new users' profile pages will still contain their username.

If you do "regerenate clean URLs", however, the newly created clean URLs will *not* have the usernames.

This is because the method regenerateurls_submit() in cleanurls.php respects the $CFG->nousernames setting, but the other places that generate clean URLs on account creation do not:

- User->create() in auth/user.php
- create_user() in lib/user.php

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Reported in 15.04.3. I haven't replicated it yet (due to the difficulty of setting up clean URLs) but I can see the problem in the code, and that problem is still present in 16.04dev.

Changed in mahara:
milestone: none → 16.04.0
Aaron Wells (u-aaronw)
information type: Public → Public Security
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/7065

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7065
Committed: https://git.mahara.org/mahara/mahara/commit/9d7b93c7c2c818c15eaf47b927acf6d54d4239c4
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 9d7b93c7c2c818c15eaf47b927acf6d54d4239c4
Author: Robert Lyon <email address hidden>
Date: Tue Oct 4 13:19:51 2016 +1300

Bug 1534398: Allow user creation to respect the 'nousernames' setting

Created a new function get_raw_user_urlid() to fetch the correct string to
pass to generate_urlid()

behatnotneeded

Change-Id: I1901045ef8e89d224e1ab9556587224ff1d7e6a0
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "16.10_STABLE" branch: https://reviews.mahara.org/7173

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7173
Committed: https://git.mahara.org/mahara/mahara/commit/d642671130676d7aa6bafedec1acef2da0c79b79
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.10_STABLE

commit d642671130676d7aa6bafedec1acef2da0c79b79
Author: Robert Lyon <email address hidden>
Date: Tue Oct 4 13:19:51 2016 +1300

Bug 1534398: Allow user creation to respect the 'nousernames' setting

Created a new function get_raw_user_urlid() to fetch the correct string to
pass to generate_urlid()

behatnotneeded

Change-Id: I1901045ef8e89d224e1ab9556587224ff1d7e6a0
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 9d7b93c7c2c818c15eaf47b927acf6d54d4239c4)

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "16.04_STABLE" branch: https://reviews.mahara.org/7174

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "15.10_STABLE" branch: https://reviews.mahara.org/7175

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/7176

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7176
Committed: https://git.mahara.org/mahara/mahara/commit/9c84ab322c52ee042e30ba6017fc0a95437a2763
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit 9c84ab322c52ee042e30ba6017fc0a95437a2763
Author: Robert Lyon <email address hidden>
Date: Tue Oct 4 13:19:51 2016 +1300

Bug 1534398: Allow user creation to respect the 'nousernames' setting

Created a new function get_raw_user_urlid() to fetch the correct string to
pass to generate_urlid()

behatnotneeded

Change-Id: I1901045ef8e89d224e1ab9556587224ff1d7e6a0
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 9d7b93c7c2c818c15eaf47b927acf6d54d4239c4)
(cherry picked from commit d642671130676d7aa6bafedec1acef2da0c79b79)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/7174
Committed: https://git.mahara.org/mahara/mahara/commit/e46d6519e9425dbfc153c1c2146c41f8c539c5ee
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.04_STABLE

commit e46d6519e9425dbfc153c1c2146c41f8c539c5ee
Author: Robert Lyon <email address hidden>
Date: Tue Oct 4 13:19:51 2016 +1300

Bug 1534398: Allow user creation to respect the 'nousernames' setting

Created a new function get_raw_user_urlid() to fetch the correct string to
pass to generate_urlid()

behatnotneeded

Change-Id: I1901045ef8e89d224e1ab9556587224ff1d7e6a0
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 9d7b93c7c2c818c15eaf47b927acf6d54d4239c4)
(cherry picked from commit d642671130676d7aa6bafedec1acef2da0c79b79)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/7175
Committed: https://git.mahara.org/mahara/mahara/commit/8ae81e24441120eec484ee852be9bd623851c8d4
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.10_STABLE

commit 8ae81e24441120eec484ee852be9bd623851c8d4
Author: Robert Lyon <email address hidden>
Date: Tue Oct 4 13:19:51 2016 +1300

Bug 1534398: Allow user creation to respect the 'nousernames' setting

Created a new function get_raw_user_urlid() to fetch the correct string to
pass to generate_urlid()

behatnotneeded

Change-Id: I1901045ef8e89d224e1ab9556587224ff1d7e6a0
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 9d7b93c7c2c818c15eaf47b927acf6d54d4239c4)
(cherry picked from commit d642671130676d7aa6bafedec1acef2da0c79b79)

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.04.1 → none
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.