qt5base-lts/tests/auto/corelib/io
Thiago Macieira 29fceed2ff QProcess/Unix: ensure we don't accidentally execute something from CWD
Unless "." (or the empty string) is in $PATH, we're not supposed to find
executables in the current directory. This is how the Unix shells behave
and we match their behavior. It's also the behavior Qt had prior to 5.9
(commit 28666d167a). On Windows, searching
the current directory is the norm, so we keep that behavior.

This commit does not add an explicit check for an empty return from
QStandardPaths::findExecutable(). Instead, we allow that empty string to
go all the way to execve(2), which will fail with ENOENT. We could catch
it early, before fork(2), but why add code for the error case?

See https://kde.org/info/security/advisory-20220131-1.txt

[ChangeLog][Important Behavior Changes] When passed a simple program
name with no slashes, QProcess on Unix systems will now only search the
current directory if "." is one of the entries in the PATH environment
variable. This bug fix restores the behavior QProcess had before Qt 5.9.
If launching an executable in the directory set by setWorkingDirectory()
or inherited from the parent is intended, pass a program name starting
with "./". For more information and best practices about finding an
executable, see QProcess' documentation.

Pick-to: 5.15 6.2 6.3
Change-Id: I54f205f6b7314351b078fffd16cf7013c97ee9fb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-09 11:26:32 -08:00
..
largefile QNX: Limit maximum largefile size 2021-12-12 13:12:01 +02:00
qabstractfileengine Remove unused .qrc files 2022-01-17 23:17:01 +01:00
qbuffer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qdataurl Remove the qmake project files 2021-01-07 15:32:28 +01:00
qdebug Remove the qmake project files 2021-01-07 15:32:28 +01:00
qdir Remove unused .qrc files 2022-01-17 23:17:01 +01:00
qdiriterator Remove unused .qrc files 2022-01-17 23:17:01 +01:00
qfile Remove unused .qrc files 2022-01-17 23:17:01 +01:00
qfileinfo Remove unused .qrc files 2022-01-17 23:17:01 +01:00
qfileselector Remove unused .qrc files 2022-01-17 23:17:01 +01:00
qfilesystementry CMake: Remove the usage of QT_SOURCE_TREE from tests 2021-07-12 18:56:14 +02:00
qfilesystemmetadata Remove the qmake project files 2021-01-07 15:32:28 +01:00
qfilesystemwatcher Blacklist tst_QFileSystemWatcher::signalsEmittedAfterFileMoved on all Windows versions 2022-01-31 17:39:33 +01:00
qiodevice tst_QIODevice: fix UB (precondition violation) in SequentialReadBuffer::readData() 2021-12-16 23:25:47 +01:00
qipaddress Disable security warnings from MSVC in tests 2021-03-17 17:22:00 +01:00
qlockfile Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
qloggingcategory Remove the qmake project files 2021-01-07 15:32:28 +01:00
qloggingregistry Remove conditioning on Android embedded 2021-09-17 17:30:14 +02:00
qnodebug Remove the qmake project files 2021-01-07 15:32:28 +01:00
qprocess QProcess/Unix: ensure we don't accidentally execute something from CWD 2022-02-09 11:26:32 -08:00
qprocess-noapplication Remove the qmake project files 2021-01-07 15:32:28 +01:00
qprocessenvironment QProcess: Distinguish between null and empty QProcessEnvironment 2021-11-07 01:53:44 +01:00
qresourceengine tst_qresourceengine: use QFINDTESTDATA() to find correct path 2022-02-04 11:02:07 +02:00
qsavefile QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08:00
qsettings Remove unused .qrc files 2022-01-17 23:17:01 +01:00
qstandardpaths Fix autotest public API compilation for INTEGRITY 2021-10-15 11:00:25 +03:00
qstorageinfo Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtemporarydir QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08:00
qtemporaryfile Remove unused .qrc files 2022-01-17 23:17:01 +01:00
qurl Workaround MSVC 2022 bug about QString::replace 2021-11-10 14:10:20 +01:00
qurlinternal tst_qurl{,internal}: Use U+FB01 for normalization to ASCII test cases 2021-08-25 00:13:39 +02:00
qurlquery tests: Remove unused SRCDIR defines 2021-08-17 12:41:57 +00:00
qurluts46 Update UCD to Revision 28 2021-10-18 16:45:10 +00:00
CMakeLists.txt Exclude filesystem autotests for INTEGRITY 2021-12-30 15:38:14 +00:00