Staging
v0.5.1
https://github.com/python/cpython
Revision e866f33a48ee24e447fafd181f0da5f9584e0340 authored by Miss Skeleton (bot) on 21 October 2020, 05:29:44 UTC, committed by GitHub on 21 October 2020, 05:29:44 UTC

tarfile writes full path to FNAME field of GZIP format instead of just basename if user specified absolute path. Some archive viewers may process file incorrectly. Also it creates security issue because anyone can know structure of directories on system and know username or other personal information.

RFC1952 says about FNAME:
This is the original name of the file being compressed, with any directory components removed.

So tarfile must remove directory names from FNAME and write only basename of file.

Automerge-Triggered-By: @jaraco
(cherry picked from commit 22748a83d927d3da1beaed771be30887c42b2500)

Co-authored-by: Artem Bulgakov <ArtemSBulgakov@ya.ru>
1 parent 6443a8c
Raw File
Tip revision: e866f33a48ee24e447fafd181f0da5f9584e0340 authored by Miss Skeleton (bot) on 21 October 2020, 05:29:44 UTC
bpo-41316: Make tarfile follow specs for FNAME (GH-21511)
Tip revision: e866f33
sqlite3.rc
// Resource script for Sqlite DLL.

#include <winver.h>

// Include the manifest file that indicates we support all
// current versions of Windows.
#include <winuser.h>
2 RT_MANIFEST "python.manifest"

/////////////////////////////////////////////////////////////////////////////
//
// Version
//

#define _S(x) #x
#define S(x) _S(x)

VS_VERSION_INFO VERSIONINFO
 FILEVERSION SQLITE_MAJOR_VERSION, SQLITE_MINOR_VERSION, SQLITE_MICRO_VERSION, SQLITE_PATCH_VERSION
 PRODUCTVERSION SQLITE_MAJOR_VERSION, SQLITE_MINOR_VERSION, SQLITE_MICRO_VERSION, SQLITE_PATCH_VERSION
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS VS_FF_DEBUG
#else
 FILEFLAGS 0x0L
#endif
 FILEOS VOS__WINDOWS32
 FILETYPE VFT_DLL
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "000004b0"
        BEGIN
            VALUE "CompanyName", "SQLite3\0"
            VALUE "FileDescription", "SQLite3\0"
            VALUE "FileVersion", S(SQLITE_VERSION) "\0"
            VALUE "InternalName", "SQLite3 DLL\0"
            VALUE "LegalCopyright", "Unspecified\0"
            VALUE "OriginalFilename", "sqlite3.dll\0"
            VALUE "ProductName", "SQLite3\0"
            VALUE "ProductVersion", S(SQLITE_VERSION) "\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x0, 1200
    END
END
back to top