Phpbb3 8736 #10

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

igorw commented Nov 29, 2010

Next time, please include a "commit title" (the first line of the commit message) and name the branch "ticket/8736" as suggested by the git contribution guidelines. http://wiki.phpbb.com/display/DEV/Git

Why are you including the ucp language file? TOO_SHORT_USERNAME is in the common language file.

Apart from that, look good.

Contributor

rmcgirr83 commented Nov 29, 2010

The ucp.php lang is needed for this, original code which was already in the code, I just moved it.

 if (($result = validate_username($post_data['username'], (!empty($post_data['post_username'])) ? $post_data['post_username'] : '')) !== false)

as that checks for if the user name already exists, eg. I was not aware that TOO_LONG, etc were already in common.php. So I suppose just adding the check for the string length would suffice instead of moving the ucp.php include. Could possibly append the error message to state the minimum and maximum lengths in the display to the user?

Contributor

rmcgirr83 commented Nov 29, 2010

I have bookmarked the link, btw. ^_^

Contributor

igorw commented Nov 29, 2010

Fair enough, it does make the code more readable in this case.

@rmcgirr83 rmcgirr83 [ticket/8736] guest can have 255 chars long username
when you post as a guest (anonymous) you can fill the field username with 255 chars. that will destroy the prosilver and subsilver2 -Style at viewtopic..
settings for username in ACP: 6-16 Chars

PHPBB3-8736
5de9319
Contributor

rmcgirr83 commented Nov 30, 2010

Igor, I "reinvented" the wheel. The error message will now state minimum and maximum characters allowed instead of "TOO_SMALL" AND "TOO_LARGE". Calling language/en/ucp.php in the check so might as well use the vars available.

Contributor

igorw commented Nov 30, 2010

How about:

$error[] = sprintf($user->lang['FIELD_' . $result], $user->lang['USERNAME'], ($result == 'TOO_SHORT') ? $config['min_name_chars'] : $config['max_name_chars']);
Contributor

rmcgirr83 commented Nov 30, 2010

Works for me.

Contributor

igorw commented Dec 5, 2010

Adjusted and merged in 5a4938c

@EXreaction EXreaction referenced this pull request in EXreaction/phpbb3 Jul 23, 2012

@michaelcullum michaelcullum Merge pull request #10 from EXreaction/ticket/10631
Ticket/10631
69dcf52

@mungo mungo pushed a commit to mungo/phpbb3 that referenced this pull request Jun 27, 2014

Philipp Kordowich Fix for p-tags in INSTALL_CONGRATS_EXPLAIN
resolves #10
600886e

@nickvergessen nickvergessen added a commit that referenced this pull request Nov 25, 2014

@nickvergessen nickvergessen Merge pull request #10 from phpbb/ticket/security-171
[ticket/security-171] Use type cast helper for json data
5c3b6a8

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment