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

Hardcoded /etc/debian file read attempts unhandled failure when open_basedir in effect #3985

Closed
darkpoetry opened this issue Nov 18, 2024 · 2 comments

Comments

@darkpoetry
Copy link

Describe the bug
Attempts to determine if the OS is Debian accesses files outside the server root and causes complete failure at file selector stage of app use.

To Reproduce
Steps to reproduce the behavior:

  • Complete initial install steps
  • Attempt to select a file
  • Get no error message, just an unresponsive UI.
  • Read logfile, which says:

file_exists(): open_basedir restriction in effect. File(//etc/debian_version) is not within the allowed path(s): (/home/s/.composer:/home/s/web/cloud.s.com/public_html:/home/s/web/cloud.s.com/private:/home/s/web/cloud.s.com/public_shtml:/home/s/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt) at /home/s/web/cloud.s.com/public_html/apps/libresign/vendor/libresign/whatosami/src/OperatingSystem.php#105

Expected behavior
Determines, assuming it has to, whether it's on Debian using some other means that does not involve attempting to access the filesystem outside the NC instance.
Correctly selects a file and proceeds to next dialog.

Alternatively: Permit the debian / not debian to be a setting if it's necessary so that the app can operate when open_basedir is enabled, which is a key safeguard for securing php based servers.

Environment information (please complete the following information):

  • OS: Debian 12.8 with Hestia control panel
  • Browser Firefox
  • LibreSign Version 10.2.0
  • Nextcloud Server Version 30.0.0.2
  • See above

Additional context
Similar to #1279

@github-project-automation github-project-automation bot moved this to 0. Needs triage in Roadmap Nov 18, 2024
@vitormattos
Copy link
Member

Will be fixed by this:
LibreSign/whatosami#1

@vitormattos
Copy link
Member

Could you check again at the newest release of LibreSign?

I made changes at this point to check open_basedir before retrieve the file.

Closing this issue as solved.

If this issue persists, don't hesitate to open a new issue making reference to this.

Note

If you like this app, don't hesitate to help us

Ways to help this project:

@github-project-automation github-project-automation bot moved this from 0. Needs triage to 4. to release in Roadmap Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 4. to release
Development

No branches or pull requests

2 participants