Using SUBSTR in query breaks the question


Whenever I use SUBSTR for an SQL query, it breaks the question by showing the following message "Sorry, you don't have permission to see that".
Here's the screenshot

There is also nothing in the logs to indicate what is going wrong.

The Diagnostic Info;

"browser-info": {
"language": "en-US",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36",
"vendor": "Google Inc."
"system-info": {
"file.encoding": "UTF-8",
"": "OpenJDK Runtime Environment",
"java.runtime.version": "",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "",
"java.version": "",
"": "OpenJDK 64-Bit Server VM",
"java.vm.version": "",
"": "Linux",
"os.version": "3.10.0-1160.36.2.el7.x86_64",
"user.language": "en",
"user.timezone": "GMT"
"metabase-info": {
"databases": [
"hosting-env": "unknown",
"application-database": "mysql",
"application-database-details": {
"database": {
"name": "MySQL",
"version": "8.0.19"
"jdbc-driver": {
"name": "MariaDB Connector/J",
"version": "2.7.6"
"run-mode": "prod",
"version": {
"date": "2022-10-17",
"tag": "v0.44.5",
"branch": "release-x.44.x",
"hash": "29fab4d"
"settings": {
"report-timezone": "Africa/Lagos"

Hi @oaajibade
It's caused by a WAF blocking the request:

Thanks for this.

Is there any walkaround to address this problem?

@oaajibade Yes, fix your WAF or disable it.

Thanks @flamber.
I guess that was the issue. Quite surprised why Cloudflare has this aggressive behavior.