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

Handle IPv6 addresses in trusted_domains / error: Trying to access array offset on false #1998

Open
jlfrucot opened this issue Oct 30, 2024 · 5 comments
Assignees

Comments

@jlfrucot
Copy link

Many same errors (about 1000 a day) since upgrade from 29.0.8 to 30.0.1


[PHP] Erreur: Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97
	GET /settings/ajax/checksetup
	de 192.168.1.254 par frucot à 30 oct. 2024, 16:36:42

System information


NextcloudPi version  v1.55.2
NextcloudPi image    NextCloudPi_11-27-20
OS                   Debian GNU/Linux 11. 6.1.21-v8+ (aarch64)
automount            yes
USB devices          sda 
datadir              /media/ExternalDrive/ncdata/data/
data in SD           no
data filesystem      btrfs
data disk usage      278G/932G
rootfs usage         9,8G/235G
swapfile             /var/swap
dbdir                /var/lib/mysql
Nextcloud check      ok
Nextcloud version    30.0.1.2
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          down
Postfix service      up
Internet check       ok
Public IPv4          ***REMOVED SENSITIVE VALUE***
Public IPv6          ***REMOVED SENSITIVE VALUE***
Port 80              open
Port 443             open
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              ***REMOVED SENSITIVE VALUE***
Interface            eth0
Certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
Uptime               1day

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "1": "192.168.1.100",
            "20": "lalbenque.duckdns.org",
            "21": "lalbenque-maison.freeboxos.fr",
            "11": "2a01:e0a:c32:5340::5cd1:e42a",
            "14": "nextcloudpi",
            "3": "nextcloudpi"
        },
        "default_phone_region": "FR",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.1.2",
        "overwrite.cli.url": "https:\/\/nextcloudpi\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***",
            "dbindex": 0
        },
        "tempdirectory": "\/media\/ExternalDrive\/ncdata\/data\/tmp",
        "mail_smtpmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "jpeg_quality": 60,
        "overwriteprotocol": "https",
        "htaccess.RewriteBase": "\/",
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "mail_smtpauthtype": "LOGIN",
        "app_install_overwrite": [
            "documents",
            "previewgenerator"
        ],
        "maintenance_window_start": 1,
        "memories.exiftool": "\/var\/www\/nextcloud\/apps\/memories\/bin-ext\/exiftool-aarch64-glibc",
        "memories.vod.path": "\/var\/www\/nextcloud\/apps\/memories\/bin-ext\/go-vod-aarch64",
        "enabledPreviewProviders": [
            "OC\\Preview\\Image",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\HEIC"
        ],
        "memories.gis_type": 1,
        "memories.db.triggers.fcu": true,
        "defaultapp": "files",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "enable_previews": true,
        "preview_max_filesize_image": -1,
        "preview_max_memory": 256,
        "opcache.interned_strings_buffer": 12,
        "opcache.revalidate_freq": 60,
        "simpleSignUpLink.shown": false
    }
}

HTTPd logs

[Wed Oct 30 00:00:06.526139 2024] [ssl:warn] [pid 900:tid 900] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Wed Oct 30 00:00:06.526906 2024] [ssl:error] [pid 900:tid 900] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=archlinux / issuer: CN=archlinux / serial: 0112307086B5A933D74576F54C8FD74C8207A8AF / notbefore: Nov 27 22:55:31 2020 GMT / notafter: Nov 25 22:55:31 2030 GMT]
[Wed Oct 30 00:00:06.526952 2024] [ssl:error] [pid 900:tid 900] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Wed Oct 30 00:00:06.528408 2024] [http2:warn] [pid 900:tid 900] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Wed Oct 30 00:00:06.622323 2024] [mpm_prefork:notice] [pid 900:tid 900] AH00163: Apache/2.4.62 (Debian) OpenSSL/1.1.1w configured -- resuming normal operations
[Wed Oct 30 00:00:06.622371 2024] [core:notice] [pid 900:tid 900] AH00094: Command line: '/usr/sbin/apache2'

Database logs

