Support

Admin Tools

#38324 Email on failed login

Posted in ‘Admin Tools for Joomla! 4 & 5’
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
4.2.6
PHP version
n/a
Admin Tools version
7.2.0

Latest post by nicholas on Friday, 13 January 2023 07:50 CST

thepromatch

Hi, 

whenever a user is blocked because he has repeatedly entered wrong login information, he/she currently gets the following email

We have detected suspicious activity from your IP address. Your access to this site is temporarily suspended. If you are the administrator of this site and have blocked your own IP address on accident please visit https://piquano.com/administrator/[email protected] where [email protected] is the email address of your (Super User) account. This URL will only send you an email if the IP address from which you are accessing it is being blocked by Admin Tools. If you are not blocked no email will be sent; you don't need an email with instructions to unblock your IP if your IP is not blocked.

I don't think that this is correct, as the link to the SuperUser recovery should not be visible for Registered Users. I cannot find the right setting to turn this off. Can you please advise?

Thanks and regards

Uwe

nicholas
Akeeba Staff
Manager

I'll start by saying that you can definitely edit the email template and remove the rescue mode information if you want. That's why email templates are editable.

I will now tell you why the default email templates are correct and do not pose a security threat to your site. It's something that I did put a LOT of thought into before implementing the Rescue Mode. I don't throw code over the wall and hope it lands safe. For every hour I've spent writing code, I've spent another three to ten hours planning, thinking, and red-teaming it.

The email is correct because it's the IP address which is blocked, not a specific username.

It is absolutely possible that the Super User of a site is trying to log into the frontend of the site using a different, non-privileged username and gets the username or password wrong. As a result their IP address is blocked and they can no longer access the site. This is not a theoretical issue. It's something which has happened, multiple times in the past, to actual clients. That's why this information was put there.

Please read the documentation about the Rescue Mode. The URL in the email will not work unless you replace the email address with that of a Super User, i.e you'd need to know that first. Even so, it does not "magically" give you access to the site. It will send the Super User an email, the Super User has to click on the link in that email within a few minutes of it being sent and then they have a few more minutes to access the site from the exact same browser and IP address they used when clicking the link. And even then they are not logged into the site, they are merely looking at the login page of Joomla. Therefore they also need to provide the username and password of the Super User and go through the Multi-factor Authentication the Super User has set up on their user account (if you haven't done so — do it now, it is one of the most important features to protect your user account in Joomla which is why I donated Akeeba LoginGuard to the Joomla project, spending a month of my life turning it into Joomla's Multi-factor Authentication feature last May).

Further to that, the Rescue Mode URL structure is not a secret. It's described in detail in our documentation which is publicly available. The fact that you're using Admin Tools is given away by using the default email template shipped with Admin Tools. Still, it's not a security issue because this feature is designed so it cannot be exploited.

Now you have all the information and you can make an informed choice.

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!

thepromatch

Hi Nicholas,

That's fine with me and I agree with your thoughts. Nevertheless - but that's maybe my own fault - I cannot find any email template, which has carries the information about the blocked IP and/or the rescue mode information. I have checked the 11 email templates (/administrator/index.php?option=com_admintools&view=Emailtemplates) that come with AdminTools but none of them shows this text. It seems that this information has to be edited in another place. If I am wrong, could you please direct me to the correct place?

Thanks and regards

Uwe

 

nicholas
Akeeba Staff
Manager

System, Mail Templates, edit the “Admin Tools: Automatic IP blocking” template.

Remove the {RESCUEINFO} bit — this is what prints out this information in the email.

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!

thepromatch

Sorry to ask again, Nicholas. I don't get it. This is the email, which is sent to the Administrator. But in the case I am referring to, the email was sent to the regular registered user. 

nicholas
Akeeba Staff
Manager

The only email template which include the {RESCUEINFO} block is the “Admin Tools: Automatic IP blocking” one. Remember that you explicitly asked me about an email.

However, the text “We have detected suspicious activity from your IP address. Your access to this site is temporarily suspended” does not appear in any of the default email templates. This is the default “Show this message to blocked IPs” message shown in the browser when a user's IP address is automatically blocked. If you do use the default text then we automatically append the Rescue Mode information. Go to Admin Tools, Web Application Firewall, Configure WAF, and change the “Show this message to blocked IPs” to something different. Again, this IS NOT an email message. There is no such message sent by email.

Hm… I see that you are German. Did you file this ticket relaying something someone else told you, using the word "Nachricht" which —if my very rusty German is to be trusted— is used for both "message" and "email"? That would explain why you ask me about an email when you are most likely talking about a message on the screen.

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!

thepromatch

OK. Now I get it. I knew about the field you mention but I was not aware that the Rescue Mode Information is automatically appended to the default text. I have changed this string to something more individual. This probably solves the problem. Thanks again and have a great weekend!

nicholas
Akeeba Staff
Manager

You're welcome!

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!