terrylinooo / shieldon

Web Application Firewall (WAF) for PHP.
https://shieldon.io
MIT License
851 stars 98 forks source link

Switch trusted_bot.enable not working #18

Closed maverjk closed 4 years ago

maverjk commented 4 years ago

In \shieldon\templates\panel\setting\components.php

on line 42 you have an error: <input type="checkbox" name="components__trusted_bot__enable" class="toggle-block" value="on" data-target="component-trustedbot-section" <?php $this->checked('online_session_limit.enable', true); ?> />

It have to be: <input type="checkbox" name="components__trusted_bot__enable" class="toggle-block" value="on" data-target="component-trustedbot-section" <?php $this->checked('components.trusted_bot.enable', true); ?> />

to make "trustedbot-section" switch working!

terrylinooo commented 4 years ago

Thanks for your reporting. I will fix it later.

maverjk commented 4 years ago

I have been looking also functional code and I noticed that in "\shieldon\src\Shieldon\Firewall.php" line 464:

        if ($trustedBotSetting['enable']) {
            $componentTrustedBot = new TrustedBot();

            // This component will only allow popular search engline.
            // Other bots will go into the checking process.
            $this->shieldon->setComponent($componentTrustedBot);
        }

there isn't any usage of "strict_mode".

Is that functionality still in development? or is there some other reference somewhere else?