Skip to content
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

Do not leak full path of file in error logs #18895

Closed
cedric-anne opened this issue Feb 3, 2025 · 0 comments · Fixed by #18909
Closed

Do not leak full path of file in error logs #18895

cedric-anne opened this issue Feb 3, 2025 · 0 comments · Fixed by #18909
Assignees
Milestone

Comments

@cedric-anne
Copy link
Member

Currently in some _log files, we leak the full path to the impacted files.

Example in php-errors.log:

[2024-04-09 17:33:34] glpiphplog.WARNING:   *** PHP User Warning (512): Unable to bind to LDAP server `veve.geg.efe.:389` anonymously
error: Can't contact LDAP server (-1) in /home/francois/www/glpi-core/10bf/htdocs/src/AuthLDAP.php at line 3194
  Backtrace :
  src/AuthLDAP.php:3194                              trigger_error()
  src/AuthLDAP.php:1666                              AuthLDAP::connectToServer()
  front/authldap.form.php:67                         AuthLDAP::testLDAPConnection()
  public/index.php:82                                require()

In certain security contexts (at our customers, in the cloud, etc.), given that we can consult/download these files directly in the GLPI 11 interface, we should only see the end of the path to the file (example: "src/AuthLDAP.php").

And yes, this information can also be found in the "System" tab of the general configuration of GLPI, customers/partners have already asked us for patches to hide this information: perhaps take advantage of this to add a variable like (simple example to think about) if installation mode "CLOUD", do not display the system information.

The full paths are also available, in debug mode, when an exception occurs, but they should not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants