View Issue Details

IDProjectCategoryView StatusLast Update
0023900mantisbtadministrationpublic2018-02-07 02:55
ReporterfmanAssigned Tovboctor 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.10.0 
Target VersionFixed in Version2.11.0 
Summary0023900: Unable to update user access level, due to check on 'Realname' returning KO (APPLICATION ERROR #807)
Description

I've checked function user_ensure_realname_unique() on Mantis 2.8.0 and Mantis 2.10.0, a change has been introduced (check by return value = 0), that blocks update of user access level, no matter there are no other users on Mantis with the same username or real name.

Steps to reproduce
1) create a new user with username and real name not present on Mantis
username: user-not-on-system
real name: Real Name Jr
access level: reporter

2) Try to change user access level
you will get APPLICATION ERROR #807

TagsNo tags attached.

Relationships

related to 0023838 closedvboctor Create user via REST API 
related to 0023909 closedvboctor User realname uniqueness check doesn't work 

Activities

vboctor

vboctor

2018-01-28 18:05

manager   ~0058652

I can't reproduce this on master.

vboctor

vboctor

2018-01-28 18:08

manager   ~0058653

Actually, I can reproduce on master but not on master-2.10.

vboctor

vboctor

2018-01-28 18:26

manager   ~0058654

Looked further into this, it seems we had a bad check and when fixed it exposed a bug in logic for 2.10.0 release and earlier.

  • In 2.10.0, the uniqueness check for real name didn't work, enabling creating users with duplicate real names.
  • In master, this uniqueness check was fixed as part of 0023838 - this caused the underlying bug to not allow updating users.
vboctor

vboctor

2018-01-30 01:42

manager   ~0058668

PR: https://github.com/mantisbt/mantisbt/pull/1277

Related Changesets

MantisBT: master cf5baefa

2018-01-30 01:34:28

vboctor

Details Diff
Fix username and realname uniqueness checks

- Fix user realname uniqueness check which wasn’t working.
- Remove `$g_differentiate_duplicates` config option.
- Change username realname uniqueness check APIs to not take in username, since these are independent operations.

Fixes 0023909, 0023900
Affected Issues
0023900, 0023909
mod - account_update.php Diff File
mod - config_defaults_inc.php Diff File
mod - core/obsolete.php Diff File
mod - core/user_api.php Diff File
mod - manage_user_update.php Diff File

Issue History

Date Modified Username Field Change
2018-01-28 05:38 fman New Issue
2018-01-28 15:27 atrol Target Version => 2.10.1
2018-01-28 18:05 vboctor Note Added: 0058652
2018-01-28 18:08 vboctor Note Added: 0058653
2018-01-28 18:26 vboctor Note Added: 0058654
2018-01-28 18:27 vboctor Relationship added related to 0023838
2018-01-30 01:42 vboctor Note Added: 0058668
2018-01-30 01:42 vboctor Relationship added related to 0023909
2018-01-30 01:42 vboctor Assigned To => vboctor
2018-01-30 01:42 vboctor Status new => assigned
2018-01-30 01:43 vboctor Target Version 2.10.1 => 2.11.0
2018-02-06 21:22 vboctor Target Version 2.11.0 => 2.12.0
2018-02-07 02:38 vboctor Status assigned => closed
2018-02-07 02:38 vboctor Resolution open => fixed
2018-02-07 02:38 vboctor Fixed in Version => 2.11.0
2018-02-07 02:38 vboctor Target Version 2.12.0 =>
2018-02-07 02:55 vboctor Changeset attached => MantisBT master cf5baefa