Support

Admin Tools

#43319 Social login callback blocked by htaccess maker

Posted in ‘Admin Tools for Joomla!’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
6.
PHP version
8.4.25
Admin Tools version
7.9.1

Latest post by nicholas on Monday, 07 September 2026 05:54 CDT

peterader
Hi,

I had an issue where the Social login callbacks were blocked by the htaccess maker rule: Protect against common file injection attacks. Apparently it doesn't like a get parameter starting with https. I could solve it by adding this custom rule to the beginning of the htaccess file:

# Allow supported Akeeba Social Login OAuth callbacks
RewriteCond %{HTTPS} =on [OR]
RewriteCond %{HTTP:X-Forwarded-Proto} =https
RewriteCond %{HTTP_HOST} ^www\.MYDOMAIN\.com(?::443)?$ [NC]
RewriteCond %{REQUEST_URI} ^/index\.php$ [NC]
RewriteCond %{QUERY_STRING} ^(?:(?:option|group|plugin|format|iss|code|scope|authuser|prompt|state|session_state)=[^&]*&?)+$ [NC]
RewriteCond %{QUERY_STRING} (^|&)option=com_ajax(&|$) [NC]
RewriteCond %{QUERY_STRING} (^|&)group=sociallogin(&|$) [NC]
RewriteCond %{QUERY_STRING} (^|&)plugin=(google|microsoft|github|facebook)(&|$) [NC]
RewriteCond %{QUERY_STRING} (^|&)format=raw(&|$) [NC]
RewriteCond %{QUERY_STRING} (^|&)code=[^&]+(&|$) [NC]
RewriteRule ^index\.php$ - [END]

It's fixed for me so I marked the ticket low priority but it took me a good while to even notice and to find the reason for the error. Maybe it could be fixed at the root eventually. Thank you!

nicholas
Akeeba Staff
Manager

It looks a bit too much. AFAIK only Google sends a scope that's formatted as a URL.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

peterader
You're absolutely right. I didn't check the other integrations and wrongly assumed they follow the same pattern. In fact, only Google is blocked by the htaccess rule and there is no need to include the other providers. (I'm only using those four so I didn't check any of the other ones either).
Only with google:

RewriteCond %{HTTPS} =on [OR]
RewriteCond %{HTTP:X-Forwarded-Proto} =https
RewriteCond %{HTTP_HOST} ^www\.MYDOMAIN\.com(?::443)?$ [NC]
RewriteCond %{REQUEST_URI} ^/index\.php$ [NC]
RewriteCond %{QUERY_STRING} ^(?:(?:option|group|plugin|format|iss|code|scope|authuser|prompt|state|session_state)=[^&]*&?)+$ [NC]
RewriteCond %{QUERY_STRING} (^|&)option=com_ajax(&|$) [NC]
RewriteCond %{QUERY_STRING} (^|&)group=sociallogin(&|$) [NC]
RewriteCond %{QUERY_STRING} (^|&)plugin=google(&|$) [NC]
RewriteCond %{QUERY_STRING} (^|&)format=raw(&|$) [NC]
RewriteCond %{QUERY_STRING} (^|&)iss=https://accounts\.google\.com(&|$) [NC]
RewriteCond %{QUERY_STRING} (^|&)code=[^&]+(&|$) [NC]
RewriteRule ^index\.php$ - [END]

nicholas
Akeeba Staff
Manager

I am worried about the [END] rule as it stops all other rules in the file from running. It would probably be best to disable the entire "Protect against common file injection attacks".

No, there can be no built-in workaround in the .htaccess Maker. If I add an exception for one extension then people will reasonably ask me to do it for others. I trust myself with what I do. I do not want to become indirectly responsible for what everyone else is doing with their extensions. I'd rather keep telling people to disable "Protect against common file injection attacks" in such a use case.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!