Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random characters added after text #4706

Open
VBGAMER45 opened this issue May 23, 2023 · 7 comments
Open

Random characters added after text #4706

VBGAMER45 opened this issue May 23, 2023 · 7 comments

Comments

@VBGAMER45
Copy link
Contributor

All of a sudden, we are seeing random occurrences of a capital A with a 'hat' (Â) followed by a non-breaking space. In all cases, this replaces a regular space and mostly, but not exclusively, it seems to follow a punctuation mark.

Example: https://support.createmybb.com/showthrea...0#pid12020 in the signature.

Note that is a normal MyBB install that we use for the support forums.

Server is currently running. PHP 7.4 with MySQL 5.7

Also, another person with same issue
https://community.mybb.com/thread-238335.html

@yuliu
Copy link
Member

yuliu commented May 24, 2023

Hmm, need some more input:

  • Any plugins enabled?
  • What are the character encoding set and the collation of table mybb_users and its field signature?
  • What's the setting of $config['database']['encoding'] in inc/config.php?
  • What's the operating system the forum hosted on? Has the forum database been migrated or moved or exported & imported recently?
  • What's the result if you run a File Verification check in AdminCP > Tools & Maintenance?
  • What's the result of running the following SQL query in phpMyAdmin, etc. in this forum's database? Replace mybb_ with your table prefix and the uid 6041 is for the user TerryR.
    SELECT signature FROM mybb_users WHERE uid='6041';

@yuliu
Copy link
Member

yuliu commented May 24, 2023

And... what if post/edit something without using the WYSIWYG editor, that is, what about using the source editor.

@VBGAMER45
Copy link
Contributor Author

Any plugins enabled?
Yes,

What are the character encoding set and the collation of table mybb_users and its field signature?
CREATE TABLE support_users (
uid int(10) unsigned NOT NULL AUTO_INCREMENT,
username varchar(120) NOT NULL DEFAULT '',
password varchar(120) NOT NULL DEFAULT '',
salt varchar(10) NOT NULL DEFAULT '',
loginkey varchar(50) NOT NULL DEFAULT '',
email varchar(220) NOT NULL DEFAULT '',
postnum int(10) unsigned NOT NULL DEFAULT '0',
threadnum int(10) unsigned NOT NULL DEFAULT '0',
avatar varchar(200) NOT NULL DEFAULT '',
avatardimensions varchar(10) NOT NULL DEFAULT '',
avatartype varchar(10) NOT NULL,
usergroup smallint(5) unsigned NOT NULL DEFAULT '0',
additionalgroups varchar(200) NOT NULL DEFAULT '',
displaygroup smallint(5) unsigned NOT NULL DEFAULT '0',
usertitle varchar(250) NOT NULL DEFAULT '',
regdate int(10) unsigned NOT NULL DEFAULT '0',
lastactive int(10) unsigned NOT NULL DEFAULT '0',
lastvisit int(10) unsigned NOT NULL DEFAULT '0',
lastpost int(10) unsigned NOT NULL DEFAULT '0',
website varchar(200) NOT NULL DEFAULT '',
icq varchar(10) NOT NULL DEFAULT '',
skype varchar(75) NOT NULL DEFAULT '',
google varchar(75) NOT NULL DEFAULT '',
birthday varchar(15) NOT NULL DEFAULT '',
birthdayprivacy varchar(4) NOT NULL DEFAULT 'all',
signature text NOT NULL,
allownotices tinyint(1) NOT NULL DEFAULT '0',
hideemail tinyint(1) NOT NULL DEFAULT '0',
subscriptionmethod tinyint(1) NOT NULL DEFAULT '0',
invisible tinyint(1) NOT NULL DEFAULT '0',
receivepms tinyint(1) NOT NULL DEFAULT '0',
pmnotice tinyint(1) NOT NULL DEFAULT '0',
pmnotify tinyint(1) NOT NULL DEFAULT '0',
buddyrequestspm tinyint(1) NOT NULL DEFAULT '1',
buddyrequestsauto tinyint(1) NOT NULL DEFAULT '0',
threadmode varchar(8) NOT NULL DEFAULT '',
showimages tinyint(1) NOT NULL DEFAULT '1',
showvideos tinyint(1) NOT NULL DEFAULT '1',
showsigs tinyint(1) NOT NULL DEFAULT '0',
showavatars tinyint(1) NOT NULL DEFAULT '0',
showquickreply tinyint(1) NOT NULL DEFAULT '0',
showredirect tinyint(1) NOT NULL DEFAULT '0',
ppp smallint(6) unsigned NOT NULL DEFAULT '0',
tpp smallint(6) unsigned NOT NULL DEFAULT '0',
daysprune smallint(6) unsigned NOT NULL DEFAULT '0',
dateformat varchar(4) NOT NULL DEFAULT '',
timeformat varchar(4) NOT NULL DEFAULT '',
timezone varchar(5) NOT NULL DEFAULT '',
dst int(1) NOT NULL DEFAULT '0',
dstcorrection int(1) NOT NULL DEFAULT '0',
buddylist text NOT NULL,
ignorelist text NOT NULL,
style smallint(5) unsigned NOT NULL DEFAULT '0',
away int(1) NOT NULL DEFAULT '0',
awaydate int(10) unsigned NOT NULL DEFAULT '0',
returndate varchar(15) NOT NULL DEFAULT '',
awayreason varchar(200) NOT NULL DEFAULT '',
pmfolders text NOT NULL,
notepad text NOT NULL,
referrer int(10) unsigned NOT NULL DEFAULT '0',
referrals int(10) unsigned NOT NULL DEFAULT '0',
reputation int(11) NOT NULL DEFAULT '0',
regip varbinary(16) NOT NULL DEFAULT '',
lastip varbinary(16) NOT NULL DEFAULT '',
language varchar(50) NOT NULL DEFAULT '',
timeonline int(10) unsigned NOT NULL DEFAULT '0',
showcodebuttons tinyint(1) NOT NULL DEFAULT '0',
totalpms int(10) unsigned NOT NULL DEFAULT '0',
unreadpms int(10) unsigned NOT NULL DEFAULT '0',
warningpoints int(3) unsigned NOT NULL DEFAULT '0',
moderateposts int(1) NOT NULL DEFAULT '0',
moderationtime int(10) unsigned NOT NULL DEFAULT '0',
suspendposting int(1) NOT NULL DEFAULT '0',
suspensiontime int(10) unsigned NOT NULL DEFAULT '0',
users_cash decimal(9,2) NOT NULL DEFAULT '0.00',
coppauser tinyint(1) NOT NULL DEFAULT '0',
classicpostbit tinyint(1) NOT NULL DEFAULT '0',
receivefrombuddy tinyint(1) NOT NULL DEFAULT '0',
suspendsignature int(1) NOT NULL DEFAULT '0',
suspendsigtime int(10) unsigned NOT NULL DEFAULT '0',
loginattempts smallint(2) unsigned NOT NULL DEFAULT '1',
usernotes text NOT NULL,
sourceeditor tinyint(1) NOT NULL DEFAULT '0',
loginlockoutexpiry int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (uid),
UNIQUE KEY username (username),
KEY lastvisit (lastvisit),
KEY regdate (regdate),
KEY regip (regip),
KEY lastip (lastip)
) ENGINE=MyISAM AUTO_INCREMENT=7404 DEFAULT CHARSET=latin1

