? No Code Attached Yet
avatar toivo
toivo
11 Nov 2022

Steps to reproduce the issue

Currently, if the recording of IP address is enabled, the IP address is recorded in the the table #_action_logs. However, it is not possible to select IP address from the list under the heading Insert Tags in User Actions Log: Notification Mail at aadministrator/index.php?option=com_mails&view=template&layout=edit&template_id=com_actionlogs.notification&language=en-GB

Expected result

IP address available for selection when editing the mail template User Actions Log: Notification Mail, "Mail sent to administrators about new entries in the User Actions Log."

Actual result

IP address is not available under the heading Insert Tags.

System information (as much as possible)

Tested in Joomla 4.2.5-dev

Additional comments

Forum discussion with a proof-of-concept (POC) process and a copy of a test version of administrator/components/com_actionlogs/src/Model/ActionlogModel.php with three modifications at https://forum.joomla.org/viewtopic.php?f=813&t=997604

Update: as @SharkyKZ pointed out in the forum discussion, only the last change is required. If IP addresses are enabled, $message already contains the IP address and only the following addition is required, if a new tag 'ipaddress' has been added to the params column of the mail template:
$m['ipaddress'] = $message->ip_address;

Votes

# of Users Experiencing Issue
2/2
Average Importance Score
4.50

avatar toivo toivo - open - 11 Nov 2022
avatar toivo toivo - change - 11 Nov 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 11 Nov 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Nov 2022
avatar toivo toivo - change - 11 Nov 2022
The description was changed
avatar toivo toivo - edited - 11 Nov 2022
avatar toivo
toivo - comment - 11 Nov 2022

A sample ActionLog.php from POC - administrator/components/com_actionlogs/src/Model/ActionlogModel.php

ActionlogModel.php.txt


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39190.

avatar ReLater
ReLater - comment - 11 Nov 2022

The question is: Why?

Even the storage of IP addresses is in most cases a violation of data protection law. So why a feature that is actually largely avoided in Joomla for good reasons?

Sending IP addresses together with user names by email?

avatar jimmyxXx
jimmyxXx - comment - 11 Nov 2022

I would very much welcome this feature. I use these action log email notifications to see if someone other than me is trying to login to the administrator section of a joomla web site. Without the ip address included in the email these notifications are much less useful. IP Address inclusion can be disabled by default, but it would be great to be able to turn that on for those like me who would like to.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39190.

avatar ReLater
ReLater - comment - 11 Nov 2022

Hm. When I get an action log email I know that I'm not logged in or am logged in at that moment ;-) I seldomely know my own IP. I don't know what it helps to know the IP of a bad guy that logged in while I was sleeping.

If other users change something permissibly, then the IP is of no help in most cases because I do not know their IP at all and therefore cannot use it to check.

IP Address inclusion can be disabled by default, but it would be great to be able to turn that on for those like me who would like to.

But this requires further programming effort. Personally, I doubt it's worth the effort, but it's not for me to decide. I just don't like unnecessary, irritating settings that might rarely be needed.

If you have enabled IP and added the {IP}-tag to your template and then you disable the feature what will happen with the tag? Leave it unresolved in the template? Or add additional PHP code to remove it without resolving it or ... ?

avatar jimmyxXx
jimmyxXx - comment - 11 Nov 2022

In my case, I don't always look at the action log emails right away. A few hours later, I find it easiest to spot unwanted login attempts using the ip address. I know my own ip address, so I can easily spot anything other than my own ip address.

As for your last question, what happens if ip address tag is added to the email template and then ip logging is disabled, I'd say anything other than crashing the site should be fine; leave the tag unresolved, leave it blank, say ip address not logged... whatever is easiest.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39190.

avatar toivo toivo - change - 12 Nov 2022
The description was changed
avatar toivo toivo - edited - 12 Nov 2022
avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: ?
avatar Hackwar Hackwar - labeled - 22 Feb 2023

Add a Comment

Login with GitHub to post a comment