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

mkdir ($dir,"777") #11843

Closed
GerardBol opened this issue Jul 5, 2017 · 5 comments
Closed

mkdir ($dir,"777") #11843

GerardBol opened this issue Jul 5, 2017 · 5 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@GerardBol
Copy link

I use rsfirewall in my joomla site

this rsfirewall detects mkdir($dir,"777") in the source of piwik. Why 777 and set all access open?

@Findus23
Copy link
Member

Findus23 commented Jul 5, 2017

Do you know which file rsfirewall is complaining about? Most reference to 777 I found are in the tests, which shouldn't influence piwik users (as the tests/ directory isn't included in the piwik zip)

@Findus23
Copy link
Member

Findus23 commented Jul 5, 2017

I found two places where piwik does a chmod 777. All other chmod are using 755 or 600
https://github.com/piwik/piwik/blob/3.x-dev/core/Profiler.php#L324
https://github.com/piwik/piwik/blob/3.x-dev/core/Db/BatchInsert.php#L268

@GerardBol
Copy link
Author

GerardBol commented Jul 5, 2017 via email

@Findus23
Copy link
Member

Findus23 commented Jul 5, 2017

Piwik/core/Updater/Migration/Db/Factory.php
Possible PHP Injection - function name contains only numbers.
_1(10)View file contents

I am not sure what your tester means, but I coudn't find a function which name only contains numbers in https://github.com/piwik/piwik/blob/3.x-dev/core/Updater/Migration/Db/Factory.php

pw/Piwik/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php
pw/Piwik/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php
pw/Piwik/vendor/pear/archive_tar/Archive/Tar.php
pw/Piwik/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php
pw/Piwik/vendor/twig/twig/lib/Twig/Cache/Filesystem.php
pw/Piwik/vendor/twig/twig/.php_cs.dist
pw/Piwik/vendor/piwik/decompress/libs/PclZip/pclzip.lib.php
pw/Piwik/vendor/szymach/c-pchart/.scrutinizer.yml
pw/Piwik/libs/bower_components/materialize/.npmignore

Those are third-party libraries which may or may not have good reasons for doing that. You'll need to contact them if you want to know why they are using 777.

pw/Piwik/plugins/LanguagesManager/Commands/CreatePull.php

This plugin uses shell_exec to create pull requests updating the language files (#11820)
I doubt a piwik user will use this function.

@mattab
Copy link
Member

mattab commented May 19, 2020

Thanks for contributing to this issue. As it has been a few months since the last activity and we believe this is likely not an issue anymore, we will now close this. If that's not the case, please do feel free to either reopen this issue or open a new one. We will gladly take a look again!

@mattab mattab closed this as completed May 19, 2020
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

3 participants