[4.0][API][com_actionslogs] keep track of API requests#27094
[4.0][API][com_actionslogs] keep track of API requests#27094wilsonge merged 21 commits intojoomla:4.0-devfrom alikon:patch-122
Conversation
|
Does this REALLY need a new event? Couldn’t |
|
yes again 😄 |
|
Looks good to me. Just needs some tests |
|
Please fix conflicts. |
|
conflict solved |
|
| 'username' => $user->username, | ||
| 'accountlink' => 'index.php?option=com_users&task=user.edit&id=' . $user->id, | ||
| 'url' => $this->app->get('uri.route'), | ||
| 'url' => urldecode($this->app->get('uri.route')), |
There was a problem hiding this comment.
This can output potential XSS.
There was a problem hiding this comment.
any suggestions ?
what about
urldecode(htmlspecialchars($this->app->get('uri.route'), ENT_QUOTES, 'UTF-8'));|
I have tested this item ✅ successfully on afb8f8f This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27094. |
|
Having thought about this I think we probably want to have an additional flag for this API setting. Because in the case you have mobile apps using the API actively you're going to end up having too many entries in action logs. But you might well still want other actions logged in the component. |
|
I have tested this item ✅ successfully on afb8f8f This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27094. |
Co-Authored-By: Quy <quy@fluxbb.org>
Co-Authored-By: Quy <quy@fluxbb.org>
Co-Authored-By: Quy <quy@fluxbb.org>
Co-Authored-By: Quy <quy@fluxbb.org>
|
I have tested this item ✅ successfully on 4a38077 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27094. |
|
Thanks! |
|
thanks folks + thanks to covid19 for lockdown |




Summary of Changes
listen event
onAfterDispatchto keep track of API requests on actionlogsTesting Instructions
make some requests GET for example:
/api/index.php/v1/plugins
/api/index.php/v1/users
/api/index.php/v1/config/application
/api/index.php/v1/content/article
....
etc...
test other verbs as welll
Expected result
API requests logged

something like
Actual result
N/A
Documentation Changes Required
maybe