[3.3][RC] Filter by country - version 1.0.16

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Anti-Spam Guide
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
david63
Registered User
Posts: 18303
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: [3.3][RC] Filter by country - version 1.0.15

Post by david63 »

Just noticed this
MarkDHamill wrote:
Mon Jul 06, 2020 10:59 pm
constants::ACP_FBC_REQUEST_RESTRICT
You could, probably should for future compatibility, inject your constants
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
User avatar
MarkDHamill
Registered User
Posts: 4268
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.15

Post by MarkDHamill »

Tread wrote:
Mon Jul 06, 2020 11:52 pm
Nice ext but way too easy to get around with a vpn maybe try blocking the browser language code for a country or part of a country.

Image
Not sure what Singapore Sling has to do with this extension.

A VPN is assigned to a country. So unless you set "Allow registered users to login from restricted countries" to Yes, VPNs can't circumvent the extension's logic.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4268
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.15

Post by MarkDHamill »

bug-i wrote:
Mon Jul 06, 2020 4:33 pm
Technically - nothings wrong with Filter by country, it does what it is supposed to do, so no urgent need to fix this, but it would be nice to have the option the have "clean" stats without "passive" page refreshes by mchat.
I think I can work around Ajax requests, which is how mChat does its work. The $request object has a $request->is_ajax() method. I should be able to have a setting to not collect statistics in this case, but it needs to be a setting controlled by the administrator.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4268
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.15

Post by MarkDHamill »

Actually, the more I think about it, all Ajax requests should not be counted in the statistics. phpBB uses Ajax for things like notifications, moderation, installation, recreating search indexes, etc. So that's the approach I will use which will also take care of extensions that use it, like mChat. It might also explain a lot of the extra statistics getting recorded that people have noticed.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
Tread
Registered User
Posts: 49
Joined: Thu Nov 14, 2019 9:52 pm

Re: [3.3][RC] Filter by country - version 1.0.15

Post by Tread »

MarkDHamill wrote:
Tue Jul 07, 2020 12:40 pm

Not sure what Singapore Sling has to do with this extension.

A VPN is assigned to a country. So unless you set "Allow registered users to login from restricted countries" to Yes, VPNs can't circumvent the extension's logic.
I'm a member of a board that has my country blocked at the time i was not a member but installed a vpn for chrome set it to NL and bingo i was on a site that filters my country so i guess you could say yes easy to bypass this ext. If you want me to prove it block the uk and i'l come and join you.
bug-i
Registered User
Posts: 130
Joined: Fri Feb 17, 2017 12:45 pm

Re: [3.3][RC] Filter by country - version 1.0.15

Post by bug-i »

MarkDHamill wrote:
Tue Jul 07, 2020 3:31 pm
Actually, the more I think about it, all Ajax requests should not be counted in the statistics. phpBB uses Ajax for things like notifications, moderation, installation, recreating search indexes, etc. So that's the approach I will use which will also take care of extensions that use it, like mChat. It might also explain a lot of the extra statistics getting recorded that people have noticed.
sounds like the best solution! go for it :D
User avatar
MarkDHamill
Registered User
Posts: 4268
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.15

Post by MarkDHamill »

Tread wrote:
Tue Jul 07, 2020 3:41 pm
MarkDHamill wrote:
Tue Jul 07, 2020 12:40 pm

Not sure what Singapore Sling has to do with this extension.

A VPN is assigned to a country. So unless you set "Allow registered users to login from restricted countries" to Yes, VPNs can't circumvent the extension's logic.
I'm a member of a board that has my country blocked at the time i was not a member but installed a vpn for chrome set it to NL and bingo i was on a site that filters my country so i guess you could say yes easy to bypass this ext. If you want me to prove it block the uk and i'l come and join you.
The only way I see around this is to prohibit VPNs. Unfortunately, that requires a different database and it's not free like the country one.

https://www.maxmind.com/en/solutions/ge ... p-database

The cost per query is $.002. On the plus side, aside from this, this web service also provides more detailed information, such as city, subdivision and postal code. So in theory an extension could be built to allow more granular access control.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4268
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

[3.3][RC] Filter by country - version 1.0.16 released

Post by MarkDHamill »

Version 1.0.16 includes the bug fixes found:
  • The template issue on the settings page that forced the test IP addresses field to the right of the new seconds setting has been fixed.
  • Logic that was incorrectly categorizing access from countries where the country was disallowed but the user was already logged in (it should count as an outside request) has been fixed.
  • Ajax calls are not counted in the statistics, allowing extensions like mChat to not affect statistics
See the first post for download links. A list of changes from version 1.0.15 can be seen here.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
stone23
Registered User
Posts: 33
Joined: Sat Nov 02, 2019 4:44 pm
Location: France
Contact:

Re: [3.3][RC] Filter by country - version 1.0.16

Post by stone23 »

Hello,
I was forced to deactivate the extension because the selected countries do not stay in memory. The extension always returns to the same settings...
User avatar
janus_zonstraal
Registered User
Posts: 4799
Joined: Sat Aug 30, 2014 1:30 pm

Re: [3.3][RC] Filter by country - version 1.0.16

Post by janus_zonstraal »

stone23 wrote:
Sat Jul 25, 2020 11:07 am
Hello,
I was forced to deactivate the extension because the selected countries do not stay in memory. The extension always returns to the same settings...
Did you click on "send" if you changing the countries?
Sorry! My English is bat ;) !!!
User avatar
MarkDHamill
Registered User
Posts: 4268
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.16

Post by MarkDHamill »

This shouldn't happen. The best way to change countries on the settings page is to:

- Make sure allow or restrict is set correctly
- Press unselect all country code button
- Select the countries to allow or restrict
- Press submit

Going back to the page should reflect that the changes too effect.

I had no issues like this during my testing. Follow these procedures and let me know if it recurs.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
stone23
Registered User
Posts: 33
Joined: Sat Nov 02, 2019 4:44 pm
Location: France
Contact:

Re: [3.3][RC] Filter by country - version 1.0.16

Post by stone23 »

I don't know what happened.
I completely uninstalled the extension, cleared the cache, optimized the database with STK, and reinstalled the extension.
Since it seems to work normally ...

EDIT: I had gzip compression enabled and before reinstalling the extension I disabled it.
User avatar
MarkDHamill
Registered User
Posts: 4268
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.16

Post by MarkDHamill »

Isn't the STK for phpBB 3.0 only?
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
stone23
Registered User
Posts: 33
Joined: Sat Nov 02, 2019 4:44 pm
Location: France
Contact:

Re: [3.3][RC] Filter by country - version 1.0.16

Post by stone23 »

No, it is the compatible stk 3.3.
But I think the problem came from the gzip compression, I already had a problem with that.
User avatar
ViolaF
Registered User
Posts: 1529
Joined: Tue Aug 14, 2012 11:52 pm

Re: [3.3][RC] Filter by country - version 1.0.16

Post by ViolaF »

so call your provider :geek:
Post Reply

Return to “Extensions in Development”