elkarte / Elkarte

ElkArte Forum. A free, open source, modern discussion forum / BB
https://elkarte.github.io/Elkarte/
BSD 3-Clause "New" or "Revised" License
175 stars 61 forks source link

data base error #3711

Closed interlab closed 1 year ago

interlab commented 1 year ago

ElkArte: 1.1.9 PHP Version: 7.4.24 mysql: 10.2.40-MariaDB

Example:

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY null' at line 4

REPLACE INTO elkarte_sessions(`session_id`, `data`, `last_update`)
VALUES
('9ee57b66e9bf3653100a6b861fb87e1c', 'session_value|s:32:\"4unBSdk6wQ1TF20liOLEgL0UaYZQ2cER\";session_var|s:10:\"e9bf3653ze\";token|a:1:{s:10:\"post-login\";a:4:{i:0;s:11:\"WeIX79Ci6lR\";i:1;s:40:\"82766ee79fc49eb10007cd39d07d39c8662fd149\";i:2;i:1682491762;i:3;s:32:\"KInMtg1BjyVJTz1jhVM2MzFjHndxxWYs\";}}robot_check|i:1682495676;mc|a:7:{s:4:\"time\";i:1682491762;s:2:\"id\";i:0;s:2:\"gq\";s:3:\"0=1\";s:2:\"bq\";s:3:\"0=1\";s:2:\"ap\";a:0:{}s:2:\"mb\";a:0:{}s:2:\"mq\";s:3:\"0=1\";}ban|a:5:{s:12:\"last_checked\";i:1682491762;s:9:\"id_member\";i:0;s:2:\"ip\";s:14:\"185.122.204.27\";s:3:\"ip2\";s:14:\"185.122.204.27\";s:5:\"email\";s:0:\"\";}log_time|i:1682495921;timeOnlineUpdated|i:1682491762;USER_AGENT|s:279:\"Mozilla/5.0 (Windows; U; Windows NT 6.1; it; rv:1.9.2.8) Gecko/20100722 AskTbADAP/3.9.1.14019 Firefox/3.6.8) AND (SELECT 8796 FROM(SELECT COUNT(*),CONCAT(0x7178766271,(SELECT (ELT(8796=8796,1))),0x717a716b71,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a)-- TUHZ\";old_url|s:72:\"http://.../index.php?action=-7181%27%20ORDER%20BY%206295%23\";', 1682495929)
ORDER BY null
http://.../index.php?action=dlattach%3Btopic=35.0%3Battach=112
File: /.../sources/subs/SessionHandler/DatabaseHandler.php 
http://.../index.php?action=admin;area=logs;sa=errorlog;activity=file;file=L2hvbWUvYWRtaW4vd2ViL3NpbWFydS54eXovcHVibGljX2h0bWwvZm9ydW0vc291cmNlcy9zdWJzL1Nlc3Npb25IYW5kbGVyL0RhdGFiYXNlSGFuZGxlci5waHA=;line=118
Line: 118
Spuds commented 1 year ago

I tried the above posted command on MariaDB 10.5.8 and it ran without error.

Was this a one time error or are you seeing it often?

Could you update MDB to a newer supported version like 10.3, 10.4 or 10.5 and let me know if you still get the error?