2022-03-24 17:23:45 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-03-24 17:23:45 0 [Note] Recovering after a crash using tc.log
2022-03-24 17:23:45 0 [Note] Starting crash recovery...
2022-03-24 17:23:45 0 [Note] Crash recovery finished.
2022-03-24 17:23:45 0 [Note] Server socket created on IP: '127.0.0.1'.
2022-03-24 17:23:45 0 [Note] Reading of all Master_info entries succeeded
2022-03-24 17:23:45 0 [Note] Added new Master_info '' to hash table
2022-03-24 17:23:45 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.3.31-MariaDB-0+deb10u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 10
2022-03-24 17:23:50 0 [Note] InnoDB: Buffer pool(s) load completed at 220324 17:23:50
2022-03-24 18:13:31 0 [Note] /usr/sbin/mysqld (initiated by: unknown): Normal shutdown
2022-03-24 18:13:31 0 [Note] Event Scheduler: Purging the queue. 0 events
2022-03-24 18:13:31 0 [Note] InnoDB: FTS optimize thread exiting.
2022-03-24 18:13:31 0 [Note] InnoDB: Starting shutdown...
2022-03-24 18:13:31 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2022-03-24 18:13:31 0 [Note] InnoDB: Buffer pool(s) dump completed at 220324 18:13:31
2022-03-24 18:13:33 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2022-03-24 18:13:33 0 [Note] InnoDB: Shutdown completed; log sequence number 16698096441; transaction id 39320369
2022-03-24 18:13:33 0 [Note] /usr/sbin/mysqld: Shutdown complete


Nextcloud logs

