•  » Beta testing
  •  » Public Beta: Bot Protection Plugin for Piwigo

#16 2025-06-05 12:14:58

Schneider-Fotografie
Member
Berlin
2023-04-16
151

Re: Public Beta: Bot Protection Plugin for Piwigo

Katryne wrote:

Direct access via bookmark links was blocked by the checkbox on the plugin's 1st configuration tab: Block access without referer or cookies (or something like that, I can't get the configuration page back into English).
If I uncheck it, will the plugin continue to block robots?

Hello Katryne.

About the “Block access without Referer and cookies” option
This setting blocks a very specific type of automated traffic:
Bots that try to access your site directly without a referer and without any cookies.

Why block those?
Legitimate visitors usually:

- Arrive via links (search engines, forums, etc.) → this creates a referer
- Accept and send cookies during browsing

Suspicious bots often:

- Make direct requests with no referer
- Don’t handle cookies properly
- Try to scrape or scan your site in stealth mode
- So this setting can help filter out basic, unsophisticated bots.

Side effect: Bookmarks and direct access
If this option is enabled, it may also block:

- Visitors who open your site via bookmarks
- Visitors in private/incognito mode
- Users coming directly to the homepage
- That's why this feature is now set to false by default, so it won't affect regular users unless you choose to activate it manually.

Will the plugin still block bots?
Yes! Even if this setting is off, the plugin continues to block bots using:

- User-Agent detection (e.g. SemrushBot, AhrefsBot, MJ12bot, etc.)
- Custom bot name lists
- Blocked IP addresses

This checkbox is just an extra layer to catch very specific bot behavior. Use it if you want stricter blocking.


-Schneider-Photography- Gallery
----------------------------------
BYB | Block You Bots
„Stay human. I block the rest.“

Offline

 

#17 2025-06-05 12:31:53

hannah
Piwigo Team
2019-04-24
88

Re: Public Beta: Bot Protection Plugin for Piwigo

Hi Schneider,

I am sorry this happened to your extension. However you don't need to worry about the integrity of your plugin. The problem only had to do with our platform PEM.

When I redevelopped the platform 2 years ago I missed some permission checks for some API requests we use, including deleting extensions. It meant that with the right URL any user could delete an extension (= not good). This has been fixed and the specific actions can only be taken by admins, owners or authors of the extensions.

The hackers were only able to send api delete requests. Essentially they had a script to create and delete extensions continuously and some of the extensions the script created had the same ID as some recent existing extensions so they were collaterol damage of the extension deletion.

I hope this answers your questions

Offline

 

#18 2025-06-05 13:18:19

Katryne
Member
Provence, France
2016-12-03
591

Re: Public Beta: Bot Protection Plugin for Piwigo

Olaf, Thank you for explaining, and at my level of understanding...  I will now instal your plugin on my "living" Piwigos.

Last edited by Katryne (2025-06-05 13:18:53)


https://album.chauvigne.info/ v.16.4  PHP: 8.2.29
Système d'exploitation: Linux - Hébergeur 1&1-Ionos - MySQL: 5.7.42
Bibliothèque graphique: External ImageMagick 6.9.11-60

Offline

 

#19 2025-06-06 12:01:03

OHappyDay
Member
2023-02-08
197

Re: Public Beta: Bot Protection Plugin for Piwigo

I have installed the plugin and it works fine.

One drawback though: If I want to run a script from a shell to generate all picture sizes after I have uploaded new photos this does not work any more because my script (using wget) gets blocked.
I have to disable the plugin to make the script work. The whitelist does not allow me to unblock a certain IP or IP  range which would be helpful in this case.

Klaus

Offline

 

#20 2025-06-06 19:20:03

Schneider-Fotografie
Member
Berlin
2023-04-16
151

Re: Public Beta: Bot Protection Plugin for Piwigo

Hello Klaus

Allowed IP addresses now supported (IPv4 & IPv6)

Good news! The latest version 1.0.1of the plugin now supports whitelisting specific IP addresses, including both IPv4 and IPv6.

This is useful if you're running automated scripts (e.g. via wget, curl or cronjobs) that were previously blocked due to missing cookies or referrer headers.

What’s new:

- A file called whitelisted_ips.txt stores your allowed IPs.
- IPv4 and IPv6 formats are supported (including partial IPs like 192.168.).
- A new config constant BOT_PROTECTION_ALLOWED_IPS ensures consistent handling.
- You can manage allowed IPs directly in the admin panel (Whitelist tab).
- With this, your server tools and trusted external services can safely bypass the protection layer. No more disabling the plugin for internal use!

Best wishes from Berlin and have a nice weekend,
Olaf

