Smartfeed

Smartfeed 3.0.13 released - works on phpBB 3.2 and 3.3 - Smartfeed

Smartfeed 3.0.13 released - works on phpBB 3.2 and 3.3

by MarkDHamill » Sat Jan 18, 2020 12:57 am

This is the first of my extensions to be released for phpBB 3.3. It also works on phpBB 3.2. It has been tested on phpBB 3.3.0 and PHP 7.4. It has also passed an EPV test. I'll wait to see if there are any bugs, and if not, I'll send it for approval.

Speaking of which, I did get a review of version 3.0.11 and of course more changes were requested.

You can see a full list of changes since 3.0.12 here.

The extension can be downloaded from my Smartfeed page or from the GitHub branch. If downloaded from GitHub, make sure to place it in the /ext/phpbbservices/smartfeed directory.

Summary of changes:
  • Works on phpBB 3.2 and 3.3
  • Fixed issues requested by the extension review team
  • Private messages read in the feed to be marked as read will also clear notifications on the Navigation Bar
  • The phpBB logo file name changed from 3.2 to 3.3 from site_logo.gif to site_logo.svg. The logo can be used to branch your feed for feed protocols that support an image. This is essentially a configuration variable. This variable, shown in the ACP on the Additional settings and options page, will change to the appropriate file name on installation depending on whether you are installing on phpBB 3.2 or 3.3.
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: 4152
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Smartfeed 3.0.13 released - works on phpBB 3.2 and 3.3

by tlem » Sun Feb 02, 2020 11:52 am

Good morning, Mr. Hamill.
I noticed a strange malfunction in Smartfeed.

The feed recovery seems to work for a while and then suddenly it doesn't work anymore with the error message: ''The Internet Protocol (IP) address of the client making the Smartfeed request is not authorized to access the feed because it did not pass the proper credential. Please rerun Smartfeed on the forum to generate a correct feed URL."

Twice I've been careful not to select "IP Authentication", but obviously that doesn't change anything...

When I generate the URL, I use the :
Topic titles only to yes, private messages to yes and RSS 2.0 feed type (HTML format).
The URL is generated on my PC (home IP) then I use it on my smartphone (dynamic IP of the provider) and the feeds are well retrieved. So, at the beginning, there is no link with the IP address, but after a while it doesn't work anymore.
  1. Can you tell me how to solve this rather annoying problem ?
  2. Do you think it's possible to memorize the settings of the last generated link so that you don't have to re-check everything each time.
User avatar
tlem
Registered User
Posts: 148
Joined: Sun Jan 24, 2016 4:47 pm
Location: Bordeaux (France)
Name: Thierry
Contact:

Re: Smartfeed 3.0.13 released - works on phpBB 3.2 and 3.3

by MarkDHamill » Sun Feb 02, 2020 1:13 pm

Try logging out and generating a URL with Smartfeed.

It may be that your IP is changing dynamically and that is the issue, since the encryption token in the URL is tied to your IP. When logged out, these parameters are not included in the URL.
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: 4152
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Smartfeed 3.0.13 released - works on phpBB 3.2 and 3.3

by tlem » Sun Feb 02, 2020 3:50 pm

However, as I said, I do not choose to use IP authentication.

The problem is that this forum is not public, so when I log out, I don't have access to the URL generation page.
Your extension is supposed to be able to give access to non-public forums without enabling the "IP authentication" option.
User avatar
tlem
Registered User
Posts: 148
Joined: Sun Jan 24, 2016 4:47 pm
Location: Bordeaux (France)
Name: Thierry
Contact:

Re: Smartfeed 3.0.13 released - works on phpBB 3.2 and 3.3

by MarkDHamill » Sun Feb 02, 2020 5:00 pm

Even if you don't choose authentication, the URL generated will include e and u key value pair:

Code: Select all

http://127.0.0.1/phpbb/app.php/smartfeed/feed?u=2&e=AauaLLX9FpZa5VZKrj1trmLCpXR_GQ8mAzIcKI-nS0sEdP0kOqJNLcTH7kwhOOUIHhvQzlcB87s9O0XM3THYxWqksDOVJr-6ctG8e3-WIMw.&l=1&t=1&s=0&i=0&y=0&d=3&w=0
These keys are used to authenticate you in case your feed includes a private forum which should not be read by the public.

If you use IP authentication, it ensures that if you pass this sort of URL and it was created at an IP 123.45.67.89 but you use it from an IP of 89.76.54.231 it won't work. It's a bit longer because the IP is embedded in the encrypted e parameter:

Code: Select all

http://127.0.0.1/phpbb/app.php/smartfeed/feed?u=2&e=C4S0GnNJxCQSQWsHPWAwmO3N3v57yGER-nBpIc0-vpGeeLLxNkLkhaFdexQ74SE55luvuU4kE1V0WAwXB5AKmw38YGlJdIk-QShyjbDkbZ8Ai5gTJppyGNXHYkodnlhV&l=1&t=1&s=0&i=0&y=0&d=3&w=0
Whereas if you are logged out, you will get a URL like:

Code: Select all

http://127.0.0.1/phpbb/app.php/smartfeed/feed?t=7&s=1&i=0&y=0&d=3&w=0
which does not include the u and e parameters. In this case only public forums can be read.
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: 4152
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Smartfeed 3.0.13 released - works on phpBB 3.2 and 3.3

by tlem » Sun Feb 02, 2020 5:23 pm

Okay, but your extension is supposed to work without IP authentication on "protected forums".
User avatar
tlem
Registered User
Posts: 148
Joined: Sun Jan 24, 2016 4:47 pm
Location: Bordeaux (France)
Name: Thierry
Contact:

