Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Username longer than 25 characters...?  (Read 2853 times)

0 Members and 1 Guest are viewing this topic.

iason

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Username longer than 25 characters...?
« on: November 26, 2015, 12:03:03 pm »

Hello Coppermine users,

having installed the latest Coppermine Gallery, during testing, i am realizing an issue that i consider to be important. A user may not have a name with a length greater than 25 characters.
Not being good on the code, i tried to address the issue, searching this forum, and beyond, for a solution.
So:
-in the database, phpmyadmin, in the table '_users', i set the username field to varchar(255)
-and in "usermgr.php", line 729, i change the 'input' to accept 255 characters
and after these two changes, logged in as administrator, i can create/edit a user with a long name.

OK. But a user's name is shown in other pages and places inside the gallery. I do not know ALL the files that must be edited.

I need a way to fix the issue, please.
I probably need a detailed list of all the references in the code that make a user's name appear, so i can edit them.
It is probably some work, but sorry, it is not my fault. I am amazed that this simple thing has been overlooked, it was a matter of making a good choice from the beginning.

Thanks you in advance,
iason

BTW: I think one more field "Name" should be there, "Username" being another.  ;)
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: Username longer than 25 characters...?
« Reply #1 on: November 26, 2015, 01:59:14 pm »

I probably need a detailed list of all the references in the code that make a user's name appear, so i can edit them.
I'd suggest a tool like TextCrawler to search the code... There are 575 references in 76 files to user_name in 1.5.40...
That said, I expect most to not care about the length - only the database and form input should care (of course an excessively long username may caused interesting displays when output...)

Quote
BTW: I think one more field "Name" should be there, "Username" being another.  ;)
I'd suggest reading the docs - where you will see you have 6 fields available for your custom use in the user table/profile.  5 are defined as varchar(255) and one as text. http://documentation.coppermine-gallery.net/en/configuration.htm#admin_custom

Quote
It is probably some work, but sorry, it is not my fault. I am amazed that this simple thing has been overlooked, it was a matter of making a good choice from the beginning.
Perhaps you might want to nicely open a feature request rather than criticize those that have written CPG that didn't have the foresight to think you might want to have your users type a 255 character username to get access to your site... ;)
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

iason

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Username longer than 25 characters...?
« Reply #2 on: November 26, 2015, 02:46:10 pm »

Thank you for your suggestions. The documentation is something one must really dive in.

I see now that i can go with an extra custom field for the real name, but IMHO the two fields for username and name should be clearly distinguished by default, and at the same time giving the user the ability to use just one.

Yes i also think that 255 in not practical of course, however 25 for a name is probably short for someone that does not want to use both real name and username.

Thank you, be happy.  :)
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.