-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[Bug]: DnsPinMiddleware needs a way to skip "addDnsPinning()" in disconnected setups #42901
Comments
What about: server/config/config.sample.php Lines 855 to 860 in 487de9a
|
If you look at the file I mentioned, and in particular lines server/lib/private/Http/Client/DnsPinMiddleware.php Lines 119 to 120 in 487de9a
you'll see that it doesn't matter what value you have in has_internet_connection :) I tried defining allow_local_address => true, but it didn't appear to work either... :( |
@szaimen I believe this problem is present since at least somewhere on 25, it's not just a 28 thing, as I definitely got it when I upgraded to 25.0.13 |
has_internet_connection = true will prevent outgoing requests and the mentioned code is not executed.
server/config/config.sample.php Lines 708 to 713 in 1334055
Yet, I don't see how that should help in your case.
|
Sigh ... documentation of fix for less experienced people who find this bug... The configuration one needs to add is...
This should be documented, it's perfectly normal to have a private servers behind http proxies that can't do DNS resolutions of public addresses. |
Bug description
When one has a Nextcloud setup in a disconnected environment, that only reaches the Internet via http proxy, Nextcloud should skip any measures requiring protocols like ping or DNS to public addresses.
The only way I could upgrade Nextcloud to 28.0.1 was by adding a "return $handler($request, $options);" just after line 119 of lib/private/Http/Client/DnsPinMiddleware.php.
My "hack" is extremely ugly and results in a code integrity check, of course, but only after doing that did I get to have a Nextcloud setup properly working.
I tried to add an if based on $this->config looking for the proxy option but I don't understand PHP well enough to get it to work.
Steps to reproduce
Expected behavior
Nextcloud should work without major issues in a disconnected environment.
Installation method
Community Manual installation with Archive
Nextcloud Server version
28
Operating system
RHEL/CentOS
PHP engine version
PHP 8.0
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Prefer not to list, happens with or without app store apps.
Nextcloud Signing status
No response
Nextcloud Logs
The log is regarding 27.1.5 because that's when I decided to deepdive and try to fix it myself, I don't have a log entry in 28.0.1
Additional info
No response
The text was updated successfully, but these errors were encountered: