gristlabs_grist-core/test/server/lib
Alex Hall 887717bb15 (core) Decode cell values to prevent working around rule using 'in' on lists
Summary:
Fixes bug described in https://grist.slack.com/archives/C069RUP71/p1699643458649019

Decodes cell values obtained from `InfoView.get` when evaluating user-defined ACL formulas, i.e. the result of `rec.foo` in such a formula. In particular this is so that `rec.some_list` loses the leading `L` type code and behaves sensibly in an expression like `thing in rec.some_list`.

`InfoView.get` is called in many places, but for every usage I found other than here, leaving the cell values encoded was best.

Test Plan: Added two unit server tests. The first is for the main bug involving lists. The second checks the only other plausible way I could think of that this change affects behaviour, and it seems to be for the better since both tests failed before. Most operations involving non-primitive cell values don't do anything sensible with or without decoding, so behaviour shouldn't change meaningfully in those cases.

Reviewers: georgegevoian, paulfitz

Reviewed By: georgegevoian, paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D4123
2023-12-04 23:34:08 +02:00
..
helpers (core) Exit more cleanly on unhandled errors, and handle errors writing to Clients. 2023-12-01 09:42:00 -05:00
ACLFormula.ts (core) Decode cell values to prevent working around rule using 'in' on lists 2023-12-04 23:34:08 +02:00
Assistance.ts (core) move assistant test 2023-08-22 08:14:48 -04:00
Authorizer.ts Allow URLs with only a docID #768 (#771) 2023-11-29 15:13:29 -05:00
DocApi2.ts getHostType: consider APP_DOC_INTERNAL_URL as native (#715) 2023-11-06 09:24:59 +01:00
DocApi.ts Allow URLs with only a docID #768 (#771) 2023-11-29 15:13:29 -05:00
HostedStorageManager.ts (core) updates from grist-core 2023-05-30 08:32:34 -04:00
ManyFetches.ts (core) Exit more cleanly on unhandled errors, and handle errors writing to Clients. 2023-12-01 09:42:00 -05:00
MemoryPool.ts (core) Manage memory used for websocket responses to reduce the risk of server crashes. 2023-08-07 11:28:31 -04:00
MinIOExternalStorage.ts Issue 359 support scaleway (#577) 2023-07-20 06:16:58 -04:00
ProxyAgent.ts (core) Add logging of errors whenever ProxyAgent is used, and a test for it. 2023-05-17 10:21:53 -04:00
Telemetry.ts (core) Add new telemetry events 2023-11-01 10:49:33 -04:00
UnhandledErrors.ts (core) Exit more cleanly on unhandled errors, and handle errors writing to Clients. 2023-12-01 09:42:00 -05:00
Webhooks-Proxy.ts Allow URLs with only a docID #768 (#771) 2023-11-29 15:13:29 -05:00