disable_functions in /etc/php.ini
Prohibited to use dangerous functions like
phpinfo,eval,passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,fsocket,fsockopen
discovered by: topsec(lizhiqiang)
# Steps to reproduce:
1. Activate LocalFiles Editor Tools

2. Write a shell script file

3. Now you can execute commands on this server


4. Fix advices
disable_functions in /etc/php.ini
Prohibited to use dangerous functions like
phpinfo,eval,passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,fsocket,fsockopen
discovered by: topsec(lizhiqiang)
<!-- github-sync-id:238196920 -->
Hi @Akityo nice report. Actually it's not a bug, it's a feature. LocalFiles Editor let you write some PHP code and it's executed by Piwigo. No more dangerous than giving the webmaster the ability to install a plugin.
Hi @Akityo nice report. Actually it's not a bug, it's a feature. LocalFiles Editor let you write some PHP code and it's executed by Piwigo. No more dangerous than giving the webmaster the ability to install a plugin.
<!-- github-comment-id:310836476 -->
Why would they be disabled? The code added by LocalFiles Editor is no more harmful than the code added with a plugin. Disabling those functions is a decision for the hoster. Disabling those functions will be problematic to run Piwigo.
Why would they be disabled? The code added by LocalFiles Editor is no more harmful than the code added with a plugin. Disabling those functions is a decision for the hoster. Disabling those functions will be problematic to run Piwigo.
<!-- github-comment-id:310893666 -->
In my opinion WebAPP just like a sandbox , some webserver will install a lot of WebAPP, If one of those WebAPP could get The System Shell , will be affect to others WebAPP . Just advises that It shouldn't giving that powerful privilege. like what you said before ,there are No more dangerous than giving the webmaster the ability to install a plugin.
In my opinion WebAPP just like a sandbox , some webserver will install a lot of WebAPP, If one of those WebAPP could get The System Shell , will be affect to others WebAPP . Just advises that It shouldn't giving that powerful privilege. like what you said before ,there are No more dangerous than giving the webmaster the ability to install a plugin.
<!-- github-comment-id:310894239 -->
What I say is that code in plugins or added by LocalFiles Editor is just as powerful/harmful as the code in Piwigo core.
The real problem is that an "unexpected" person may get an access to the administration. Not that the administration gives a lot of power.
What I say is that code in plugins or added by LocalFiles Editor is just as powerful/harmful as the code in Piwigo core.
The real problem is that an "unexpected" person may get an access to the administration. Not that the administration gives a lot of power.
<!-- github-comment-id:310894606 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Steps to reproduce:
disable_functions in /etc/php.ini
Prohibited to use dangerous functions like
phpinfo,eval,passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,fsocket,fsockopen
discovered by: topsec(lizhiqiang)
Hi @Akityo nice report. Actually it's not a bug, it's a feature. LocalFiles Editor let you write some PHP code and it's executed by Piwigo. No more dangerous than giving the webmaster the ability to install a plugin.
@plegall fine, that's no't a bug ; in addition i hope those dangerous functions could be disable.
Why would they be disabled? The code added by LocalFiles Editor is no more harmful than the code added with a plugin. Disabling those functions is a decision for the hoster. Disabling those functions will be problematic to run Piwigo.
In my opinion WebAPP just like a sandbox , some webserver will install a lot of WebAPP, If one of those WebAPP could get The System Shell , will be affect to others WebAPP . Just advises that It shouldn't giving that powerful privilege. like what you said before ,there are No more dangerous than giving the webmaster the ability to install a plugin.
What I say is that code in plugins or added by LocalFiles Editor is just as powerful/harmful as the code in Piwigo core.
The real problem is that an "unexpected" person may get an access to the administration. Not that the administration gives a lot of power.
Ok , I get it . Have a nice day ,bro .