Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Request): Catch exceptions in isTrustedProxy #42794

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Jan 15, 2024

Summary

The function fails if the configured trusted proxies contain invalid characters and the underlying IpUtils will throw. But as it is used by getRemoteAddress which is used by logging / templating, thrown errors are not reported but silently fail with error 500.

Checklist

@susnux susnux added bug 3. to review Waiting for reviews php Pull requests that update Php code labels Jan 15, 2024
@susnux susnux added this to the Nextcloud 29 milestone Jan 15, 2024
@susnux susnux requested review from a team, ArtificialOwl, icewind1991, blizzz and nickvergessen and removed request for a team January 15, 2024 12:21
@susnux
Copy link
Contributor Author

susnux commented Jan 15, 2024

/skjnldsv-backport to stable28

@susnux
Copy link
Contributor Author

susnux commented Jan 15, 2024

/skjnldsv-backport to stable27

The function fails if the configured trusted proxies contain invalid characters and the underlying IpUtils will throw.
But as it is used by `getRemoteAddress` which is used by logging / templating, thrown errors are not reported but silently fail with error 500.

Co-authored-by: Ferdinand Thiessen <[email protected]>
Co-authored-by: Joas Schilling <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux force-pushed the fix/invalid-trusted-proxies branch from 1401506 to 7620d23 Compare January 27, 2024 14:00
@susnux susnux requested a review from nickvergessen January 27, 2024 14:00
@susnux susnux self-assigned this Jan 27, 2024
@susnux susnux merged commit 8597859 into master Jan 29, 2024
132 of 135 checks passed
@susnux susnux deleted the fix/invalid-trusted-proxies branch January 29, 2024 15:19
@susnux
Copy link
Contributor Author

susnux commented Jan 29, 2024

/backport to stable28

@susnux
Copy link
Contributor Author

susnux commented Jan 29, 2024

/backport to stable27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgraded from 24.0.11 to 25.0.5 then 25.0.6 but site is 500'ing
3 participants