Repository navigation
Closed
Labels
Description
runsh: Total unexpected failed scenarios throughout the test run:
cliExternalStorage/filesExternalWebdavOwncloud.feature:15
cliExternalStorage/filesExternalWebdavOwncloud.feature:32
cliExternalStorage/filesExternalWebdavOwncloud.feature:66
cliExternalStorage/filesExternalWebdavOwncloud.feature:85
cliExternalStorage/filesExternalWebdavOwncloud.feature:106
cliExternalStorage/filesExternalWebdavOwncloud.feature:127
cliExternalStorage/filesExternalWebdavOwncloud.feature:149
cliExternalStorage/filesExternalWebdavOwncloud.feature:172
cliExternalStorage/filesExternalWebdavOwncloud.feature:193
cliExternalStorage/filesExternalWebdavOwncloud.feature:209
cliExternalStorage/filesExternalWebdavOwncloud.feature:229
Scenario: creating a webdav_owncloud external storage # /drone/src/tests/acceptance/features/cliExternalStorage/filesExternalWebdavOwncloud.feature:15
When the administrator creates an external mount point with the following configuration about user "Alice" using the occ command # OccContext::createExternalMountPointUsingTheOccCommand()
| host | %remote_server% |
| root | TestMnt |
| secure | false |
| user | %username% |
| password | %password% |
| storage_backend | owncloud |
| mount_point | TestMountPoint |
| authentication_backend | password::password |
And the administrator verifies the mount configuration for local storage "TestMountPoint" using the occ command # OccContext::theAdministratorVerifiesTheMountConfigurationForLocalStorageUsingTheOccCommand()
Then the following mount configuration information should be listed: # OccContext::theFollowingInformationShouldBeListed()
| status | code | message |
| ok | 0 | |
OccContext::theFollowingInformationShouldBeListed 'ok, 0, ' was expected to be listed, but is not listed in the mount configuration information
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
Array (
- 'status' => 'ok'
- 'code' => '0'
- 'message' => ''
+ 'status' => 'error'
+ 'code' => '1'
+ 'message' => 'InvalidArgumentException'
)
And as "admin" folder "TestMountPoint" should exist # FeatureContext::asFileOrFolderShouldExist()
@skipOnEncryption @issue-encryption-181 @skipOnDbOracle @issue-38165
Scenario: using webdav_owncloud as external storage # /drone/src/tests/acceptance/features/cliExternalStorage/filesExternalWebdavOwncloud.feature:32
Given the administrator has created an external mount point with the following configuration about user "Alice" using the occ command # OccContext::adminHasCreatedAnExternalMountPointWithFollowingConfigUsingTheOccCommand()
| host | %remote_server% |
| root | TestMnt |
| secure | false |
| user | %username% |
| password | %password% |
| storage_backend | owncloud |
| mount_point | TestMountPoint |
| authentication_backend | password::password |
The command was not successful, exit code was 1.
stdOut was: ''
stdErr was: '
In AbstractOracleDriver.php line 61:
An exception occurred while executing 'INSERT INTO "oc_external_config" ("m
ount_id","key","value") SELECT ?,?,? FROM "oc_external_config" WHERE "mount
_id" = ? AND "key" = ? HAVING COUNT(*) = 0' with params [2, "secure", false
, 2, "secure"]:
ORA-01400: cannot insert NULL into ("AUTOTEST"."oc_external_config"."value")
In OCI8Exception.php line 25:
ORA-01400: cannot insert NULL into ("AUTOTEST"."oc_external_config"."value")
files_external:create [--user [USER]] [-c|--config CONFIG] [--dry] [--output [OUTPUT]] [--] <mount_point> <storage_backend> <authentication_backend>
'
(Exception)
Activity
phil-davis commentedon Jan 7, 2022
PR #39637 demonstrates the issue.
The first few scenarios have been in the test suite for some time. They were added by PR #36857 which was merged 2020-02-18. And PR #37025 was run on 2020-02-27 and those passed on Oracle. So I think that this passed previously.
Needs investigation...
DeepDiver1975 commentedon Jun 23, 2026
🤖 Automated issue triage by Claude Code review agent.
Confirmed bug — root cause located. A boolean-typed external-storage config value (e.g.
secure=false) is persisted as a PHPbool false, which the OCI8 driver binds asNULL, violating theNOT NULLconstraint on theoc_external_config.valuecolumn. The exact failing query and params from the issue confirm this:Trace
apps/files_external/lib/Command/Create.php(~line 154-166) parseskey=valueconfig from the CLI as strings and calls$mount->setBackendOptions($config).lib/public/Files/External/DefinitionParameter.php::validateValue()(lines 188-211) coerces values ofVALUE_BOOLEANparameters —secureis one — from the string'false'to a PHP booleanfalse:lib/private/Files/External/Service/StoragesService.php::addStorage()(lines 284-287) iteratesgetBackendOptions()and passes each value unchanged to$this->dbConfig->setConfig($configId, $key, $value).lib/private/Files/External/Service/DBConfigService.php::setConfig()(lines 272-277) passes the rawfalsestraight intoinsertIfNotExist('*PREFIX*external_config', ['mount_id'=>..., 'key'=>..., 'value'=>$value], ...).lib/private/DB/Adapter.php::insertIfNotExist()bindsarray_values($input)— including the booleanfalse— as thevalueparameter. On Oracle (OCI8), DBAL binds PHPfalsesuch that it lands asNULL/empty, and Oracle rejects it because the column isNOT NULL.Why it is Oracle-specific
The
valuecolumn is defined asstring,notnull => trueincore/Migrations/Version20170111103310.php. On MySQL/Postgres/SQLite a boundfalsebecomes''or0and theNOT NULLcheck passes; on Oracle an empty bind is treated asNULL, soORA-01400fires. That is also why this regressed after passing on Oracle in early 2020 (per @phil-davis) — the failure surfaces only once a boolean-typed option (secure) reaches the bind layer as a realbool.Suggested fix
Normalize the value to a string before persistence so no boolean ever reaches the bind layer — cast in
DBConfigService::setConfig()(e.g.value => (string)$value, mappingfalse→'0'/true→'1'), and/or haveDefinitionParameter::validateValue()keep the value as'0'/'1'instead of a PHP bool. Casting at the DB-service boundary is the most robust spot sincesetOption()alreadyjson_encodes its value for the same reason. NotesetConfig()'s UPDATE branch already usesIQueryBuilder::PARAM_STR, so only the INSERT path is inconsistent.(No fix PR is being opened: owncloud/core is excluded from automated fix fleets.)
phil-davis commentedon Jun 23, 2026
Oracle support is being dropped for oC11