Skip to content

Commit 99f856e

Browse files
authored
Add consensus decision on formatting function context (#197)
1 parent 730a658 commit 99f856e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/consensus_decisions.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ For more details on the process that lead to these decisions, please refer to th
2020
The solution for [issue #127](https://github.com/unicode-org/message-format-wg/issues/127).
2121
Codified in [issue #137](https://github.com/unicode-org/message-format-wg/issues/137) during the [January 2021 meeting](https://github.com/unicode-org/message-format-wg/issues/146) of the working group.
2222
Discussed and accepted at the [February 2021 meeting](https://github.com/unicode-org/message-format-wg/blob/HEAD/meetings/2021/notes-2021-02-15.md) of the working group.
23+
- **Consensus 7:**
24+
Discussed at the [22 September 2021 meeting](https://github.com/unicode-org/message-format-wg/issues/196) of the working group.
2325

2426
## 1: Include message references in the data model.
2527

@@ -67,3 +69,19 @@ The group believes that the known value of this feature can be sufficiently cove
6769
The cost analysis of the nested selectors feature was performed in the absence of sufficient in-field experience of use in production systems.
6870
In result, the group's decision to not currently incorporate the feature is based on the lack of sufficient known value that would require them, which the group recognizes may change in the future.
6971
In result, it is the intent of the group to design MessageFormat 2 in a way that wouldn't prevent future revisions of the standard to be extended with nested selectors feature.
72+
73+
## 7: A valid MessageFormat implementation may require all formatting functions to be run without access to the runtime context.
74+
75+
**Discussion:**
76+
It is theoretically possible for formatting functions to become an attack vector to a system,
77+
as they are often handling user-controlled inputs.
78+
It is important to ensure that it is possible for an implementation to consider formatting functions as untrusted code,
79+
while not requiring that this is done.
80+
An implementation that does limit formatting function access is still expected to
81+
allow for e.g. message references and other parts of the specification to work.
82+
83+
The "runtime context" here refers to information about the current message,
84+
other available messages,
85+
the available formatting functions,
86+
and any arguments or parameters that may have been made available when calling the message formatter.
87+
The formatting function would in all cases still have access to the explicit values and options with which it was called.

0 commit comments

Comments
 (0)