From 3cb52bdbabcc032c789f77795d010fd5e872d4b8 Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Thu, 26 Nov 2026 12:01:36 +0530 Subject: [PATCH 1/3] feat(audit_log): let ExApps write to the admin audit log ExApps had no way to record admin or security relevant actions in the admin audit log; the existing log endpoint only writes to nextcloud.log. The operation must start with the ID of the calling ExApp, so an ExApp cannot write entries that look like they came from Nextcloud or another app, and every entry names the ExApp in its appId parameter. Assisted-by: Copilot:claude-opus-5-5 Signed-off-by: Anupam Kumar --- appinfo/routes.php | 1 + lib/AuditLog/AuditLogger.php | 44 +++++++- lib/Controller/OCSApiController.php | 28 +++++ openapi-full.json | 144 +++++++++++++++++++++++++ openapi.json | 144 +++++++++++++++++++++++++ tests/php/AuditLog/AuditLoggerTest.php | 37 +++++++ 6 files changed, 396 insertions(+), 2 deletions(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index 2d4b7144a..e8d68f754 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -66,6 +66,7 @@ 'ocs' => [ // Logging ['name' => 'OCSApi#log', 'url' => '/api/v1/log', 'verb' => 'POST'], + ['name' => 'OCSApi#auditLog', 'url' => '/api/v1/audit_log', 'verb' => 'POST'], ['name' => 'OCSApi#getNCUsersList', 'url' => '/api/v1/users', 'verb' => 'GET'], ['name' => 'OCSApi#setAppInitProgressDeprecated', 'url' => '/apps/status/{appId}', 'verb' => 'PUT'], diff --git a/lib/AuditLog/AuditLogger.php b/lib/AuditLog/AuditLogger.php index c20e6ba44..53a6991eb 100644 --- a/lib/AuditLog/AuditLogger.php +++ b/lib/AuditLog/AuditLogger.php @@ -9,6 +9,7 @@ namespace OCA\AppAPI\AuditLog; +use InvalidArgumentException; use OCP\EventDispatcher\IEventDispatcher; use OCP\Log\Audit\CriticalActionPerformedEvent; @@ -26,9 +27,48 @@ public function __construct( * @param array $parameters named values for the placeholders of $message, in order, optionally followed by more context */ public function log(Operation $operation, string $message, array $parameters = []): void { + $this->dispatch($operation->value, $message, $parameters); + } + + /** + * Writes an entry on behalf of an ExApp, whose ID is added as the `appId` parameter + * + * @param string $operation operation in the form `.entity.action`, the first part being the ID of the ExApp + * @param string $message message with a `%s` placeholder for each of the first parameters + * @param array $parameters named values for the placeholders of $message, in order, optionally followed by more context + * @throws InvalidArgumentException if the app ID is empty, the operation does not start with the app ID or is not in the form `.entity.action`, a parameter is not a scalar or null, or the message does not fit the parameters + */ + public function logForExApp(string $appId, string $operation, string $message, array $parameters = []): void { + if ($appId === '') { + throw new InvalidArgumentException('App ID must not be empty'); + } + if (!str_starts_with($operation, $appId . '.')) { + throw new InvalidArgumentException(sprintf('Operation must be in the form %s.entity.action', $appId)); + } + if (array_key_exists('appId', $parameters)) { + throw new InvalidArgumentException('Parameter appId is reserved'); + } + foreach ($parameters as $name => $value) { + if (!is_string($name) || ($value !== null && !is_scalar($value))) { + throw new InvalidArgumentException('Parameters must be named and be scalars or null'); + } + } + $parameters['appId'] = $appId; + try { + $this->dispatch($operation, self::escape($message), $parameters); + } catch (\ValueError $e) { + throw new InvalidArgumentException('Message does not fit the parameters: ' . $e->getMessage(), 0, $e); + } + } + + private function dispatch(string $operation, string $message, array $parameters): void { // The logger replaces `{placeholders}` in the message and admin_audit formats it again, so values are escaped here - $values = array_map(static fn (mixed $value): mixed => is_string($value) ? strtr($value, ['{' => '(', '}' => ')']) : $value, array_values($parameters)); + $values = array_map(static fn (mixed $value): mixed => is_string($value) ? self::escape($value) : $value, array_values($parameters)); $message = str_replace('%', '%%', vsprintf($message, $values)); - $this->eventDispatcher->dispatchTyped(new CriticalActionPerformedEvent($message, $parameters, false, $operation->value)); + $this->eventDispatcher->dispatchTyped(new CriticalActionPerformedEvent($message, $parameters, false, $operation)); + } + + private static function escape(string $value): string { + return strtr($value, ['{' => '(', '}' => ')']); } } diff --git a/lib/Controller/OCSApiController.php b/lib/Controller/OCSApiController.php index 8659c3dd7..fb0b3896a 100644 --- a/lib/Controller/OCSApiController.php +++ b/lib/Controller/OCSApiController.php @@ -12,6 +12,7 @@ use OCA\AppAPI\AppInfo\Application; use OCA\AppAPI\Attribute\AppAPIAuth; use OCA\AppAPI\Attribute\MaintenanceModeAvailable; +use OCA\AppAPI\AuditLog\AuditLogger; use OCA\AppAPI\Service\AppAPIService; use OCA\AppAPI\Service\ExAppService; use OCP\AppFramework\Http; @@ -37,6 +38,7 @@ public function __construct( private IConfig $config, private readonly ExAppService $exAppService, private readonly IURLGenerator $urlGenerator, + private readonly AuditLogger $auditLogger, ) { parent::__construct(Application::APP_ID, $request); @@ -71,6 +73,32 @@ public function log(int $level, string $message): DataResponse { } } + /** + * Write an entry to the admin audit log on behalf of an ExApp + * + * The entry carries the ID of the ExApp as the `appId` parameter. + * + * @param string $operation Stable identifier of the action in the form `.entity.action`, starting with the ID of the ExApp, e.g. `my_app.item.created` + * @param string $message Message with a `%s` placeholder for each of the first parameters, in order + * @param array $parameters Named values for the placeholders of the message, optionally followed by more context + * + * @return DataResponse, array{}> + * @throws OCSBadRequestException Invalid operation, parameters or message + * + * 200: Entry written to the audit log + */ + #[AppAPIAuth] + #[PublicPage] + #[NoCSRFRequired] + public function auditLog(string $operation, string $message, array $parameters = []): DataResponse { + try { + $this->auditLogger->logForExApp($this->request->getHeader('ex-app-id'), $operation, $message, $parameters); + } catch (\InvalidArgumentException $e) { + throw new OCSBadRequestException($e->getMessage()); + } + return new DataResponse(); + } + /** * Get a list of all Nextcloud user IDs * diff --git a/openapi-full.json b/openapi-full.json index e18b1cfd2..4f1eb409b 100644 --- a/openapi-full.json +++ b/openapi-full.json @@ -4470,6 +4470,150 @@ } } }, + "/ocs/v2.php/apps/app_api/api/v1/audit_log": { + "post": { + "operationId": "ocs_api-audit-log", + "summary": "Write an entry to the admin audit log on behalf of an ExApp", + "description": "The entry carries the ID of the ExApp as the `appId` parameter.", + "tags": [ + "ocs_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "operation", + "message" + ], + "properties": { + "operation": { + "type": "string", + "description": "Stable identifier of the action in the form `.entity.action`, starting with the ID of the ExApp, e.g. `my_app.item.created`" + }, + "message": { + "type": "string", + "description": "Message with a `%s` placeholder for each of the first parameters, in order" + }, + "parameters": { + "type": "object", + "default": {}, + "description": "Named values for the placeholders of the message, optionally followed by more context", + "additionalProperties": { + "nullable": true, + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "number", + "format": "double" + }, + { + "type": "boolean" + } + ] + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "ex-app-id", + "in": "header", + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Entry written to the audit log", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Invalid operation, parameters or message", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, "/ocs/v2.php/apps/app_api/api/v1/users": { "get": { "operationId": "ocs_api-getnc-users-list", diff --git a/openapi.json b/openapi.json index 9f281206b..3c334f974 100644 --- a/openapi.json +++ b/openapi.json @@ -621,6 +621,150 @@ } } }, + "/ocs/v2.php/apps/app_api/api/v1/audit_log": { + "post": { + "operationId": "ocs_api-audit-log", + "summary": "Write an entry to the admin audit log on behalf of an ExApp", + "description": "The entry carries the ID of the ExApp as the `appId` parameter.", + "tags": [ + "ocs_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "operation", + "message" + ], + "properties": { + "operation": { + "type": "string", + "description": "Stable identifier of the action in the form `.entity.action`, starting with the ID of the ExApp, e.g. `my_app.item.created`" + }, + "message": { + "type": "string", + "description": "Message with a `%s` placeholder for each of the first parameters, in order" + }, + "parameters": { + "type": "object", + "default": {}, + "description": "Named values for the placeholders of the message, optionally followed by more context", + "additionalProperties": { + "nullable": true, + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "number", + "format": "double" + }, + { + "type": "boolean" + } + ] + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "ex-app-id", + "in": "header", + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Entry written to the audit log", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Invalid operation, parameters or message", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, "/ocs/v2.php/apps/app_api/api/v1/users": { "get": { "operationId": "ocs_api-getnc-users-list", diff --git a/tests/php/AuditLog/AuditLoggerTest.php b/tests/php/AuditLog/AuditLoggerTest.php index ef0b1820b..7518b6229 100644 --- a/tests/php/AuditLog/AuditLoggerTest.php +++ b/tests/php/AuditLog/AuditLoggerTest.php @@ -13,6 +13,7 @@ use OCA\AppAPI\AuditLog\Operation; use OCP\EventDispatcher\IEventDispatcher; use OCP\Log\Audit\CriticalActionPerformedEvent; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class AuditLoggerTest extends TestCase { @@ -45,4 +46,40 @@ public function testLogKeepsValuesFromChangingTheEntry(): void { (new AuditLogger($eventDispatcher))->log(Operation::DaemonRegistered, 'Deploy daemon %s on %s was registered', $parameters); } + + public function testLogForExAppAddsTheAppId(): void { + $eventDispatcher = $this->createMock(IEventDispatcher::class); + $eventDispatcher->expects(self::once()) + ->method('dispatchTyped') + ->with(self::callback(static function (CriticalActionPerformedEvent $event): bool { + self::assertSame('Item (x) was created by 100%%s', $event->getLogMessage()); + self::assertSame(['item' => '{x}', 'user' => '100%s', 'appId' => 'test_app'], $event->getParameters()); + self::assertSame('test_app.item.created', $event->getOperation()); + return true; + })); + + (new AuditLogger($eventDispatcher))->logForExApp('test_app', 'test_app.item.created', 'Item %s was created by %s', ['item' => '{x}', 'user' => '100%s']); + } + + public static function dataInvalidExAppEntries(): array { + return [ + 'empty app ID' => ['', 'test_app.item.created', 'Created', []], + 'operation of another app' => ['test_app', 'app_api.ex_app.enabled', 'ExApp enabled', []], + 'operation of an app whose ID starts the same' => ['test', 'test_app.item.created', 'Created', []], + 'operation without entity' => ['test_app', 'test_app.created', 'Created', []], + 'reserved parameter' => ['test_app', 'test_app.item.created', 'Created for %s', ['appId' => 'other_app']], + 'nested parameter' => ['test_app', 'test_app.item.created', 'Created %s', ['item' => ['a']]], + 'unnamed parameter' => ['test_app', 'test_app.item.created', 'Created %s', ['a']], + 'too many placeholders' => ['test_app', 'test_app.item.created', 'Created %s by %s at %s', ['item' => 'a']], + ]; + } + + #[DataProvider('dataInvalidExAppEntries')] + public function testLogForExAppRejectsInvalidEntries(string $appId, string $operation, string $message, array $parameters): void { + $eventDispatcher = $this->createMock(IEventDispatcher::class); + $eventDispatcher->expects(self::never())->method('dispatchTyped'); + + $this->expectException(\InvalidArgumentException::class); + (new AuditLogger($eventDispatcher))->logForExApp($appId, $operation, $message, $parameters); + } } From 9d0ad964790c36d55cb3bb7af4bb9ef2061f60fe Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Sat, 28 Nov 2026 08:33:47 +0000 Subject: [PATCH 2/3] fix(audit_log): reject format directives other than %s in ExApp messages An ExApp could use %c to write braces into the message after the escaping, which let it add placeholders such as {params} that the logger then filled in, dropping the appId from the stored entry. A large width such as %1073741824s made vsprintf exhaust the memory of the request. ExApp messages now only accept %s and %%, and the formatted message is escaped as a whole. Assisted-by: Copilot:claude-opus-5-5 Signed-off-by: Anupam Kumar --- lib/AuditLog/AuditLogger.php | 20 +++++++++++++------- tests/php/AuditLog/AuditLoggerTest.php | 17 +++++++++++++++++ 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/lib/AuditLog/AuditLogger.php b/lib/AuditLog/AuditLogger.php index 53a6991eb..c5ca41e91 100644 --- a/lib/AuditLog/AuditLogger.php +++ b/lib/AuditLog/AuditLogger.php @@ -34,9 +34,9 @@ public function log(Operation $operation, string $message, array $parameters = [ * Writes an entry on behalf of an ExApp, whose ID is added as the `appId` parameter * * @param string $operation operation in the form `.entity.action`, the first part being the ID of the ExApp - * @param string $message message with a `%s` placeholder for each of the first parameters + * @param string $message message with a `%s` placeholder for each of the first parameters; `%%` writes a `%`, other directives are rejected * @param array $parameters named values for the placeholders of $message, in order, optionally followed by more context - * @throws InvalidArgumentException if the app ID is empty, the operation does not start with the app ID or is not in the form `.entity.action`, a parameter is not a scalar or null, or the message does not fit the parameters + * @throws InvalidArgumentException if the app ID is empty, the operation does not start with the app ID or is not in the form `.entity.action`, a parameter is not a scalar or null, or the message has a directive other than `%s` and `%%` or does not fit the parameters */ public function logForExApp(string $appId, string $operation, string $message, array $parameters = []): void { if ($appId === '') { @@ -53,22 +53,28 @@ public function logForExApp(string $appId, string $operation, string $message, a throw new InvalidArgumentException('Parameters must be named and be scalars or null'); } } + // Directives like `%c` or `%1073741824s` would write braces past the escaping or exhaust the memory + if (preg_match('/%(?!s)/', str_replace('%%', '', $message))) { + throw new InvalidArgumentException('Message must only contain %s and %% directives'); + } $parameters['appId'] = $appId; try { - $this->dispatch($operation, self::escape($message), $parameters); + $this->dispatch($operation, $message, $parameters); } catch (\ValueError $e) { throw new InvalidArgumentException('Message does not fit the parameters: ' . $e->getMessage(), 0, $e); } } private function dispatch(string $operation, string $message, array $parameters): void { - // The logger replaces `{placeholders}` in the message and admin_audit formats it again, so values are escaped here - $values = array_map(static fn (mixed $value): mixed => is_string($value) ? self::escape($value) : $value, array_values($parameters)); - $message = str_replace('%', '%%', vsprintf($message, $values)); + $message = self::escape(vsprintf($message, array_values($parameters))); $this->eventDispatcher->dispatchTyped(new CriticalActionPerformedEvent($message, $parameters, false, $operation)); } + /** + * The logger replaces `{placeholders}` in the message, so braces become parentheses, and admin_audit + * formats the message again, so values are escaped here + */ private static function escape(string $value): string { - return strtr($value, ['{' => '(', '}' => ')']); + return strtr($value, ['{' => '(', '}' => ')', '%' => '%%']); } } diff --git a/tests/php/AuditLog/AuditLoggerTest.php b/tests/php/AuditLog/AuditLoggerTest.php index 7518b6229..8589d787b 100644 --- a/tests/php/AuditLog/AuditLoggerTest.php +++ b/tests/php/AuditLog/AuditLoggerTest.php @@ -61,6 +61,18 @@ public function testLogForExAppAddsTheAppId(): void { (new AuditLogger($eventDispatcher))->logForExApp('test_app', 'test_app.item.created', 'Item %s was created by %s', ['item' => '{x}', 'user' => '100%s']); } + public function testLogForExAppKeepsTheMessageFromAddingPlaceholders(): void { + $eventDispatcher = $this->createMock(IEventDispatcher::class); + $eventDispatcher->expects(self::once()) + ->method('dispatchTyped') + ->with(self::callback(static function (CriticalActionPerformedEvent $event): bool { + self::assertSame('(appId) is 100%% (params)', $event->getLogMessage()); + return true; + })); + + (new AuditLogger($eventDispatcher))->logForExApp('test_app', 'test_app.item.created', '{appId} is 100%% %s', ['item' => '{params}']); + } + public static function dataInvalidExAppEntries(): array { return [ 'empty app ID' => ['', 'test_app.item.created', 'Created', []], @@ -71,6 +83,11 @@ public static function dataInvalidExAppEntries(): array { 'nested parameter' => ['test_app', 'test_app.item.created', 'Created %s', ['item' => ['a']]], 'unnamed parameter' => ['test_app', 'test_app.item.created', 'Created %s', ['a']], 'too many placeholders' => ['test_app', 'test_app.item.created', 'Created %s by %s at %s', ['item' => 'a']], + 'character directive' => ['test_app', 'test_app.item.created', '%cparams%c', ['open' => 123, 'close' => 125]], + 'width' => ['test_app', 'test_app.item.created', '%1073741824s', ['item' => 'a']], + 'padding character' => ['test_app', 'test_app.item.created', "%'{5s", ['item' => 'a']], + 'numbered argument' => ['test_app', 'test_app.item.created', '%1$s', ['item' => 'a']], + 'trailing percent' => ['test_app', 'test_app.item.created', 'Created %s 100%', ['item' => 'a']], ]; } From 6ca304b9d59628e453c3ef4c4bde645e572a2b5a Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Sat, 28 Nov 2026 08:39:41 +0000 Subject: [PATCH 3/3] fix(audit_log): reject ExApp messages with more placeholders than parameters The appId parameter is added before formatting, so a message with exactly one placeholder too many took the app ID as its last value instead of being rejected, and the entry read for example "a test_app" instead of naming the missing value. Assisted-by: Copilot:claude-opus-5-5 Signed-off-by: Anupam Kumar --- lib/AuditLog/AuditLogger.php | 15 ++++++++------- tests/php/AuditLog/AuditLoggerTest.php | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/AuditLog/AuditLogger.php b/lib/AuditLog/AuditLogger.php index c5ca41e91..e2a6a941f 100644 --- a/lib/AuditLog/AuditLogger.php +++ b/lib/AuditLog/AuditLogger.php @@ -36,7 +36,7 @@ public function log(Operation $operation, string $message, array $parameters = [ * @param string $operation operation in the form `.entity.action`, the first part being the ID of the ExApp * @param string $message message with a `%s` placeholder for each of the first parameters; `%%` writes a `%`, other directives are rejected * @param array $parameters named values for the placeholders of $message, in order, optionally followed by more context - * @throws InvalidArgumentException if the app ID is empty, the operation does not start with the app ID or is not in the form `.entity.action`, a parameter is not a scalar or null, or the message has a directive other than `%s` and `%%` or does not fit the parameters + * @throws InvalidArgumentException if the app ID is empty, the operation does not start with the app ID or is not in the form `.entity.action`, a parameter is not a scalar or null, or the message has a directive other than `%s` and `%%` or more placeholders than parameters */ public function logForExApp(string $appId, string $operation, string $message, array $parameters = []): void { if ($appId === '') { @@ -54,15 +54,16 @@ public function logForExApp(string $appId, string $operation, string $message, a } } // Directives like `%c` or `%1073741824s` would write braces past the escaping or exhaust the memory - if (preg_match('/%(?!s)/', str_replace('%%', '', $message))) { + $directives = str_replace('%%', '', $message); + if (preg_match('/%(?!s)/', $directives)) { throw new InvalidArgumentException('Message must only contain %s and %% directives'); } - $parameters['appId'] = $appId; - try { - $this->dispatch($operation, $message, $parameters); - } catch (\ValueError $e) { - throw new InvalidArgumentException('Message does not fit the parameters: ' . $e->getMessage(), 0, $e); + // Counted before appId is added, which would otherwise fill a missing placeholder + if (substr_count($directives, '%s') > count($parameters)) { + throw new InvalidArgumentException('Message has more placeholders than parameters'); } + $parameters['appId'] = $appId; + $this->dispatch($operation, $message, $parameters); } private function dispatch(string $operation, string $message, array $parameters): void { diff --git a/tests/php/AuditLog/AuditLoggerTest.php b/tests/php/AuditLog/AuditLoggerTest.php index 8589d787b..8d77647ae 100644 --- a/tests/php/AuditLog/AuditLoggerTest.php +++ b/tests/php/AuditLog/AuditLoggerTest.php @@ -83,6 +83,7 @@ public static function dataInvalidExAppEntries(): array { 'nested parameter' => ['test_app', 'test_app.item.created', 'Created %s', ['item' => ['a']]], 'unnamed parameter' => ['test_app', 'test_app.item.created', 'Created %s', ['a']], 'too many placeholders' => ['test_app', 'test_app.item.created', 'Created %s by %s at %s', ['item' => 'a']], + 'one placeholder more than parameters' => ['test_app', 'test_app.item.created', 'Created %s by %s', ['item' => 'a']], 'character directive' => ['test_app', 'test_app.item.created', '%cparams%c', ['open' => 123, 'close' => 125]], 'width' => ['test_app', 'test_app.item.created', '%1073741824s', ['item' => 'a']], 'padding character' => ['test_app', 'test_app.item.created', "%'{5s", ['item' => 'a']],