Apache Mod-Python - Created: (MODPYTHON-216) Code for deriving base

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > January 2007 > Created: (MODPYTHON-216) Code for deriving base





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Created: (MODPYTHON-216) Code for deriving base
Graham Dumpleton (JIRA)

2007-01-26, 7:13 pm

Code for deriving base URL/directory for request using wrong value???
---------------------------------------------------------------------

Key: MODPYTHON-216
URL: https://issues.apache.org/jira/browse/MODPYTHON-216
Project: mod_python
Issue Type: Bug
Components: core
Affects Versions: 3.3
Reporter: Graham Dumpleton
Priority: Minor


In determine_context() of src/mod_python.c, the code pertaining to Directory has:

if (!strcmp(directory, "~")) {
directory = ap_getword_conf(p, &arg);
d_regex = ap_pregcomp(p, cmd->path, AP_REG_EXTENDED|USE_ICASE);
} else if (ap_is_matchexp(directory)) {
d_is_fnmatch = 1;
}

and that for Location has:

if (!strcmp(location, "~")) {
location = ap_getword_conf(p, &arg);
l_regex = ap_pregcomp(p, cmd->path, AP_REG_EXTENDED|USE_ICASE);
} else if (ap_is_matchexp(location)) {
l_is_fnmatch = 1;
}

In both cases, the pattern used to compile the regular expression is the value of cmd->path.

These perhaps should be 'directory' and 'location' respectively, but then cmd->path may be the same thing anyway.

No actual problems have been see with code because of this, but should be verified anyway.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com