Last modified: 2012-02-09 23:05:16 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T17285, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15285 - groups longer than the 'ug_group'/'ufg_group' can be created
groups longer than the 'ug_group'/'ufg_group' can be created
Status: NEW
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.18.x
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 11057
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-23 18:14 UTC by Bob Rutsky
Modified: 2012-02-09 23:05 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bob Rutsky 2008-08-23 18:14:42 UTC
'ug_group' column in 'user_groups' table limited to 16 characters, but when modifying rights directly from LocalSettings.php configuration file, group with longer name can be added, like:
> $wgGroupPermissions['copy_upload_access']['upload_by_url'] = true;
will show 'copy_upload_access' in groups list in administration panel, but no user can be added to this group, because 'copy_upload_access' is 17 characters length.

Some check of validity of at least $wgGroupPermissions should be added.
Comment 1 Chad H. 2010-08-31 19:17:43 UTC
Fix is trivial, should just increase the column length so it's not an issue.
Comment 2 Platonides 2010-08-31 19:21:04 UTC
Since we can't show an error when you save LocalSettings.php with your text editor, how do you expect that validity check to work?
Comment 3 Chad H. 2010-08-31 19:24:40 UTC
(In reply to comment #2)
> Since we can't show an error when you save LocalSettings.php with your text
> editor, how do you expect that validity check to work?

We could check $wgGroupPermission sanity in Setup.php and wfWarn() if it's not.

But that'd be insane.

Like I said, make the column bigger.
Comment 4 Platonides 2010-08-31 21:30:31 UTC
How much bigger? $wgGroupPermission doesn't have any intrinsec limit.

Although we could give an specific error when you try to add it. Mysql in strict mode will give an error, in the "normal" mode, it just truncates. We could look for warnings.
Comment 5 MZMcBride 2010-09-01 02:43:57 UTC
(In reply to comment #4)
> How much bigger? $wgGroupPermission doesn't have any intrinsec limit.

Reasonably bigger. It's currently varbinary(16). If you made it varbinary(50), I think that would cover nearly all cases. It looks like CentralAuth's global_user_group table uses varchar(255) for the gug_group column. I'm not sure you need to increase the size that much, but it's worth considering, I suppose.

If someone sets $wgGroupPermissions to something unreasonably long, they should expect breakage. I don't think there's a real need for warnings and validity checks here; I think all that's needed here is a reasonably larger size limit for the ug_group column and some common sense.
Comment 6 Sam Reed (reedy) 2011-11-30 19:22:50 UTC
FYI, r103685 doubled it's size...

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links