Files
gristlabs_grist-core/app/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
..
2023-08-21 09:15:53 -04:00
2023-11-16 12:38:08 -05:00
2023-11-16 12:38:08 -05:00
2023-01-26 09:47:14 +01:00
2022-02-19 09:46:49 +00:00
2022-02-19 09:46:49 +00:00
2023-10-11 17:36:58 -04:00
2022-06-17 21:53:20 +02:00
2023-09-27 14:49:23 +02:00
2023-02-20 22:46:36 -05:00
2023-11-19 20:12:37 -05:00
2022-07-04 10:42:40 -04:00
2023-04-03 13:29:35 -04:00
2022-07-04 10:42:40 -04:00
2023-05-23 15:50:15 -04:00
2022-04-01 15:24:19 -07:00
2023-07-30 15:13:43 -04:00
2023-10-11 17:36:58 -04:00
2023-11-19 20:12:37 -05:00
2020-07-21 20:39:10 -04:00
2023-12-01 08:14:12 -05:00
2022-08-25 12:38:36 -07:00