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
440e2f1a
Commit
440e2f1a
authored
Jun 26, 2017
by
Nils Goroll
Committed by
Pål Hermunn Johansen
Jun 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't panic on a null ban
like ban(req.http.non-existing-header)
parent
11830c5d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
cache_vrt.c
bin/varnishd/cache/cache_vrt.c
+5
-1
v00011.vtc
bin/varnishtest/tests/v00011.vtc
+2
-0
No files found.
bin/varnishd/cache/cache_vrt.c
View file @
440e2f1a
...
@@ -416,7 +416,11 @@ VRT_ban_string(VRT_CTX, const char *str)
...
@@ -416,7 +416,11 @@ VRT_ban_string(VRT_CTX, const char *str)
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
AN
(
ctx
->
vsl
);
AN
(
ctx
->
vsl
);
AN
(
str
);
if
(
str
==
NULL
)
{
VSLb
(
ctx
->
vsl
,
SLT_VCL_Error
,
"ban(): Null argument"
);
return
;
}
bp
=
BAN_Build
();
bp
=
BAN_Build
();
if
(
bp
==
NULL
)
{
if
(
bp
==
NULL
)
{
...
...
bin/varnishtest/tests/v00011.vtc
View file @
440e2f1a
...
@@ -11,6 +11,7 @@ server s1 {
...
@@ -11,6 +11,7 @@ server s1 {
varnish v1 -vcl+backend {
varnish v1 -vcl+backend {
sub vcl_recv {
sub vcl_recv {
if (req.method == "PURGE") {
if (req.method == "PURGE") {
ban(req.http.doesntexist);
ban("");
ban("");
ban("req.url");
ban("req.url");
ban("req.url //");
ban("req.url //");
...
@@ -31,6 +32,7 @@ client c1 {
...
@@ -31,6 +32,7 @@ client c1 {
} -run
} -run
logexpect l1 -v v1 -d 1 -g vxid {
logexpect l1 -v v1 -d 1 -g vxid {
expect * 1004 VCL_Error {ban[(][)]: Null argument}
expect * 1004 VCL_Error {ban[(][)]: No ban conditions found[.]}
expect * 1004 VCL_Error {ban[(][)]: No ban conditions found[.]}
expect * 1004 VCL_Error {ban[(][)]: Expected comparison operator[.]}
expect * 1004 VCL_Error {ban[(][)]: Expected comparison operator[.]}
expect * 1004 VCL_Error {ban[(][)]: Expected second operand[.]}
expect * 1004 VCL_Error {ban[(][)]: Expected second operand[.]}
...
...
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