Re: Smartfeed 3.0.13 released - works on phpBB 3.2 and 3.3

by MarkDHamill » Sun Feb 02, 2020 5:39 pm

There are two levels of authentication:
  • Verify the user is legitimate
  • Verify the user is legitimate and that they are coming from a validated IP address so the content in the feed is accessible only from an IP address within a certain address range. This way if the URL is stolen, it's not accessible outside a very narrow IP range.
This flexibility allows an admin to add a protected forum later that the user is allowed to read that would not be available to the public with no change to the URL.

It could perhaps be clearer but from the beginning, flexibility was behind Smartfeed. On a board with no protected forums, the u and e parameters don't hurt because the content is public. If only public forums are wanted (and public forums can be made private at any time), creating a URL logged out is the way to go.
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: 4152
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Smartfeed 3.0.13 released - works on phpBB 3.2 and 3.3

by tlem » Sun Feb 02, 2020 8:43 pm

How can I create a disconnected URL since if I am disconnected I get the message: "Sorry, due to Smartfeed forum exclusions and your forum access privileges, you cannot access any forums".

Isn't there a way to authenticate the user with credentials or a user generated "fixed" key?
User avatar
tlem
Registered User
Posts: 148
Joined: Sun Jan 24, 2016 4:47 pm
Location: Bordeaux (France)
Name: Thierry
Contact:

Re: Smartfeed 3.0.13 released - works on phpBB 3.2 and 3.3

by MarkDHamill » Sun Feb 02, 2020 9:04 pm

If none of your forums can be read by the public, then you will get the error message you described. In this case, you must be logged in to get a Smartfeed URL that works.

If you select Yes for IP Authentication, this can cause problems if your IP changes. Are you using a proxy with Smartfeed? If so that may be the issue. If for example you are using a VPN and at time A it created an encryption key for IP 123.45.67.89 and then later you use the VPN and the IP is significant different (outside the range of 123.45.67.*) then this would cause the error described. It could also happen if you use this feature and your IP changes due to Dynamic Host Configuration Protocol changes by your ISP. On my ISP (Comcast) they seem to change the IP at the first of the month.

In this case selecting No for IP authentication should work. You are authenticated, but the IP you are using is ignored as a blocking factor.

There are two levels of possible authentication:

- Username/password through the u and e parameters in the URL
- IP authentication, which, if used is in ADDITION to username/password authentication. The e parameter just gets larger to embed the IP used.
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: 4152
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Smartfeed 3.0.13 released - works on phpBB 3.2 and 3.3

by tlem » Sun Feb 02, 2020 9:08 pm

Can you show me an example to use Username/password through the u and e parameters in the URL?

It would be easier to enter them into the Smartfeed interface just before generating the URL. ^^^
User avatar
tlem
Registered User
Posts: 148
Joined: Sun Jan 24, 2016 4:47 pm
Location: Bordeaux (France)
Name: Thierry
Contact:

Re: Smartfeed 3.0.13 released - works on phpBB 3.2 and 3.3

by MarkDHamill » Sun Feb 02, 2020 9:15 pm

When logged in, on the Smartfeed interface just make sure No is selected for IP Authentication. Set the other options and desired and generate the URL. That should do it.
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: 4152
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Smartfeed 3.0.13 released - works on phpBB 3.2 and 3.3

by tlem » Sun Feb 02, 2020 9:20 pm

I've done that a number of times, but as I've told you several times, it only works for a while.

Whether I'm connected by my mobile provider or by home WiFi (two totally different IPs), the feeds are well recovered, but after a while it doesn't work anymore. I have to generate another URL for it to work.
User avatar
tlem
Registered User
Posts: 148
Joined: Sun Jan 24, 2016 4:47 pm
Location: Bordeaux (France)
Name: Thierry
Contact:

Re: Smartfeed 3.0.13 released - works on phpBB 3.2 and 3.3

by MarkDHamill » Sun Feb 02, 2020 9:31 pm

You can try this: using a tool like phpMyAdmin, find your record in the phpbb_users table. Look for the value of user_smartfeed_key. Save it as a null string. Purge the cache. Then try to run ui.php again. A new key will get generated. I've never seen this as an issue with a user before, but there's always a first time.
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: 4152
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Smartfeed 3.0.13 released - works on phpBB 3.2 and 3.3

by tlem » Sun Feb 02, 2020 9:42 pm

Although I'm sure I've already run those tests, I just made a new URL and ran several tests, including one through a VPN. Feeds recovery works regardless of my IP. I'm going to let things like this and made several tests in the next hours and days, but I'm pretty sure that within 24 hours or more the feed recovery will not work anymore!
User avatar
tlem
Registered User
Posts: 148
Joined: Sun Jan 24, 2016 4:47 pm
Location: Bordeaux (France)
Name: Thierry
Contact:

Re: Smartfeed 3.0.13 released - works on phpBB 3.2 and 3.3

by tlem » Tue Feb 04, 2020 9:21 pm

Good evening, Mr. Hamill.
My investigations are taking longer than expected because my professional activities are more important than expected.

Is the user_smartfeed_key regenerated if I perform these steps:
- Deactivation of the extension
- Deleting Extension Data
- Deleting files with the extension
- Re-installation of the extension (re-downloaded from Git)

Because I have done that and obviously no improvement.
The URL link seems to work for a few hours and then nothing!
User avatar
tlem
Registered User
Posts: 148
Joined: Sun Jan 24, 2016 4:47 pm
Location: Bordeaux (France)
Name: Thierry
Contact: