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

Cloudflare Origin Certificate Seems to Break Name Resolution For Updater #41310

Open
Joomsy opened this issue Aug 21, 2024 · 1 comment
Open

Comments

@Joomsy
Copy link

Joomsy commented Aug 21, 2024

Steps to reproduce

  1. Run DNS A record for ownCloud instance through Cloudflare proxy
  2. Generate and install a Cloudflare Origin certificate
  3. Attempt to run the ownCloud updater from a browser, and receive the below error

Expected behaviour

The upater should proceed to the update initialization screen after browsing to /updater, and entering the relevant password.

Actual behaviour

This error is produced in the browser. ownCloud isn't able to resolve my domain, and this seems to be due to the Origin certificate. If the Cloudflare proxy is temporarily disabled, and then re-enabled, it is possible to get to a broken version of the update page before cache catches up. All variables just say "undefined", though, and it's not possible to actually initiate the update. A screenshot is below. cURL will also complain about the certificate being self-signed (obviously) just before getting to this broken version.

Client error: `POST https://localhost/index.php/occ/config:list` resulted in a `404 Not Found` response: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <meta h (truncated...) 

image

Server configuration

Operating system: AlmaLinux 8

Web server: Apache/2.4.62

Database: MariaDB 10.6.19

PHP version: 7.4 (PHP-FPM)

ownCloud version: 10.14.0 (stable)

Updated from an older ownCloud or fresh install: Updated

Where did you install ownCloud from: Tarball

Signing status (ownCloud 9.0 and above): Unsigned

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

No errors have been found.

The content of config/config.php:

https://gist.github.com/Joomsy/501c7f676c8c723d9c25674cb4c04a19

List of activated apps:

Enabled:
  - activity:
    - Version: 2.7.2
    - Path: /home/mogbox/cloud.mogbox.net/apps-external/activity
  - brute_force_protection:
    - Version: 1.3.0
    - Path: /home/mogbox/cloud.mogbox.net/apps-external/brute_force_protection
  - checksum:
    - Version: 0.3.6
    - Path: /home/mogbox/cloud.mogbox.net/apps-external/checksum
  - configreport:
    - Version: 0.2.2
    - Path: /home/mogbox/cloud.mogbox.net/apps/configreport
  - dav:
    - Version: 0.7.0
    - Path: /home/mogbox/cloud.mogbox.net/apps/dav
  - encryption:
    - Version: 1.6.1
    - Path: /home/mogbox/cloud.mogbox.net/apps/encryption
  - federatedfilesharing:
    - Version: 0.5.0
    - Path: /home/mogbox/cloud.mogbox.net/apps/federatedfilesharing
  - files:
    - Version: 1.6.0
    - Path: /home/mogbox/cloud.mogbox.net/apps/files
  - files_mediaviewer:
    - Version: 1.0.5
    - Path: /home/mogbox/cloud.mogbox.net/apps/files_mediaviewer
  - files_pdfviewer:
    - Version: 1.0.2
    - Path: /home/mogbox/cloud.mogbox.net/apps-external/files_pdfviewer
  - files_sharing:
    - Version: 0.14.0
    - Path: /home/mogbox/cloud.mogbox.net/apps/files_sharing
  - files_texteditor:
    - Version: 2.6.1
    - Path: /home/mogbox/cloud.mogbox.net/apps-external/files_texteditor
  - files_textviewer:
    - Version: 1.0.3
    - Path: /home/mogbox/cloud.mogbox.net/apps-external/files_textviewer
  - files_trashbin:
    - Version: 0.9.1
    - Path: /home/mogbox/cloud.mogbox.net/apps/files_trashbin
  - files_versions:
    - Version: 1.3.0
    - Path: /home/mogbox/cloud.mogbox.net/apps/files_versions
  - firstrunwizard:
    - Version: 1.3.0
    - Path: /home/mogbox/cloud.mogbox.net/apps/firstrunwizard
  - gallery:
    - Version: 16.1.2
    - Path: /home/mogbox/cloud.mogbox.net/apps-external/gallery
  - guests:
    - Version: 0.12.4
    - Path: /home/mogbox/cloud.mogbox.net/apps-external/guests
  - market:
    - Version: 0.9.0
    - Path: /home/mogbox/cloud.mogbox.net/apps-external/market
  - notifications:
    - Version: 0.6.0
    - Path: /home/mogbox/cloud.mogbox.net/apps/notifications
  - oauth2:
    - Version: 0.6.1
    - Path: /home/mogbox/cloud.mogbox.net/apps-external/oauth2
  - provisioning_api:
    - Version: 0.5.0
    - Path: /home/mogbox/cloud.mogbox.net/apps/provisioning_api
  - twofactor_backup_codes:
    - Version: 0.1.0
    - Path: /home/mogbox/cloud.mogbox.net/apps-external/twofactor_backup_codes
  - twofactor_totp:
    - Version: 0.9.0
    - Path: /home/mogbox/cloud.mogbox.net/apps-external/twofactor_totp
  - updatenotification:
    - Version: 0.2.1
    - Path: /home/mogbox/cloud.mogbox.net/apps/updatenotification

