[issue7881] Hardcoded path, unsafe tempfile in test_logging

Neil Schemenauer report at bugs.python.org
Mon Feb 8 01:06:30 CET 2010


New submission from Neil Schemenauer <nas-python at arctrix.com>:

The commit for issue #7868 added the following line to test_logging:

print >> open('/tmp/tmp.txt', 'w'), type(logger)

I'm not sure if that was intentional but it should be fixed.  For one, that path does not necessarily exist.  Secondly, opening a file in a world writable directory like that is a potential security problem.  A simple fix would be to use tempfile.TemporaryFile().

----------
assignee: vinay.sajip
components: Tests
messages: 99032
nosy: nascheme, vinay.sajip
severity: normal
stage: needs patch
status: open
title: Hardcoded path, unsafe tempfile in test_logging
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7881>
_______________________________________


More information about the Python-bugs-list mailing list