diff options
| author | Didier Spezia <didier.06@gmail.com> | 2015-05-02 11:03:35 +0000 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2015-05-02 18:48:56 +0000 |
| commit | 76ace947aeaa53e4f743f0a3bc69cea17e63580a (patch) | |
| tree | 77ede093898ce95483b3047c7082c2f55ec5f093 /src/syscall/exec_linux.go | |
| parent | 172f27652e4e2e8c8f6f5f22cab7aa5542d38651 (diff) | |
| download | go-76ace947aeaa53e4f743f0a3bc69cea17e63580a.tar.xz | |
text/template: check for literals in chain of terms
The current parser ignores obvious errors such as:
{{0.1.E}}
{{true.any}}
{{"hello".wrong}}
{{nil.E}}
The common problem is that a chain is built from
a literal value. It then panics at execution time.
Furthermore, a double dot triggers the same behavior:
{{..E}}
Addresses a TODO left in Tree.operand to catch these
errors at parsing time.
Note that identifiers can include a '.', and pipelines
could return an object which a field can be derived
from (like a variable), so they are excluded from the check.
Fixes #10615
Change-Id: I903706d1c17861b5a8354632c291e73c9c0bc4e1
Reviewed-on: https://go-review.googlesource.com/9621
Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/syscall/exec_linux.go')
0 files changed, 0 insertions, 0 deletions
