<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body><div style="font-family: sans-serif;"><div class="markdown" style="white-space: normal;">
<p dir="auto">P.S. As a for-instance, a good way to separate the internal concerns of envelope logic from the concerns of a payload-providing client is to make the low-level, expert-only string interpolation function be <code style="margin: 0; padding: 0 0.4em; border-radius: 3px; background-color: #F7F7F7;">protected</code> in the abstract DSL-implementor class. Then the clients only use DSL-specific API points, but internally the string assembly happens smoothly. I guess that’s not an option with interfaces, but it is one of the classic ways to avoid the confusion between envelope logic and payload logic.</p>
<p dir="auto">On 31 Mar 2023, at 13:23, John Rose wrote:</p>
</div><div class="plaintext" style="white-space: normal;"><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777;"><p dir="auto">What I hope is clear is my point about separating concerns, between
<br>
knowing how and when to escape a value *in a particular place*, and coming up with a set of interpolation values for those places. It’s rooted in the distinction between an envelope and its contents. Quoting (and validation) is something envelope-specific. Contents are usually specific to some completely unrelated domain of business logic. Unless API users are helped to separate those concerns, there will be confusion, exploitable in attacks.</p>
<br></blockquote></div>
<div class="markdown" style="white-space: normal;">
</div></div></body>
</html>