Skip to content

Commit

Permalink
Merge pull request #48391 from nextcloud/backport/48361/stable30
Browse files Browse the repository at this point in the history
  • Loading branch information
provokateurin authored Sep 26, 2024
2 parents e0bc827 + bbeda12 commit 673d85b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/private/DB/QueryBuilder/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,23 @@ private function prepareForExecute() {
// }
// }

$tooLongOutputColumns = [];
foreach ($this->getOutputColumns() as $column) {
if (strlen($column) > 30) {
$tooLongOutputColumns[] = $column;
}
}

if (!empty($tooLongOutputColumns)) {
$exception = new QueryException('More than 30 characters for an output column name are not allowed on Oracle.');
$this->logger->error($exception->getMessage(), [
'query' => $this->getSQL(),
'columns' => $tooLongOutputColumns,
'app' => 'core',
'exception' => $exception,
]);
}

$numberOfParameters = 0;
$hasTooLargeArrayParameter = false;
foreach ($this->getParameters() as $parameter) {
Expand Down

0 comments on commit 673d85b

Please sign in to comment.