Are you using external storage, if yes which one: No

Are you using encryption: Yes

Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Mozilla Firefox 129.0.1

Operating system: Pop!_OS 22.04

Logs

Web server error log

None generated

ownCloud log (data/owncloud.log)

Oddly enough, I do not have this app installed any more, but this same message is being generated over and over. It may be unrelated to the issue at hand, but I'm including it regardless. For what it's worth, reinstalling it doesn't help, either.

{"reqId":"cabPd1zHUCVOZveuzj0a","level":3,"time":"2024-08-20T22:45:02+00:00","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"Exception: {\"Exception\":\"OCP\\\\AppFramework\\\\QueryException\",\"Message\":\"Could not resolve OCA\\\\E2eeShare\\\\BackgroundJob\\\\CleanupUnencrypted! Class OCA\\\\E2eeShare\\\\BackgroundJob\\\\CleanupUnencrypted does not exist\",\"Code\":0,\"Trace\":\"#0 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(109): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve('OCA\\\\\\\\E2eeShare\\\\\\\\B...')\\n#1 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/private\\\/ServerContainer.php(86): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OCA\\\\\\\\E2eeShare\\\\\\\\B...')\\n#2 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/private\\\/BackgroundJob\\\/JobList.php(282): OC\\\\ServerContainer->query('OCA\\\\\\\\E2eeShare\\\\\\\\B...')\\n#3 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/private\\\/BackgroundJob\\\/JobList.php(218): OC\\\\BackgroundJob\\\\JobList->buildJob(Array)\\n#4 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/private\\\/BackgroundJob\\\/JobList.php(222): OC\\\\BackgroundJob\\\\JobList->getNext()\\n#5 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/private\\\/BackgroundJob\\\/JobList.php(222): OC\\\\BackgroundJob\\\\JobList->getNext()\\n#6 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/private\\\/BackgroundJob\\\/JobList.php(222): OC\\\\BackgroundJob\\\\JobList->getNext()\\n#7 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/private\\\/BackgroundJob\\\/JobList.php(222): OC\\\\BackgroundJob\\\\JobList->getNext()\\n#8 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/private\\\/BackgroundJob\\\/JobList.php(222): OC\\\\BackgroundJob\\\\JobList->getNext()\\n#9 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/private\\\/BackgroundJob\\\/JobList.php(222): OC\\\\BackgroundJob\\\\JobList->getNext()\\n#10 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/private\\\/BackgroundJob\\\/JobList.php(222): OC\\\\BackgroundJob\\\\JobList->getNext()\\n#11 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/core\\\/Command\\\/System\\\/Cron.php(115): OC\\\\BackgroundJob\\\\JobList->getNext()\\n#12 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/composer\\\/symfony\\\/console\\\/Command\\\/Command.php(298): OC\\\\Core\\\\Command\\\\System\\\\Cron->execute(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#13 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(1040): Symfony\\\\Component\\\\Console\\\\Command\\\\Command->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#14 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(301): Symfony\\\\Component\\\\Console\\\\Application->doRunCommand(Object(OC\\\\Core\\\\Command\\\\System\\\\Cron), Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#15 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(171): Symfony\\\\Component\\\\Console\\\\Application->doRun(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#16 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/private\\\/Console\\\/Application.php(165): Symfony\\\\Component\\\\Console\\\\Application->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#17 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/console.php(94): OC\\\\Console\\\\Application->run()\\n#18 \\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/occ(11): require_once('\\\/home\\\/mogbox\\\/cl...')\\n#19 {main}\",\"File\":\"\\\/home\\\/mogbox\\\/cloud.mogbox.net\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php\",\"Line\":95}"}

Browser log

See above

@iasdeoupxe
Copy link
Contributor

iasdeoupxe commented Aug 23, 2024

Bugs for the updater -> https://github.com/owncloud/updater/issues

This one looks more that it requires a fix on the underlying operating system / DNS setup though (ownCloud isn't resolving anything, this is PHP with the help of the OS). Could be also related to owncloud/updater#729

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants