[master] cb44f3487 vtc: Spurious "\T" sequence in u3

Nils Goroll nils.goroll at uplex.de
Thu Jun 10 09:39:05 UTC 2021


commit cb44f34877bf5d2a042b382828e8d2779af10271
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Wed May 19 11:46:26 2021 +0200

    vtc: Spurious "\T" sequence in u3
    
    It is interpreted as "T" by pcre but pcre2 is stricter and treats it as
    a syntax error. While there may be a bit flag to ignore unknown escape
    sequences, it is probably worth hardening instead.
    
    Refs #3559

diff --git a/bin/varnishtest/tests/u00003.vtc b/bin/varnishtest/tests/u00003.vtc
index 3cfa187de..e67962a28 100644
--- a/bin/varnishtest/tests/u00003.vtc
+++ b/bin/varnishtest/tests/u00003.vtc
@@ -150,7 +150,7 @@ req (\d+) rxreq \5 - - - -$} \
 %{VSL:Timestamp:Resp[2]}x %{VSL:Timestamp:foo}x %{VSL:ReqURL[2]}x"}
 
 # times
-shell -match {^\{\d{4}-\d{2}-\d{2}\}T\{\d{2}:\d{2}:\d{2}\} \{\{\d{4}-\d{2}-\d{2}\T\d{2}:\d{2}:\d{2}\}\} \d+ \d+ \d+ \d{10,} \d{13,} \d{16,} \d{3} \d{6} usecx msecy} \
+shell -match {^\{\d{4}-\d{2}-\d{2}\}T\{\d{2}:\d{2}:\d{2}\} \{\{\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\}\} \d+ \d+ \d+ \d{10,} \d{13,} \d{16,} \d{3} \d{6} usecx msecy} \
 	{varnishncsa -n ${v1_name} -d -F "%{{%F}T{%T}}t %{{{%FT%T}}}t \
 %{s}T %{ms}T %{us}T %{sec}t %{msec}t %{usec}t %{msec_frac}t %{usec_frac}t \
 %{usecx}t %{msecy}t"}


More information about the varnish-commit mailing list