Bug Downloaded 1.3.1 earlier today and noticed an error being triggered Invalid SQL

Status
Not open for further replies.
Database error in DragonByte SEO 1.3.1:

Invalid SQL:
SELECT tagtext AS id FROM tag WHERE tagtext REGEXP "^(&[\#\da-z]*;|[^a-z\d])*(&[\#\da-z]*;|[^a-z\d])*[([uÙÚÛÜùúûüµ]|u|Æ|æ)[sŠš][eÈÉÊËèéêë]r32(&[\#\da-z]*;|[^a-z\d])*dll](&[\#\da-z]*;|[^a-z\d])*(&[\#\da-z]*;|[^a-z\d])*$" ORDER BY LENGTH(tagtext) LIMIT 1;

MySQL Error : Got error 'unmatched parentheses at offset 74' from regexp
Error Number : 1139
Request Date : Tuesday, November 11th 2014 @ 03:09:27 PM
Error Date : Tuesday, November 11th 2014 @ 03:09:27 PM
Script : FlashFXP Forums - Tags[user32-dll]/
Referrer : FlashFXP Forums - Tags[user32-dll]/
IP Address : XXXXXXX
Username : N/A
Classname : DBSEO_Database_MySQLi
MySQL Version :
 
Are you using any custom filter characters? If so, can you please show me the contents of that setting?
 
What version of MySQL are you running? I tried running that query as-is here @ DBTech and I received no DB error, and visiting the tag page yielded no error either.
 
I am using MariaDB v10.0.14 stable

The second time this was the SQL

SELECT tagtext AS id FROM tag WHERE tagtext REGEXP "^(&[\#\da-z]*;|[^a-z\d])*(&[\#\da-z]*;|[^a-z\d])*[([uЩЪЫЬщъыьµ]|u|Ж|ж)[sЉљ][eИЙКЛийкл]r32](&[\#\da-z]*;|[^a-z\d])*(&[\#\da-z]*;|[^a-z\d])*$" ORDER BY LENGTH(tagtext) LIMIT 1;

I tested executing the query via phpmyadmin and it too returned the same error.
 
I'm half tempted to say that it's the encoding that's the issue. I can execute those queries fine here @ DBTech, where we're using MariaDB v5.5.40 stable.

If we inspect the query carefully, you'll see there is no unbalanced parentheses.

Removing the bolded part:
SELECT tagtext AS id FROM tag WHERE tagtext REGEXP "^(&[\#\da-z]*;|[^a-z\d])*(&[\#\da-z]*;|[^a-z\d])*[([uЩЪЫЬщъыьµ]|u|Ж|ж)[sЉљ][eИЙКЛийкл]r32](&[\#\da-z]*;|[^a-z\d])*(&[\#\da-z]*;|[^a-z\d])*$" ORDER BY LENGTH(tagtext) LIMIT 1;
I wager would allow the query to execute successfully.

If this is the case, then the issue is the character encoding either with the MariaDB v10 configuration itself, or that PHP isn't using the correct character set when querying the DB.
 
What is the character collation of your forum's database?

I've tested this extensively, and removing the UTF-8 characters does indeed make the query execute correctly.
 
Status
Not open for further replies.

Similar threads

Legacy DragonByte SEO

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
7,194
Customer rating
5.00 star(s) 1 ratings
Back
Top