httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 55062] New: mod_cache_socache can't parse CacheSocache providers correctly
Date Wed, 05 Jun 2013 08:05:51 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=55062

            Bug ID: 55062
           Summary: mod_cache_socache can't parse CacheSocache providers
                    correctly
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_cache
          Assignee: bugs@httpd.apache.org
          Reporter: martin@ksellmann.de

Created attachment 30397
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30397&action=edit
patch for the reported bug

mod_cache_socache is the intermediary layer between mod_cache and e.g.
mod_socache_memcache. In order to activate such a socache provider you would
typically use a directive like

    CacheSocache memcache:localhost:11211

Unfortunately the parsing code for this directive in
modules/cache/mod_cache_socache.c is buggy.

In lines 1264 - 1273 it correctly parses the name of the socache_provider into
a variable "name" (as the directives argument resides in variable "arg" but
this can also contain configuration arguments after the colon).

Unfortunately in lines 1275-1276 it tries to verify the existence of the
socache_provider against the variable "arg" instead of "name".
The effect of this is, that a directive "CacheSocache" without any additional
arguments passes this check, but the socache_provider doesn't get any
additional configuration values. If you use "CacheSocache" with any configuring
arguments, the check compares the whole directive's argument against the valid
socache_providers and fails.

Using the variable "name" in line 1276 instead of "arg" fixes the problem.
(see attacched patch against rev 1489734.

Please apologize if this is a duplicate, but I couldn't find this bug reported
elsewhere. Also this bug is present in version 2.4.4 as well and I used
mod_cache as a components as mod_cache_socache is missing as component.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message