View Issue Details

IDProjectCategoryView StatusLast Update
0006267OXID eShop (all versions)4.08. Cachepublic2017-06-29 11:20
ReporterAdrian.Kirchner Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status acknowledgedResolutionopen 
Product Version4.9.4 / 5.2.4 
Summary0006267: Varnish vcl evalutates regex url expressions case sensitive while invalidation requests
DescriptionThis is a follow-up to 0006263. Further investigation revealed a problem with case sensivity.
Steps To Reproduce1) add a category with title 'SomeCategory'
2) visit the Category via http://shop.tld/SomeCategory/
3) visit the Category via http://shop.tld/somecategory/ (lower case)
4) Trigger a save action in the oxid backend for this category
5) Reload both urls in the shop frontend and verify via varnish headers, that only the first url is invalidated in 4)
Additional InformationThe ban() call in the vcl subroutine oxInvalidateRecv needs to evaluate the x-ban-url in a case insensitive manner.

Instead of
> ban("obj.http.x-url ~ " + req.http.x-ban-url [..]

It should be
> ban("obj.http.x-url ~ (?i)" + req.http.x-ban-url [..]
TagsCache, EE, Varnish
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Relationships

related to 0006263 acknowledgedflorian.auer Dependency invalidation fails with URLs containing regular expression characters 

Activities

michael_keiluweit

2015-11-20 10:24

administrator   ~0011313

From the Varnish docu:

Are regular expressions case sensitive or not? Can I change it?

In 2.1 and newer, regular expressions are case sensitive by default. In earlier versions, they were case insensitive.

To change this for a single regex in 2.1, use (?i) at the start.


------------------------------


From version 2.1.0 and forward, we use PCRE regular expressions, where it is possible to control case-sensitivity in the individual regular expressions, so we decided that it would probably confuse people if we made the default case-insentive. (We promise not to change our minds about this again.)

To make a PCRE regex case insensitive, put (?i) at the start:

if (req.http.host ~ "(?i)example.com$") {
        ...
}




Source: https://www.varnish-cache.org/docs/2.1/faq/general.html