gristlabs_grist-core/test
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
..
client (core) Treating API urls as external in cells 2023-10-24 08:55:08 +02:00
client-harness (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
common getHostType: consider APP_DOC_INTERNAL_URL as native (#715) 2023-11-06 09:24:59 +01:00
deployment Adding new lines at the end 2022-09-30 17:00:38 +02:00
fixtures (core) Record Cards 2023-11-19 20:12:37 -05:00
formula-dataset (core) updates from grist-core 2023-08-21 09:15:53 -04:00
gen-server Allow URLs with only a docID #768 (#771) 2023-11-29 15:13:29 -05:00
nbrowser (core) Exit more cleanly on unhandled errors, and handle errors writing to Clients. 2023-12-01 09:42:00 -05:00
server (core) Decode cell values to prevent working around rule using 'in' on lists 2023-12-04 23:34:08 +02:00
timings run grist-core test batches in parallel (#444) 2023-03-03 09:53:33 -05:00
.eslintrc.js Fixing all eslint's reported error 2023-01-03 17:22:58 +01:00
chai-as-promised.js (core) Faster builds all around. 2022-07-04 10:42:40 -04:00
declarations.d.ts (core) Update dependencies 2023-10-11 17:36:58 -04:00
init-mocha-webdriver.js (core) Update dependencies 2023-10-11 17:36:58 -04:00
report-why-tests-hang.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
setupPaths.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
split-tests.js (core) Update dependencies 2023-10-11 17:36:58 -04:00
test_under_docker.sh move getTemplateOrg method; enable template org in docker tests (#602) 2023-07-31 16:10:59 -04:00
testUtils.ts (core) add missing tsconfig file that affects IDEs 2022-05-27 13:48:58 -04:00
tsconfig.json (core) Faster builds all around. 2022-07-04 10:42:40 -04:00
upgradeDocument add test/upgradeDocument utility 2023-01-17 16:14:15 -05:00
upgradeDocumentImpl.ts add test/upgradeDocument utility 2023-01-17 16:14:15 -05:00
utils.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
xunit-file.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00