Skip to content

[2.1] Dont let bots flood logs#9144

Merged
Sesquipedalian merged 1 commit intoSimpleMachines:release-2.1from
sbulen:21_dont_log_bad_referrers
Mar 12, 2026
Merged

[2.1] Dont let bots flood logs#9144
Sesquipedalian merged 1 commit intoSimpleMachines:release-2.1from
sbulen:21_dont_log_bad_referrers

Conversation

@sbulen
Copy link
Copy Markdown
Contributor

@sbulen sbulen commented Mar 11, 2026

Partial for #9142

2.1 portion only. Just don't log "Unable to verify referring URL" errors. This gives a handle for bots to flood your logs. Plus, I'm not sure the info is usable or actionable. Note also that the other similar session errors throughout this logic are not logged.

I kept the one a few lines below this as logged (line 691) - that condition appears to be more of a trap for an internal issue. So it's kept, for now...

If approved, I'll submit the 3.0 equivalent.

Signed-off-by: Shawn Bulen <bulens@pacbell.net>
@jdarwood007 jdarwood007 added this to the 2.1.8 milestone Mar 12, 2026
@jdarwood007
Copy link
Copy Markdown
Member

Makes sense. I was going to suggest we do !$context['user']['is_guest'], but then I thought, why, its garbage either way.

@sbulen
Copy link
Copy Markdown
Contributor Author

sbulen commented Mar 12, 2026

Yep.

@Sesquipedalian Sesquipedalian merged commit 0d8f351 into SimpleMachines:release-2.1 Mar 12, 2026
10 checks passed
@jdarwood007
Copy link
Copy Markdown
Member

@sbulen Can you submit a PR for 3.0 on this change as well?

@sbulen
Copy link
Copy Markdown
Contributor Author

sbulen commented Mar 12, 2026

@sbulen Can you submit a PR for 3.0 on this change as well?

Will do.

@sbulen sbulen deleted the 21_dont_log_bad_referrers branch March 12, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2.1 & 3.0] "Unable to verify referring URL" errors can flood the SMF error log

3 participants