@staticmethod<EOL><INDENT>def _warn_unsafe_extraction_path(path):<DEDENT>
if os.name == '<STR_LIT>' and not path.startswith(os.environ['<STR_LIT>']):<EOL><INDENT>return<EOL><DEDENT>mode = os.stat(path).st_mode<EOL>if mode & stat.S_IWOTH or mode & stat.S_IWGRP:<EOL><INDENT>msg = (<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>" % path<EOL>)<EOL>warnings.warn(msg, UserWarning)<EOL><DEDENT>
If the default extraction path is overridden and set to an insecure
location, such as /tmp, it opens up an opportunity for an attacker to
replace an extracted file with an unauthorized payload. Warn the user
if a known insecure location is used.

See Distribute #375 for more details.