Last edited by Schneider-Fotografie (2025-06-06 19:27:32)


-Schneider-Photography- Gallery
----------------------------------
BYB | Block You Bots
„Stay human. I block the rest.“

Offline

 

#21 2025-06-06 22:16:25

OHappyDay
Member
2023-02-08
197

Re: Public Beta: Bot Protection Plugin for Piwigo

Hi Olaf,

thanks.
I updated the plugin to version 1.1 (!) but I cannot find any setting that allows me to whitelist IPs or IP ranges.

Klaus

Offline

 

#22 2025-06-06 22:45:05

Katryne
Member
Provence, France
2016-12-03
591

Re: Public Beta: Bot Protection Plugin for Piwigo

Klaus, look at the bottom of the white list tab : scroll down, down, down...


https://album.chauvigne.info/ v.16.4  PHP: 8.2.29
Système d'exploitation: Linux - Hébergeur 1&1-Ionos - MySQL: 5.7.42
Bibliothèque graphique: External ImageMagick 6.9.11-60

Offline

 

#23 2025-06-06 23:42:08

OHappyDay
Member
2023-02-08
197

Re: Public Beta: Bot Protection Plugin for Piwigo

Sorry, I was looking there but nothing regarding IP white listing.

Should I remove the plugin, delete all bot related directories and reinstall again?

Offline

 

#24 2025-06-06 23:49:13

OHappyDay
Member
2023-02-08
197

Re: Public Beta: Bot Protection Plugin for Piwigo

I did a complete reinstall of the plugin but still no options to white list IPs

Offline

 

#25 2025-06-06 23:53:45

Schneider-Fotografie
Member
Berlin
2023-04-16
151

Re: Public Beta: Bot Protection Plugin for Piwigo

Hello,

Due to a server error, I uploaded the wrong version. I couldn't delete this version (1.0.1). The correct version (1.0.1b) is now online. I'm very sorry.

Olaf


-Schneider-Photography- Gallery
----------------------------------
BYB | Block You Bots
„Stay human. I block the rest.“

Offline

 

#26 2025-06-06 23:56:44

OHappyDay
Member
2023-02-08
197

Re: Public Beta: Bot Protection Plugin for Piwigo

Ok, thanks, looks better. Tested and works.

Last edited by OHappyDay (2025-06-07 00:01:52)

Offline

 

#27 2025-06-07 09:50:55

Katryne
Member
Provence, France
2016-12-03
591

Re: Public Beta: Bot Protection Plugin for Piwigo

Hello !
Once I emptied my .htaccess file from all my "Require not", I can see the plugin at work and it is doing its job quite satisfactorily. Many thanks, it's really convenient, far easier than my tedious tinkering.


https://album.chauvigne.info/ v.16.4  PHP: 8.2.29
Système d'exploitation: Linux - Hébergeur 1&1-Ionos - MySQL: 5.7.42
Bibliothèque graphique: External ImageMagick 6.9.11-60

Offline

 

#28 2025-06-07 12:15:48

OHappyDay
Member
2023-02-08
197

Re: Public Beta: Bot Protection Plugin for Piwigo

Thanks.

One note: today I noticed that a gptbot from openai.com was heavily crawling my website. I added "gptbot" to the list of blocked bots. It worked.

Offline

 

#29 2025-06-08 11:53:00

Katryne
Member
Provence, France
2016-12-03
591

Re: Public Beta: Bot Protection Plugin for Piwigo

Olaf, there is a robot that the plugin stopped 109 times, but I cannot identify it because the line does not display enough characters...

Mozilla/5.0 (Linux; Android 7.0;) AppleWebKit/537.36 (KHTML, like Gecko) Mobile Safari/537.36 (compa     109
Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)     2

Edit : maybe it's not the same robot, but several which begin with the same characters ???

Last edited by Katryne (2025-06-08 11:55:46)


https://album.chauvigne.info/ v.16.4  PHP: 8.2.29
Système d'exploitation: Linux - Hébergeur 1&1-Ionos - MySQL: 5.7.42
Bibliothèque graphique: External ImageMagick 6.9.11-60

Offline

 

#30 2025-06-08 12:05:02

OHappyDay
Member
2023-02-08
197

Re: Public Beta: Bot Protection Plugin for Piwigo

Look at the associated IP address. If it is 54.36.148.121 then it belongs to the ahrefs.com bot (it is a marketing company).

Last edited by OHappyDay (2025-06-08 12:06:05)

Offline

 
  •  » Beta testing
  •  » Public Beta: Bot Protection Plugin for Piwigo

Board footer

Powered by FluxBB