News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

smf_session - Incorrect string value

Started by TheBom, March 16, 2024, 09:18:57 AM

Previous topic - Next topic

TheBom

With SMF 2.1.9 i get this error from time to time:

Databaserror: Incorrect string value: '\xF0\x9F\x92\xA5 S...' for column `board_smf`.`smf_sessions`.`data` at row 1


It happens on this;
#0: smf_db_error()
Aangeroepen van /home/public_html/forum/Sources/Subs-Db-mysql.php op regel 494
#1: smf_db_query()
Aangeroepen van /home/public_html/forum/Sources/Subs-Db-mysql.php op regel 802
#2: smf_db_insert()
Aangeroepen van /home/public_html/forum/Sources/Session.php op regel 183
#3: sessionWrite()
Aangeroepen van onbekend op regel -1

Dont know what is causing it but its strange, the string is different each time but looks almost the same.
Sometimes it gets also on Session.php line 187

'\xF0\x9F\x92\xA5 S...'
'\xF0\x9F\xA7\xA9en...'
'\xF0\x9F\xA5\xB3 B...

Steve

There is no version 2.1.9 so did you mean 2.0.19?
My pet rock is not feeling well. I think it's stoned.

Arantor

Hmmm. What mods do you have? At least one of them is not handling user data correctly (and insecurely)
Holder of controversial views, all of which my own.


Doug Heffernan

Can you make a screenshot of the smf_sessions structure and post it here? On a side note, what was the latest change/modification done to the forum prior to this happening?

Arantor

The structure is irrelevant; that's UTF-8 mb4 data and no install of SMF would have an MB4 compatible table. (It's almost certainly a utf8mb3/classic utf8 table since an ISO table wouldn't throw the error because ISO tables don't reference multibyte characters)

Specifically, the code points indicated are all emoji, and since emoji in particular is handled by a patch I wrote that *explicitly* re-encodes it differently, the only way it gets into the session is a mod that isn't using SMF's security routines.

So we're back to 'which mods are being used' and 'which of those are likely to be shoving anything into session anyway'.
Holder of controversial views, all of which my own.


TheBom

Quote from: Steve on March 16, 2024, 11:00:13 AMThere is no version 2.1.9 so did you mean 2.0.19?
Sorry, i mean 2.1.4

Mods;
Ultimate Menu   2.0.2
Stop Forum Spam   1.5.3
Select Language On Register   0.1
ListUnsubscribePost   1.0.1

TheBom

Quote from: Arantor on March 16, 2024, 07:40:01 PMThe structure is irrelevant; that's UTF-8 mb4 data and no install of SMF would have an MB4 compatible table. (It's almost certainly a utf8mb3/classic utf8 table since an ISO table wouldn't throw the error because ISO tables don't reference multibyte characters)

Yes, it's a utf8mb3_general_ci

For the record, its a upgraded forum all the way back from 2.0.9 (with all releases until 2.1.4)

Steve

My pet rock is not feeling well. I think it's stoned.

Advertisement: