louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
55.86k stars 5.02k forks source link

Data too long for column 'info_json' when monitoring cloudfunctions.net Endpoints #5087

Open David-Development opened 1 week ago

David-Development commented 1 week ago

📑 I have found these related issues/pull requests

-

🛡️ Security Policy

Description

When monitoring Google cloudfunctions ER_DATA_TOO_LONG errors are thrown in the logs and no Certificate Expiry dates are shown.

👟 Reproduction steps

Any fake cloudfunction url does the trick for testing even though it returns 404 - Like: https://abc.cloudfunctions.net/

👀 Expected behavior

No errors in the logs / Certificate Expiry etc. are displayed correctly. Considering that the JSON it's trying to save has a significant amount of characters it probably makes sense to strip some infos from it..?

😓 Actual Behavior

No certificate expiry date is visible / errors are shown in logs

🐻 Uptime-Kuma Version

2.0.0-dev

💻 Operating System and Arch

Docker

🌐 Browser

Google Chrome 128.0.6613.114

🖥️ Deployment Environment

📝 Relevant log output

uptime-kuma    |   code: 'ER_DATA_TOO_LONG',
uptime-kuma    |   errno: 1406,
uptime-kuma    |   sqlState: '22001',
uptime-kuma    |   sqlMessage: "Data too long for column 'info_json' at row 1",
uptime-kuma    |   sql: 'insert into `monitor_tls_info` (`info_json`, `monitor_id`) values (\'{\\"valid\\":true,\\"certInfo\\":{\\"subject\\":{\\"CN\\":\\"misc.google.com\\"},\\"issuer\\":{\\"C\\":\\"US\\",\\"O\\":\\"Google Trust Services\\",\\"CN\\":\\"WR2\\"},\\"subjectaltname\\":\\"DNS:misc.google.com, DNS:*.actions.google.com, 
....
:EC:'... 60832 more characters
uptime-kuma    | }
louislam commented 1 week ago

Thanks for the report. I think we have to review all VARCHAR/TEXT fields.