-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Translate login events only on GLPI UI #22418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 11.0/bugfixes
Are you sure you want to change the base?
Conversation
Refactored dynamic translation of event messages from the data processing loop to the getSpecificValueToDisplay method for the 'message' field. This centralizes message formatting and ensures translations are applied only when displaying messages.
3c3f99e to
9f41f6d
Compare
cedric-anne
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, event logs should always be translated in the GLPI default language (defined at installation), or never translated at all.
I think all Event::log() occurences have to be handled the same way, but I am not sure your proposal would be easy to maintain.
|
I'm not in favor of that change. What GLPI logs has never been designed to be used in a log analyzer; that would be a complete distinct feature to be really reliable. |
|
It’s not only useful for a log analyzer. |
Checklist before requesting a review
Please delete options that are not relevant.
Description
This PR logs the login events in English in the DB and the
files\_log\event.loginstead of relying on the Web user browser language. This allows for implementing Fail2Ban (1, 2) and other security mechanisms independent of the language that the user logs in to GLPI to log and protect against brute-force attacks, while still providing the translation to the user in the GLPI UI.Screenshots (if appropriate):
But in the Administration > Logs > Event Logs, it's shown in the current GLPI user language:
In Administration > Logs > events.log, it's shown in English since the log information is saved in English in the DB and the
event.loglog file.