Forum closed for guests results in thousands of errors

Started by @rjen, May 23, 2022, 03:48:05 AM

Previous topic - Next topic

@rjen

Just noticed this by accident.

Doing some test I closed my 2.1.2 test for for Guests by setting it to not "Allow guests to browse the forum".
This morning I found thousands of errors, caused by bots accessing download links to attachments that are no longer accessible to them.

I don't think that should happen..?

How to reproduce?
1. Have a topic in your forum with an attachment that is visible to guests
2. Click to download the attachment
3. Copy the download link
4. Close the forum for guests
5. Logout (or use an incognito window)
6. Try to download the link by pasting the copied link

Result:
a login page stripped of all css
You cannot view this attachment.

and around 90 errors in the log...

In my example it is this link being accessed: https://test.fjr-club.nl/index.php?action=dlattach;attach=22387

And errors from subs.php, like:

QuoteGuest
2a02:a213:a701:c080:e978:66ac:9e70:3ea9
7582d457acd4349c6806adc18fe2249d
https://test.fjr-club.nl/index.php?action=dlattach;attach=22387
/home/deb77453/domains/fjr-club.nl/public_html/test/Sources/Subs-Auth.php (Line 224)  Backtrace information

Type of error: Undefined
Error messageSelect
8: Undefined index: login

and Login.template.php

QuoteGuest
2a02:a213:a701:c080:e978:66ac:9e70:3ea9
7582d457acd4349c6806adc18fe2249d
https://test.fjr-club.nl/index.php?action=dlattach;attach=22387
/home/deb77453/domains/fjr-club.nl/public_html/test/Themes/default/Login.template.php (Line 291)  Backtrace information

Type of error: Undefined
Error messageSelect
8: Undefined index: one_hour





Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Arantor

This is a bit normal. The attachments URL doesn't load the theme - normally you don't need it to serve attachments.

But it shouldn't vomit errors like that - it never used to IIRC? But maybe I never tried it with the guest access off.

@rjen

Quote from: Arantor on May 23, 2022, 04:08:19 AMThis is a bit normal. The attachments URL doesn't load the theme - normally you don't need it to serve attachments.

But it shouldn't vomit errors like that - it never used to IIRC? But maybe I never tried it with the guest access off.

Neither did I, like I said it was a test forum. And I understand that this link would not need a theme loaded, but yeah IMO it should not throw these errors like it does...

By the way: I just tested the same situation in a 2.0.19 forum

This link:
https://test2.fjr-club.nl/index.php?action=dlattach;ts=1630687984;topic=25434.0;attach=22886

And this actually does load the theme and gives a proper login page and no errors in the log..
So it is a 2.1 bug IMO...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl


@rjen

Quote from: SpacePhoenix on May 23, 2022, 05:49:58 AMWhat mods are you using?

Not relevant: this happens on a 2.1.2 forum without any mods...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

@rjen

Quote from: Max22 on May 25, 2022, 10:30:00 AMThe links to the attachments seem to work fine now.

Not sure what you mean to say? I reopened the test forum to guests, so the errors don't pile up anymore.

I am curious to hear from the team if this behavior is intended in SMF 2.1 or indeed recognized as a bug that will be fixed at some point in time..,
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Diego Andrés

Did someone log this on gh? I remember commenting that I couldn't reproduce on two different vanilla forums.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Diego Andrés


SMF Tricks - Free & Premium Responsive Themes for SMF.

Advertisement: