-
Notifications
You must be signed in to change notification settings - Fork 33
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
Generate URLs via JavaScript #448
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but didnt test
/rebase |
274bf9d
to
a60e1b4
Compare
Would feel more confident if it was tested indeed ;) |
/rebase |
URL generation via PHP do not consider cases where the application URL at a reverse proxy is different from the local URL. Example: - Public: home.acme/nextcloud - Private: 192.168.1.8 A reverse proxy forwards the request internally. As the updater is not installed in a subdirectory, the generated (via PHP) URLs are wrong. nextcloud/server has all the code to generate proper URLs for such cases. However, this code is not available here. Generating the URLs via JavaScript is simpler as the browser is already visiting the right page. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
a60e1b4
to
9405824
Compare
I will test this weekend. |
TEST RESULTS:
Caveats/Notes:
Pulling in Changes:
Then visit: https://NEXTCLOUD-URI/cloud/index.php/settings/admin/overview# ❌ EMPTY / broken (the page is just a white/empty page) If I restore the original version ... the updater page loads as expected. Is there some sort of breaking changes on newer versions of the updater that would prevent it from working on an older core Nextcloud version? Potentially a compatibility issue here. |
Next Attempt: (try see if there is indeed a compatibility issue ...) Conducted a few upgrades using the manual workaround steps to get to a supported version.
✔️
✔️ ^ so there, up to v24 (currently supported) |
Repeating test: steps noted in #448 (comment)
ends up with:
same problem ❌ (in my experience/past, this does usually mean there's a bug in the PHP/javascript/HTML somewhere ... hard to pinpoint) |
tried to enable error reporting but it isn't having any affect (tried index.html, index.php, and updater/index.php) AH-HA ... wow ... so i was adding all this at the TOP of the file, but apparently we're randomly disabling it on line ~120 ini_set('display_errors', '0');
ini_set('log_errors', '1'); grrr |
OK here we go
|
Last test for the day ... because of the SO -- I manually patched my
Then visit: https://nextcloud-uri/cloud/index.php/settings/admin/overview# |
/rebase |
@PVince81 - for your final review |
one other note. someone maybe should test to ensure this works in non-proxy scenario |
what's the hold up? now that we have a viable fix, we should really target this for delivery ASAP |
Fix #265, Close #312
URL generation via PHP do not consider cases where the application URL at a reverse proxy is different from the local URL.
Example:
A reverse proxy forwards the request internally. As the updater is not installed in a subdirectory, the generated (via PHP) URLs are wrong. nextcloud/server has all the code to generate proper URLs for such cases. However, this code is not available here.
Generating the URLs via JavaScript is simpler as the browser is already visiting the right page.
To configure nginx-proxy to serve an application from a subdirectory for testing: