Merge remote-tracking branch 'upstream/production/cafevdb/stable32'

This commit is contained in:
2026-08-15 20:12:28 +02:00
5 changed files with 64 additions and 56 deletions
+1 -1
View File
@@ -22,7 +22,7 @@
<category>auth</category> <category>auth</category>
<dependencies> <dependencies>
<php min-version="8.0"/> <php min-version="8.0"/>
<nextcloud min-version="31" max-version="31"/> <nextcloud min-version="31" max-version="32"/>
</dependencies> </dependencies>
<settings> <settings>
<admin>\OCA\UserSQL\Settings\Admin</admin> <admin>\OCA\UserSQL\Settings\Admin</admin>
+48 -48
View File
@@ -2,8 +2,9 @@
/** /**
* Nextcloud - user_sql * Nextcloud - user_sql
* *
* @copyright 2012-2015 Andreas Böhler <dev (at) aboehler (dot) at> * @copyright 2025 Claus-Justus Heine <himself@claus-justus-heine.de>
* @copyright 2018 Marcin Łojewski <dev@mlojewski.me> * @copyright 2018 Marcin Łojewski <dev@mlojewski.me>
* @copyright 2012-2015 Andreas Böhler <dev (at) aboehler (dot) at>
* @author Marcin Łojewski <dev@mlojewski.me> * @author Marcin Łojewski <dev@mlojewski.me>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@@ -22,50 +23,49 @@
use OCA\UserSQL\AppInfo\Application; use OCA\UserSQL\AppInfo\Application;
$application = new Application(); $routes = [
$application->registerRoutes( 'routes' => [
$this, [ [
"routes" => [ "name" => "settings#verifyDbConnection",
[ "url" => "/settings/db/verify",
"name" => "settings#verifyDbConnection", "verb" => "POST"
"url" => "/settings/db/verify", ],
"verb" => "POST" [
], "name" => "settings#saveProperties",
[ "url" => "/settings/properties",
"name" => "settings#saveProperties", "verb" => "POST"
"url" => "/settings/properties", ],
"verb" => "POST" [
], "name" => "settings#clearCache",
[ "url" => "/settings/cache/clear",
"name" => "settings#clearCache", "verb" => "POST"
"url" => "/settings/cache/clear", ],
"verb" => "POST" [
], "name" => "settings#tableAutocomplete",
[ "url" => "/settings/autocomplete/table",
"name" => "settings#tableAutocomplete", "verb" => "POST"
"url" => "/settings/autocomplete/table", ],
"verb" => "POST" [
], "name" => "settings#userTableAutocomplete",
[ "url" => "/settings/autocomplete/table/user",
"name" => "settings#userTableAutocomplete", "verb" => "POST"
"url" => "/settings/autocomplete/table/user", ],
"verb" => "POST" [
], "name" => "settings#userGroupTableAutocomplete",
[ "url" => "/settings/autocomplete/table/user_group",
"name" => "settings#userGroupTableAutocomplete", "verb" => "POST"
"url" => "/settings/autocomplete/table/user_group", ],
"verb" => "POST" [
], "name" => "settings#groupTableAutocomplete",
[ "url" => "/settings/autocomplete/table/group",
"name" => "settings#groupTableAutocomplete", "verb" => "POST"
"url" => "/settings/autocomplete/table/group", ],
"verb" => "POST" [
], "name" => "settings#cryptoParams",
[ "url" => "/settings/crypto/params",
"name" => "settings#cryptoParams", "verb" => "GET"
"url" => "/settings/crypto/params", ],
"verb" => "GET" ],
], ];
]
] return $routes;
);
+2 -2
View File
@@ -2,10 +2,10 @@
/** /**
* Nextcloud - user_sql * Nextcloud - user_sql
* *
* @copyright 2018 Marcin Łojewski <dev@mlojewski.me>
* @author Marcin Łojewski <dev@mlojewski.me>
* @copyright 2025 Claus-Justus Heine <himself@claus-justus-heine.de> * @copyright 2025 Claus-Justus Heine <himself@claus-justus-heine.de>
* @author Claus-Justus Heine <himself@claus-justus-heine.de> * @author Claus-Justus Heine <himself@claus-justus-heine.de>
* @copyright 2018 Marcin Łojewski <dev@mlojewski.me>
* @author Marcin Łojewski <dev@mlojewski.me>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as * it under the terms of the GNU Affero General Public License as
+5 -5
View File
@@ -261,13 +261,13 @@ final class UserBackend extends ABackend implements
if ($user instanceof User) { if ($user instanceof User) {
$this->cache->set($cacheKey, $user); $this->cache->set($cacheKey, $user);
// avoid recursion as the action may very well call into the UserManager again ... // avoid recursion as the action may very well call into the UserManager again ...
$actions = $this->actions; $actions = $this->actions;
$this->actions = []; $this->actions = [];
foreach ($this->actions as $action) { foreach ($actions as $action) {
$action->doAction($user); $action->doAction($user);
} }
$this->actions = $actions; $this->actions = $actions;
} }
return $user; return $user;
+8
View File
@@ -4,6 +4,8 @@
* *
* @copyright 2021 Marcin Łojewski <dev@mlojewski.me> * @copyright 2021 Marcin Łojewski <dev@mlojewski.me>
* @author Marcin Łojewski <dev@mlojewski.me> * @author Marcin Łojewski <dev@mlojewski.me>
* @copyright 2025 Claus-Justus Heine
* @author Claus-Justus Heine <himself@claus-justus-heine.de>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as * it under the terms of the GNU Affero General Public License as
@@ -21,6 +23,8 @@
namespace OCA\UserSQL\Query; namespace OCA\UserSQL\Query;
use UnexpectedValueException;
use Doctrine\DBAL\Driver\Statement; use Doctrine\DBAL\Driver\Statement;
use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\Exception as DBALException;
use OC\DB\Connection; use OC\DB\Connection;
@@ -151,6 +155,10 @@ class DataQuery
"driverOptions" => array() "driverOptions" => array()
); );
if (empty($this->properties[DB::DRIVER])) {
throw new UnexpectedValueException('Attempt to connect without configuration.');
}
if ($this->properties[DB::DRIVER] == 'mysql') { if ($this->properties[DB::DRIVER] == 'mysql') {
if ($this->properties[DB::SSL_CA]) { if ($this->properties[DB::SSL_CA]) {
$parameters["driverOptions"][\PDO::MYSQL_ATTR_SSL_CA] = \OC::$SERVERROOT . '/' . $this->properties[DB::SSL_CA]; $parameters["driverOptions"][\PDO::MYSQL_ATTR_SSL_CA] = \OC::$SERVERROOT . '/' . $this->properties[DB::SSL_CA];