Geeklog-Plugins / gus

Geeklog Usuage Statistics Plugin (gus)
1 stars 1 forks source link

Gus has a problem saving some user agents #13

Open eSilverStrike opened 5 years ago

eSilverStrike commented 5 years ago

Found an error where GUS has problem saving a user agent.

It appears to be with the platform column when it contains brackets.

Here is the error from the Geeklog error log:

Wed 03 Oct 2018 21:51:54 EDT - ip address - 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Mozilla',
                version = '5.0',
                platform = '[Robot]'' at line 3 in /plugins/gus/functions.inc:773. SQL in question: INSERT INTO gl_gus_user_agents SET
                user_agent = '\'Mozilla/5.0 (compatible; DuckDuckBot-Https/1.1; https://duckduckgo.com/duckduckbot)\'',
                browser = ''Mozilla',
                version = '5.0',
                platform = '[Robot]'  
eSilverStrike commented 4 years ago

Haven't seen this issue in a while. Wonder if it has been fixed...