{"reqId":"ZyJSK7mOLa5HNZfkjXB37gAAAAY","level":3,"time":"2024-10-30T15:35:08+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"core","method":"GET","url":"/apps/polls/poll/2/options?time=1730302507431","message":"More than 30 characters for an output column name are not allowed on Oracle.","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","exception":{"Exception":"Doctrine\\DBAL\\Query\\QueryException","Message":"More than 30 characters for an output column name are not allowed on Oracle.","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":284,"function":"prepareForExecute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":253,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":359,"function":"findOneQuery","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/nextcloud/apps/polls/lib/Db/PollMapper.php","line":65,"function":"findEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/nextcloud/apps/polls/lib/Service/OptionService.php","line":61,"function":"find","class":"OCA\\Polls\\Db\\PollMapper","type":"->"},{"file":"/var/www/nextcloud/apps/polls/lib/Controller/OptionController.php","line":37,"function":"list","class":"OCA\\Polls\\Service\\OptionService","type":"->"},{"file":"/var/www/nextcloud/apps/polls/lib/Controller/BaseController.php","line":39,"function":"OCA\\Polls\\Controller\\{closure}","class":"OCA\\Polls\\Controller\\OptionController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/polls/lib/Controller/OptionController.php","line":36,"function":"response","class":"OCA\\Polls\\Controller\\BaseController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"list","class":"OCA\\Polls\\Controller\\OptionController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1001,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","Line":217,"message":"More than 30 characters for an output column name are not allowed on Oracle.","query":"SELECT `polls_polls`.*, (SELECT COUNT(`user_vote_sub`.`vote_answer`) FROM `*PREFIX*polls_votes` `user_vote_sub` WHERE (`user_vote_sub`.`poll_id` = `polls_polls`.`id`) AND (`user_vote_sub`.`user_id` = :dcValue1)) AS `current_user_count_votes`, (SELECT COUNT(`user_vote_sub`.`vote_answer`) FROM `*PREFIX*polls_votes` `user_vote_sub` WHERE (`user_vote_sub`.`poll_id` = `polls_polls`.`id`) AND (`user_vote_sub`.`user_id` = :dcValue1) AND (`user_vote_sub`.`vote_answer` = :dcValue2)) AS `current_user_count_votes_yes`, (SELECT COUNT(`user_vote_sub`.`vote_answer`) FROM `*PREFIX*polls_votes` `user_vote_sub` LEFT JOIN `*PREFIX*polls_options` `vote_options_join` ON (`vote_options_join`.`poll_id` = `user_vote_sub`.`poll_id`) AND (`vote_options_join`.`poll_option_text` = `user_vote_sub`.`vote_option_text`) AND (`vote_options_join`.`deleted` = '0') WHERE (`user_vote_sub`.`poll_id` = `polls_polls`.`id`) AND (`user_vote_sub`.`user_id` = :dcValue1) AND (`vote_options_join`.`id` IS NULL)) AS `current_user_count_orphaned_votes`, coalesce(MAX(options.timestamp), :dcValue3) AS max_date, coalesce(MIN(options.timestamp), :dcValue4) AS min_date, COUNT(`options`.`id`) AS `count_options`, coalesce(user_shares.type, '') AS user_role, `user_shares`.`locked` AS `is_current_user_locked`, coalesce(user_shares.token, '') AS share_token, group_concat(distinct group_shares.user_id SEPARATOR ',') AS group_shares FROM `*PREFIX*polls_polls` `polls_polls` LEFT JOIN `*PREFIX*polls_options` `options` ON (`polls_polls`.`id` = `options`.`poll_id`) AND (`options`.`deleted` = '0') LEFT JOIN `*PREFIX*polls_share` `user_shares` ON (`polls_polls`.`id` = `user_shares`.`poll_id`) AND (`user_shares`.`user_id` = :dcValue5) AND (`user_shares`.`deleted` = '0') LEFT JOIN `*PREFIX*polls_share` `group_shares` ON (`polls_polls`.`id` = `group_shares`.`poll_id`) AND (`group_shares`.`type` = 'group') AND (`group_shares`.`deleted` = '0') WHERE `polls_polls`.`id` = :dcValue6 GROUP BY `polls_polls`.`id`, `user_shares`.`type`, `user_shares`.`locked`, `user_shares`.`token`","columns":["current_user_count_orphaned_votes"],"exception":{},"CustomMessage":"More than 30 characters for an output column name are not allowed on Oracle."}}
{"reqId":"ZyJSK63yy09evmqy0X7I2AAAAAM","level":3,"time":"2024-10-30T15:35:08+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"core","method":"GET","url":"/apps/polls/poll/2/subscription","message":"More than 30 characters for an output column name are not allowed on Oracle.","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","exception":{"Exception":"Doctrine\\DBAL\\Query\\QueryException","Message":"More than 30 characters for an output column name are not allowed on Oracle.","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":284,"function":"prepareForExecute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":253,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":359,"function":"findOneQuery","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/nextcloud/apps/polls/lib/Db/PollMapper.php","line":65,"function":"findEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/nextcloud/apps/polls/lib/Service/SubscriptionService.php","line":32,"function":"find","class":"OCA\\Polls\\Db\\PollMapper","type":"->"},{"file":"/var/www/nextcloud/apps/polls/lib/Controller/SubscriptionController.php","line":35,"function":"get","class":"OCA\\Polls\\Service\\SubscriptionService","type":"->"},{"file":"/var/www/nextcloud/apps/polls/lib/Controller/BaseController.php","line":39,"function":"OCA\\Polls\\Controller\\{closure}","class":"OCA\\Polls\\Controller\\SubscriptionController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/polls/lib/Controller/SubscriptionController.php","line":34,"function":"response","class":"OCA\\Polls\\Controller\\BaseController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"get","class":"OCA\\Polls\\Controller\\SubscriptionController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1001,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","Line":217,"message":"More than 30 characters for an output column name are not allowed on Oracle.","query":"SELECT `polls_polls`.*, (SELECT COUNT(`user_vote_sub`.`vote_answer`) FROM `*PREFIX*polls_votes` `user_vote_sub` WHERE (`user_vote_sub`.`poll_id` = `polls_polls`.`id`) AND (`user_vote_sub`.`user_id` = :dcValue1)) AS `current_user_count_votes`, (SELECT COUNT(`user_vote_sub`.`vote_answer`) FROM `*PREFIX*polls_votes` `user_vote_sub` WHERE (`user_vote_sub`.`poll_id` = `polls_polls`.`id`) AND (`user_vote_sub`.`user_id` = :dcValue1) AND (`user_vote_sub`.`vote_answer` = :dcValue2)) AS `current_user_count_votes_yes`, (SELECT COUNT(`user_vote_sub`.`vote_answer`) FROM `*PREFIX*polls_votes` `user_vote_sub` LEFT JOIN `*PREFIX*polls_options` `vote_options_join` ON (`vote_options_join`.`poll_id` = `user_vote_sub`.`poll_id`) AND (`vote_options_join`.`poll_option_text` = `user_vote_sub`.`vote_option_text`) AND (`vote_options_join`.`deleted` = '0') WHERE (`user_vote_sub`.`poll_id` = `polls_polls`.`id`) AND (`user_vote_sub`.`user_id` = :dcValue1) AND (`vote_options_join`.`id` IS NULL)) AS `current_user_count_orphaned_votes`, coalesce(MAX(options.timestamp), :dcValue3) AS max_date, coalesce(MIN(options.timestamp), :dcValue4) AS min_date, COUNT(`options`.`id`) AS `count_options`, coalesce(user_shares.type, '') AS user_role, `user_shares`.`locked` AS `is_current_user_locked`, coalesce(user_shares.token, '') AS share_token, group_concat(distinct group_shares.user_id SEPARATOR ',') AS group_shares FROM `*PREFIX*polls_polls` `polls_polls` LEFT JOIN `*PREFIX*polls_options` `options` ON (`polls_polls`.`id` = `options`.`poll_id`) AND (`options`.`deleted` = '0') LEFT JOIN `*PREFIX*polls_share` `user_shares` ON (`polls_polls`.`id` = `user_shares`.`poll_id`) AND (`user_shares`.`user_id` = :dcValue5) AND (`user_shares`.`deleted` = '0') LEFT JOIN `*PREFIX*polls_share` `group_shares` ON (`polls_polls`.`id` = `group_shares`.`poll_id`) AND (`group_shares`.`type` = 'group') AND (`group_shares`.`deleted` = '0') WHERE `polls_polls`.`id` = :dcValue6 GROUP BY `polls_polls`.`id`, `user_shares`.`type`, `user_shares`.`locked`, `user_shares`.`token`","columns":["current_user_count_orphaned_votes"],"exception":{},"CustomMessage":"More than 30 characters for an output column name are not allowed on Oracle."}}
{"reqId":"ZyJSK57j-UsRgL5Nqz703gAAAAc","level":3,"time":"2024-10-30T15:35:08+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"core","method":"GET","url":"/apps/polls/poll/2/shares?time=1730302507433","message":"More than 30 characters for an output column name are not allowed on Oracle.","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","exception":{"Exception":"Doctrine\\DBAL\\Query\\QueryException","Message":"More than 30 characters for an output column name are not allowed on Oracle.","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":284,"function":"prepareForExecute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":253,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":359,"function":"findOneQuery","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/nextcloud/apps/polls/lib/Db/PollMapper.php","line":65,"function":"findEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/var/www/nextcloud/apps/polls/lib/Service/ShareService.php","line":85,"function":"find","class":"OCA\\Polls\\Db\\PollMapper","type":"->"},{"file":"/var/www/nextcloud/apps/polls/lib/Controller/ShareController.php","line":35,"function":"list","class":"OCA\\Polls\\Service\\ShareService","type":"->"},{"file":"/var/www/nextcloud/apps/polls/lib/Controller/BaseController.php","line":39,"function":"OCA\\Polls\\Controller\\{closure}","class":"OCA\\Polls\\Controller\\ShareController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/polls/lib/Controller/ShareController.php","line":35,"function":"response","class":"OCA\\Polls\\Controller\\BaseController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"list","class":"OCA\\Polls\\Controller\\ShareController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1001,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","Line":217,"message":"More than 30 characters for an output column name are not allowed on Oracle.","query":"SELECT `polls_polls`.*, (SELECT COUNT(`user_vote_sub`.`vote_answer`) FROM `*PREFIX*polls_votes` `user_vote_sub` WHERE (`user_vote_sub`.`poll_id` = `polls_polls`.`id`) AND (`user_vote_sub`.`user_id` = :dcValue1)) AS `current_user_count_votes`, (SELECT COUNT(`user_vote_sub`.`vote_answer`) FROM `*PREFIX*polls_votes` `user_vote_sub` WHERE (`user_vote_sub`.`poll_id` = `polls_polls`.`id`) AND (`user_vote_sub`.`user_id` = :dcValue1) AND (`user_vote_sub`.`vote_answer` = :dcValue2)) AS `current_user_count_votes_yes`, (SELECT COUNT(`user_vote_sub`.`vote_answer`) FROM `*PREFIX*polls_votes` `user_vote_sub` LEFT JOIN `*PREFIX*polls_options` `vote_options_join` ON (`vote_options_join`.`poll_id` = `user_vote_sub`.`poll_id`) AND (`vote_options_join`.`poll_option_text` = `user_vote_sub`.`vote_option_text`) AND (`vote_options_join`.`deleted` = '0') WHERE (`user_vote_sub`.`poll_id` = `polls_polls`.`id`) AND (`user_vote_sub`.`user_id` = :dcValue1) AND (`vote_options_join`.`id` IS NULL)) AS `current_user_count_orphaned_votes`, coalesce(MAX(options.timestamp), :dcValue3) AS max_date, coalesce(MIN(options.timestamp), :dcValue4) AS min_date, COUNT(`options`.`id`) AS `count_options`, coalesce(user_shares.type, '') AS user_role, `user_shares`.`locked` AS `is_current_user_locked`, coalesce(user_shares.token, '') AS share_token, group_concat(distinct group_shares.user_id SEPARATOR ',') AS group_shares FROM `*PREFIX*polls_polls` `polls_polls` LEFT JOIN `*PREFIX*polls_options` `options` ON (`polls_polls`.`id` = `options`.`poll_id`) AND (`options`.`deleted` = '0') LEFT JOIN `*PREFIX*polls_share` `user_shares` ON (`polls_polls`.`id` = `user_shares`.`poll_id`) AND (`user_shares`.`user_id` = :dcValue5) AND (`user_shares`.`deleted` = '0') LEFT JOIN `*PREFIX*polls_share` `group_shares` ON (`polls_polls`.`id` = `group_shares`.`poll_id`) AND (`group_shares`.`type` = 'group') AND (`group_shares`.`deleted` = '0') WHERE `polls_polls`.`id` = :dcValue6 GROUP BY `polls_polls`.`id`, `user_shares`.`type`, `user_shares`.`locked`, `user_shares`.`token`","columns":["current_user_count_orphaned_votes"],"exception":{},"CustomMessage":"More than 30 characters for an output column name are not allowed on Oracle."}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:40+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"internet_connection_check","method":"GET","url":"/settings/ajax/checksetup","message":"Cannot connect to: www.nextcloud.com","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","exception":{"Exception":"GuzzleHttp\\Exception\\ConnectException","Message":"cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://www.nextcloud.com/","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":158,"function":"createRejection","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":110,"function":"finishError","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php","line":47,"function":"finish","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":142,"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->"},{"file":"/var/www/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php","line":146,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php","line":35,"function":"OC\\Http\\Client\\{closure}","class":"OC\\Http\\Client\\DnsPinMiddleware","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":31,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php","line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":66,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":75,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":333,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":169,"function":"transfer","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":189,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Http/Client/Client.php","line":205,"function":"request","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/SetupChecks/InternetConnectivity.php","line":65,"function":"get","class":"OC\\Http\\Client\\Client","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/SetupChecks/InternetConnectivity.php","line":48,"function":"isSiteReachable","class":"OCA\\Settings\\SetupChecks\\InternetConnectivity","type":"->"},{"file":"/var/www/nextcloud/lib/private/SetupCheck/SetupCheckManager.php","line":34,"function":"run","class":"OCA\\Settings\\SetupChecks\\InternetConnectivity","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/CheckSetupController.php","line":147,"function":"runAll","class":"OC\\SetupCheck\\SetupCheckManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"check","class":"OCA\\Settings\\Controller\\CheckSetupController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1001,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","Line":210,"message":"Cannot connect to: www.nextcloud.com","exception":{},"CustomMessage":"Cannot connect to: www.nextcloud.com"}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:42+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"PHP","method":"GET","url":"/settings/ajax/checksetup","message":"Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","data":{"app":"PHP"}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:42+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"PHP","method":"GET","url":"/settings/ajax/checksetup","message":"Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","data":{"app":"PHP"}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:42+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"PHP","method":"GET","url":"/settings/ajax/checksetup","message":"Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","data":{"app":"PHP"}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:42+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"PHP","method":"GET","url":"/settings/ajax/checksetup","message":"Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","data":{"app":"PHP"}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:42+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"PHP","method":"GET","url":"/settings/ajax/checksetup","message":"Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","data":{"app":"PHP"}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:42+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"PHP","method":"GET","url":"/settings/ajax/checksetup","message":"Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","data":{"app":"PHP"}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:42+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"PHP","method":"GET","url":"/settings/ajax/checksetup","message":"Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","data":{"app":"PHP"}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:42+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"PHP","method":"GET","url":"/settings/ajax/checksetup","message":"Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","data":{"app":"PHP"}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:42+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"PHP","method":"GET","url":"/settings/ajax/checksetup","message":"Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","data":{"app":"PHP"}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:42+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"PHP","method":"GET","url":"/settings/ajax/checksetup","message":"Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","data":{"app":"PHP"}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:42+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"PHP","method":"GET","url":"/settings/ajax/checksetup","message":"Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","data":{"app":"PHP"}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:42+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"PHP","method":"GET","url":"/settings/ajax/checksetup","message":"Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","data":{"app":"PHP"}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:42+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"PHP","method":"GET","url":"/settings/ajax/checksetup","message":"Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","data":{"app":"PHP"}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:42+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"PHP","method":"GET","url":"/settings/ajax/checksetup","message":"Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","data":{"app":"PHP"}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:42+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"PHP","method":"GET","url":"/settings/ajax/checksetup","message":"Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","data":{"app":"PHP"}}
{"reqId":"ZyJSZSDusm-IwQ6OcPvtOwAAAAU","level":3,"time":"2024-10-30T15:36:42+00:00","remoteAddr":"192.168.1.254","user":"frucot","app":"PHP","method":"GET","url":"/settings/ajax/checksetup","message":"Trying to access array offset on false at /var/www/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php#97","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.1.2","data":{"app":"PHP"}}

@theCalcaholic theCalcaholic self-assigned this Nov 6, 2024
@theCalcaholic
Copy link
Collaborator

theCalcaholic commented Nov 6, 2024

That looks like an upstream (Nextcloud server) issue. Please check if it is fixed after the next nextcloud update.

You can either run ncp-update devel and then ncp-update-nc latest or wait until it's officially released

EDIT: Nevermind, I missed the fact that you have already updated to 30.0.1 (which was not officially supported at the time). Then you don't really have the option to update until the next NC version hits.
I recommend taking the bug report to the nextcloud forum as it's very likely unrelated to NextcloudPi specifically.

@citizenserious
Copy link

citizenserious commented Nov 19, 2024

It seems to be related to nextcloud/server#49370 & nextcloud/server#48820
The issue for me is that I can not remove the ipv6 address, ncp adds one on every restart.
So it is kind of a ncp issue.
Any ideas on how to stop this behavior?

@joshtrichards
Copy link
Member

        "trusted_domains": {
            "1": "192.168.1.100",
            "20": "lalbenque.duckdns.org",
            "21": "lalbenque-maison.freeboxos.fr",
            "11": "2a01:e0a:c32:5340::5cd1:e42a",
            "14": "nextcloudpi",
            "3": "nextcloudpi"

If ncp is setting the addresses above, if any are IPv6 (such as at position 11) they need to be enclosed in brackets: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#trusted-domains

Looks like it is coming from here:

pub_ip="$(curl -m4 icanhazip.com 2>/dev/null)"
[[ "$pub_ip" != "" ]] && ncc config:system:set trusted_domains 11 --value="$pub_ip"

Maybe something like:

  pub_ipv4="$(curl -4 -m4 icanhazip.com 2>/dev/null)"
  pub_ipv6="$(curl -6 -m4 icanhazip.com 2>/dev/null)"
  [[ "$pub_ipv4"   != "" ]] && ncc config:system:set trusted_domains 11 --value="$pub_ipv4"
  [[ "$pub_ipv6"   != "" ]] && ncc config:system:set trusted_domains 12 --value="[$pub_ipv6]"

Caveat: I did not audit all the position assumptions in NCP. 12 may not be a good candidate.

@citizenserious
Copy link

@joshtrichards
Copy link
Member

The change in server is merely to improve the error messaging if the format is invalid. I'd push a PR here for proper v6 handling, but someone more familiar with the presumptions about the index positions in-use for trusted_domains in NCP should probably do it.

In addition to the proposed code above, here's something else to nudge it along. Based on a scan of https://github.com/search?q=repo%3Anextcloud%2Fnextcloudpi%20trusted_domains&type=code I see the following indexes in-use within NCP:

  • 11 (public IP)
  • 1 (local IP)
  • 14 (hostname)
  • 7 (nextcloudpi)
  • 5 (nextcloudpi.local)
  • 8 ('nextcloudpi.lan`)
  • 3 (nextcloudpi.lan or local domain or local hostname) <-- not really sure why this one exists; seems a duplicate of 8 (was added in bcd850c; might vary by install method also; reserved in any case)
  • 2 (local domain?)
  • 20 (manually specified trusted domain1)
  • 21 (manually specified trusted domain2)
  • 22 (manually specified trusted domain3)
  • 6 (used in the Docker build process)
  • Indexes 11 thru 19 also appears to be expected to be available for LE (SSL) provisioning

So using index 12 for a v6 address (when detected) seems at least as safe as using 11 is currently for the v4 one.

Related: The code that populates index 1 should also be audited to make sure it can handle when only a v6 address is returned.

@joshtrichards joshtrichards changed the title Trying to access array offset on false Handle IPv6 addresses in trusted_domains / error: Trying to access array offset on false Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants