Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
aa07de47
Commit
aa07de47
authored
May 23, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't allow symbols in expressions unless we can evaluate them.
Fixes: #916
parent
5840a2a8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
r00916.vtc
bin/varnishtest/tests/r00916.vtc
+16
-0
vcc_expr.c
lib/libvcl/vcc_expr.c
+1
-1
No files found.
bin/varnishtest/tests/r00916.vtc
0 → 100644
View file @
aa07de47
varnishtest "VCC reference bug"
server s1 {
rxreq
txresp -body "FOO"
} -start
varnish v1 -badvcl {
sub s1 {
}
sub vcl_fetch {
if (req.backend == s-1){
set req.backend = s-1;
}
}
}
lib/libvcl/vcc_expr.c
View file @
aa07de47
...
...
@@ -656,7 +656,7 @@ vcc_expr4(struct vcc *tl, struct expr **e, enum var_type fmt)
* XXX: look for SYM_VAR first for consistency ?
*/
sym
=
VCC_FindSymbol
(
tl
,
tl
->
t
,
SYM_NONE
);
if
(
sym
==
NULL
)
{
if
(
sym
==
NULL
||
sym
->
eval
==
NULL
)
{
vsb_printf
(
tl
->
sb
,
"Symbol not found: "
);
vcc_ErrToken
(
tl
,
tl
->
t
);
vsb_printf
(
tl
->
sb
,
" (expected type %s):
\n
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment