MyBB Community Forums

Full Version: [F] username check (bug) with non-english usernames [C-Chris]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
there is a bug in the username validation process in mybb 1.4
the attached picture should explain the problem.

[attachment=11882]

and because of this, if you enter a username that already exists it'll show the username is available.
and if you banned some special characters like % or @, the user will be unable to register
I'm pretty sure this was fixed in an earlier version?
I didn't notice it in mybb 1.4.3 but one of my forum members say he has this problem in his forum.
then I checked it on my forum, and I can reproduce and the same on mybb community forum (here)
Yeah , I am that member , it wasn't in the older version 1.4.3 but it just appeared in 1.4.4
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group
it'll very much appraised if you post any dirty/temporarily fix until the next forum refresh
(just when u have little time to post it)

thanks.
jscripts/validator.php

new Ajax.Request(options.url, {method:'post', postBody:"value=" + escape(value) + extra, onComplete: function(request) { this.ajaxValidateComplete(id, options, request); }.bind(this)});

replace with

new Ajax.Request(options.url, {method:'post', postBody:"value=" + value + extra, onComplete: function(request) { this.ajaxValidateComplete(id, options, request); }.bind(this)});
thanks Ryan, the Fix works here.
tested with xp/ ie6, and ubuntu 8.10/ FF 3.0.4
Can you try this instead

jscripts/validator.js

new Ajax.Request(options.url, {method:'post', postBody:"value=" + escape(value) + extra, onComplete: function(request) { this.ajaxValidateComplete(id, options, request); }.bind(this)});

replace with

new Ajax.Request(options.url, {method:'post', postBody:"value=" + encodeURIComponent(value) + extra, onComplete: function(request) { this.ajaxValidateComplete(id, options, request); }.bind(this)});
Yeah , it worked thank you , but just had 2 comments
First : it's jscripts/validator.js not validator.php
second : you can just exchange the first line :

new Ajax.Request(options.url, {method:'post', postBody:"value=" + escape(value) + extra, onComplete: function(request)

replace with

new Ajax.Request(options.url, {method:'post', postBody:"value=" + encodeURIComponent(value) + extra, onComplete: function(request)

without adding the line

{ this.ajaxValidateComplete(id, options, request); }.bind(this)});

as it didn't appear as a whole in the "find" in my note bad

Thanks again
Pages: 1 2