Module importer doesn't deal with case insensitive file systems properly.
-------------------------------------------------------------------------

                 Key: MODPYTHON-230
                 URL: https://issues.apache.org/jira/browse/MODPYTHON-230
             Project: mod_python
          Issue Type: Bug
          Components: importer
    Affects Versions: 3.3.1
            Reporter: Graham Dumpleton


As highlighted in:

  http://www.modpython.org/pipermail/mod_python/2007-May/023603.html

the module importer in mod_python 3.3.1 doesn't cope properly with case 
insensitive file systems such as on Windows and MacOS X platforms.

Problem is that part of a URL may be used in constructing the actual path of a 
Python code file to be loaded by the module importer. As such, the user can 
dictate what the case of characters used in the physical file path may be. On a 
case sensitive file system this is not a problem because if the file doesn't 
exist with that case an error would occur. On a system with a case insensitive 
file system however, various combinations of characters in a URL, upper or 
lower case, may match a physical file. The actual problem now is that the 
module importer will take the path exactly as given and use it to construct a 
dummy module name and further uses that to index into the module cache. With 
different combinations of upper and lower case, the end result will be that 
there could be multiple versions of the same module loaded into the process. 
This could cause problems where the module has global data that is updated and 
consulted from one request to the next.

On Windows and MacOS X systems, the _module_label() function should lower case 
the path name before generating the module name key. An option should be 
provided however to override this behaviour on Windows and MacOS X in the event 
that a case sensitive file system is used.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to