What's the setting of $config['database']['encoding'] in inc/config.php?
Not set
// $config['database']['encoding'] = 'utf8';

What's the operating system the forum hosted on? Has the forum database been migrated or moved or exported & imported recently?
Windows 2012. No hasn't moved. With Apache 2.4 latest

What's the result if you run a File Verification check in AdminCP > Tools & Maintenance?
File Verification: Found Problems
File Status
global.php Changed

What's the result of running the following SQL query in phpMyAdmin, etc. in this forum's database? Replace mybb_ with your table prefix and the uid 6041 is for the user TerryR.
SELECT signature FROM mybb_users WHERE uid='6041';

Result: Brittany Bikers - https://bbb.createmybb4.com/

Also from the user said
"I figured out something about the sig. It appears if I use quick reply but not if I use the new reply button. "

@yuliu
Copy link
Member

yuliu commented May 24, 2023

Hmm, I think the recent upgrade does activate the issue, although the root cause isn't the upgrade.

Try either the following to maintain the config's encoding setting and the database table's charset have the same value:

  • Set $config['database']['encoding'] = 'latin1'; or even $config['database']['encoding'] = ''; in inc/config.php.
  • Convert tables (probably all your tables in the database your forum uses) to utf8 or utf8mb4 (preferred).

The latter is recommended but the former is fast to try.

@VBGAMER45
Copy link
Contributor Author

I tried the first one latin1

Response from user

OK, the A-hat didn't appear on my sig. line

But:

  1. My sig line is still only appearing on quick reply.
  2. My original post on this thread is now blank. I went back there to copy the A-hat and the entire post is blank.

@yuliu
Copy link
Member

yuliu commented May 24, 2023

Seems it might trigger a failed Parser output validation issue, where your input contains UTF-8 encoded characters (e.g., the A-hat character) that can't be correctly stored / fetched / parsed from latin1 database sources, I guess.

Please read the documentation on this issue to troubleshoot: https://docs.mybb.com/1.8/faq/errors/#parser-output-validation-failed .

Further on the original issue, you may also try setting $config['database']['encoding'] = null; in inc/config.php. This way mimics your old configuration before the 1.8.34 upgrade, I suppose.

Anyway, using a UTF-8-type charset / collation / encoding for tables is recommended.

BTW, the MyBB community forum is preferred for support if you need further assistance.

@VBGAMER45
Copy link
Contributor Author

Seems still same https://support.createmybb.com/showthread.php?tid=3487&page=2 error with the first change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants