Giter Site home page Giter Site logo

Comments (9)

tommy-muehle avatar tommy-muehle commented on June 9, 2024 2

The bug is here:
https://github.com/psecio/iniscan/blob/master/src/Psecio/Iniscan/Rule.php#L369
Instead of $test->value which returns
https://github.com/psecio/iniscan/blob/master/src/Psecio/Iniscan/rules.json#L148
should be $ini[$test->key]Β are set.

from iniscan.

enygma avatar enygma commented on June 9, 2024

Hmm, interesting - I'll have to look into this one further to see what's happening here. There's "casting" functionality in the Psecio\Iniscan\Cast class that tries to normalize out the 1/0/Off/On/etc values to the same result but maybe there's something getting lost in the shuffle there with some of the PHP 7 updates.

from iniscan.

derFunk avatar derFunk commented on June 9, 2024

I encountered the same thing. +1 for fixing it.

from iniscan.

tommy-muehle avatar tommy-muehle commented on June 9, 2024

@enygma The cast is correct. It seems more an error with the "current value" column.
See my example for "allow_url_fopen".

The real value:
bildschirmfoto 2017-03-10 um 07 27 09

The result of iniscan:
bildschirmfoto 2017-03-09 um 12 04 04

Current value shows "0" but is definitly 1 ("On").

from iniscan.

enygma avatar enygma commented on June 9, 2024

Hmm, trying to reproduce this one but it seems that things are reporting back correctly on a PHP 7.0 configuration file. I've tried:

allow_url_fopen = Off
allow_url_fopen = 0

Both seem to work as expected:

PASS   | ERROR    | 4.0.3       | 0             | allow_url_fopen               | Do not allow the opening of remote file resources ('Off' recommended)

Is there something I'm missing to reproduce this issue?

from iniscan.

sebastienbarre avatar sebastienbarre commented on June 9, 2024

(discard warning about session.cookie_httponly, it was my mistake, sorry about the noise)

from iniscan.

enygma avatar enygma commented on June 9, 2024

@tommy-muehle any update on how to reproduce this?

from iniscan.

tommy-muehle avatar tommy-muehle commented on June 9, 2024

@enygma
Sorry for the late response!

I tried it also with my iniscan Docker container and this ini file.

Here are the steps to reproduce:

cd /tmp
curl -o php.ini https://gist.githubusercontent.com/tommy-muehle/4a59294d1799c19254780788f1f6f1e6/raw/e6133995df411ecf158892d338512a11949863d6/php.ini
docker run --rm -ti -v $(pwd):/tmp dockerizedphp/iniscan scan --fail-only --path=/tmp/php.ini

Inside the container runs PHP 7.1 if this is necessary.

from iniscan.

noraj avatar noraj commented on June 9, 2024

For upload_max_filesize (16M -> 2M), post_max_size (24M -> 8M) and memory_limit (256M -> 128M) it returns me the default value and not the current value. For allow_url_fopen it cast me On to 0. And for disable_functions it displays and empty value instead of pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,.
Also for session.use_strict_mode the value is 0 but is displays 1, however it still detect it as failed so the cast occurs after.
Happening on PHP 7.4 if that matters.

from iniscan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.